Two SAS
Clinical Standards Toolkit framework utility macros perform key functions
in assessing whether the SASReferences file is valid.
The cst_insertstandardsasrefs
macro looks up missing paths and memnames in the constructed SASReferences
file from each StandardSASReferences data set. For example, this macro
sets the path and memname values for lines 8 and 9 and 11 and 12 in
the example in
Sample SASReferences File for CDISC SDTM Validation. This macro attempts to update only records for supported
standards (and standardversions) that have missing path and memname
information. It does not update records with non-null values, and
it does not add any records from the StandardSASReferences data set.
If this macro runs successfully, then the resulting data set has paths
for all records and memnames for all records that require them. This
does not include autocall and sourcedata records. By default, the
resulting data set is referenced by the &_cstSASRefs global macro
variable.
The cstutil_checkds
macro checks the structure and content of the data sets used by SAS
Clinical Standards Toolkit, including SASReferences. This macro validates
that SASReferences has the structure and content defined by the StandardSASReferences
and Standardlookup data sets.
The following
is the syntax of this macro:
%cstutil_checkDS(_cstDSname=, _cstType=, _cstSubType=,
_cstStandard, _cstStandardVersion);
_cstDSname
specifies a two-level name of the data set to be validated. This value
is required.
_cstType
specifies the type of the data set to be validated. This value is
required. This value comes from the Type column in the registered
SASReferences for the standard-version combination.
_cstSubType
specifies the subtype for the corresponding type. This value comes
from the Subtype column in the registered SASReferences for the standard-version
combination. If the type has no subtypes registered, then this option
can be omitted. Otherwise, this value is required.
_cstStandard
specifies the name of the data standard to validate against. This
value is optional. By default, all standards are included.
_cstStandardVersion
specifies the version of the data standard to validate against. This
value is optional. By default, all standard versions are included.
Results
are written to the Results data set defined by the &_cstResultsDS
global macro variable.
The following
table describes the most common errors detected by the cstutil_checkds
macro. It suggests solutions as well.
Common Errors and Solutions
|
Location
Where It Is Reported
|
Possible
Cause and Solution
|
Input parameters to
macro insufficient for cstutil_checkds macro to run.
|
|
One of the required
macro variable options is missing.
|
Location for Results
data set is undefined.
|
|
Define the Results data
set in the macro variable _cstResultsDS.
|
Data set could not be
found.
|
|
The data set that is
passed in via the _cstdsname parameter cannot be found. Verify that
the data set exists in the location specified.
|
Data set could not be
opened.
|
|
The data set that is
passed in via the _cstdsname parameter cannot be opened. Make sure
that you do not have the data set open in another window. Verify you
have read access to the data set.
|
Differences found between
data set and the template data set.
|
|
The data set that is
passed in via the _cstdsname parameter has a different structure than
the template data set.
Use the cst_createds
macro to create a valid empty version of the data set, and then populate
this data set with your data.
|
Null values are not
permitted for column.
|
|
Some columns are required
to be non-null. If you receive this error, then you are also informed
which column must contain a value. Enter a non-null value for this
column.
|
Invalid value for column
column_name, row ## in data set.
|
|
Some columns are limited
to a set of values. This error indicates that the value for column_name,
listed in row ##, has an invalid value.
The list of valid values
can be found in the Standardlookup data set that is registered with
each data standard. Review the list of valid values, and update the
column value.
|