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 a supported
standard (and standardversion) that has 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.
In the SAS Clinical
Standards Toolkit 1.5, the cstutilvalidatesasreferences macro replaces
the cstutil_checkds macro. This new macro checks the structure and
content of the SASReferences data set against a defined gold standard.
If you have used previous
versions of the SAS Clinical Standards Toolkit, you might see failures
when you use the cstutilvalidatesasreferences macro against SASReferences
data sets that were created in a version before the SAS Clinical Standards
Toolkit 1.5. These failures are caused by the stricter adherence to
the SASReferences metadata model that the cstutilvalidatesasreferences
macro enforces.
Here is the syntax of
this macro:
%macro cstutilvalidatesasreferences
(_cstDSName=,_cstStandard=,_cstStandardversion=, _cstSASRefsGoldStd=,
_cstallowoverride=, _cstResultsType=, _cstPreAllocated, _cstVerbose=
);
_cstDSName specifies
the two-level name of the data set to be validated. This value is
required. The default value is &_cstSASRefs derived from the process
setup macro.
_cstStandard specifies
the name of a registered data standard. This value is required. The
default value is CST-FRAMEWORK.
_cstStandardversion
specifies the version of a registered data standard. This value is
required. The default value is 1.2.
_cstSASRefsGoldStd specifies
the two-level name of a comparative gold standard against which this
SASReferences data set is compared. This value is required. By default,
the global standards library metadata StandardSASReferences is assumed.
_cstallowoverride specifies
whether to ignore one or more of the values defined above. Specify
the check code in a blank-delimited string (for example, CHK01 CHK07).
If null, all conditions are tested.
_cstResultsType specifies
where to store report findings: in the SAS log or in the Results data
set. This value is required. It must be either LOG or RESULTS. The
default value is LOG.
_cstPreAllocated specifies
whether to allocate librefs and filerefs when this macro is called.
If they are not allocated, the validation of data sets and catalogs
is performed based on paths and memnames, not on libref.memnames.
This value is required. It must be either N or Y. The default value
is N.
_cstVerbose specifies
whether to report specific problems or the absence of problems in
_cst_rc. Otherwise, only success or failure is reported. This value
is required. It must be either N or Y. The default value is N.
This macro is typically
used as a part of the normal process setup. It is called either before
or as a part of cstutil_allocatesasreferences() or as a stand-alone
call outside the context of use in the normal process setup. The macro
sets the _cst_rc and _cst_rcmsg global macro variables to indicate
that the SASReferences data set is valid (_cst_rc=0) or not valid
(_cst_rc ne 0).
There are eight checks
associated with this macro when validating a SASReferences data set.
-
CHK01: The data set is structurally
correct.
-
CHK02: An unknown standard or standardversion
exists.
-
CHK03: The referenced input and
output files and folders can be accessed.
-
CHK04: All required look-throughs
to the global standards library defaults work.
-
CHK05: All discrete character field
values are found in the Standardlookup data set.
-
CHK06: For the given context, path
and memname macro variables are resolved.
-
CHK07: Multiple fmtsearch records
exist, but valid ordering is not provided.
-
CHK08: Multiple autocall records
exist, but valid ordering is not provided.
In the SAS Clinical
Standards Toolkit 1.5, additional columns are included in the SASReferences
data set to facilitate internal validation. Two of these columns are
iotype and filetype. To remain backward compatible, if the SASReferences
data set is missing these two columns, CHK03 is ignored because the
cstutil_validatesasreferences macro assumes that the SASReferences
data set was created in a version before the SAS Clinical Standards
Toolkit 1.5.
Results are written
to the Results data set defined by the &_cstResultsDS global macro
variable.