When a
standard is registered, information about the data sets and files
that comprise the standard is registered. These data sets and files
are in a default folder hierarchy within the global standards library.
The SAS Clinical Standards Toolkit provides a mechanism to reference
the location of, and metadata about, these data sets and files. As
a result, users do not have to specify paths and member names in each
SASReferences file they create. When a SAS Clinical Standards Toolkit
process encounters an incomplete file reference in a SASReferences
file, it looks in the standard-specific folder hierarchy for the information.
This mechanism is useful for a number of reasons:
-
Programmers do not need to know
all of the locations.
-
If the global standards library
needs to move, it can without having to change all of the SASReferences
files that use a standard.
-
To change standard versions, you
only need to change the contents of the
standardversion column.
The following
code creates a partial SASReferences file:
/*
Step 1. Initialize the global macro variables needed by the
framework.
*/
%cst_setStandardProperties(
_cstStandard=CST-FRAMEWORK
,_cstSubType=initialize
);
/*
Step 2. Create the empty SASReferences data set.
*/
%cst_createDS(
_cstStandard=CST-FRAMEWORK,
_cstType=control,
_cstSubType=reference,
_cstOutputDS=sasrefs
);
/*
Step 3. Fill in the minimal information for a series of
records
*/
data sasrefs;
if 0 then set sasrefs;
standard='CST-FRAMEWORK';
standardversion='1.2';
type='messages';
subtype='';
sasref='messages';
reftype='libref';
order=1;
output;
standard='CST-FRAMEWORK';
standardversion='1.2';
type='lookup';
subtype='';
sasref='template';
reftype='libref';
order=1;
output;
standard='CST-FRAMEWORK';
standardversion='1.2';
type='results';
subtype='results';
sasref='template';
reftype='libref';
order=1;
output;
run;
Here is what the data
set looks like:
Example SASReferences Data Set
The
path and
memname columns are
missing. The user has specified the standard, standardversion, type,
subtype, SASref, and reftype. This information is sufficient. The
rest of the information is available from the registered standard's
metadata.
The following
macro call attempts to insert the missing information if it is found
in a registered standard's metadata:
/*
Step 4. Insert the missing information from registered
standard.
*/
%cst_insertStandardSASRefs(
_cstSASReferences=sasrefs
,_cstOutputDS=outSASRefs
);
Here is
what the output data set looks like:
work.outSASRefs Data Set with Added Content