!sasroot/cstframework/sasmacro
!sasroot/sasautos
/* initialize the global macro variables needed by the framework */ %cst_setstandardproperties( _cstStandard=CST-FRAMEWORK ,_cstSubType=initialize );
SubType
value
of initialize
. By default, this entry is
located here:
global standards library directory/standards/cst-framework-1.7/programs/initialize.properties
/* initialize the global macro variables needed by CDISC SDTM */ %cst_setstandardproperties( _cstStandard=CDISC-SDTM ,_cstSubType=initialize );
/* get a list of the registered standards */ %cst_getregisteredstandards( _cstOutputDS=work.regStds );
/* initialize the global macro variables needed by the framework */ %cst_setstandardproperties( _cstStandard=CST-FRAMEWORK ,_cstSubType=initialize ); /* get a list of the registered standards */ %cst_getregisteredstandards( _cstOutputDS=work.regStds );
%put CST Version: %cstutil_getcstversion;
%put &_cstVersion
%cst_getstandardsasreferences( _cstStandard=CST-FRAMEWORK ,_cstOutputDS=sasrefs );
CST-FRAMEWORK
and
the data set to create to contain the information. Because the standard
version is omitted, the default standard version is used. The data
set that is returned is a SASReferences data set. For the macro call,
this display shows the first few columns of data that are returned.
WARNING: Apparent symbolic reference _CSTDEBUG not resolved. ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: (&_cstDebug)) ERROR: The macro CST_GETSTANDARDSASREFERENCES will stop executing.
/* Create the empty SASReferences data set used in the next step */ %cst_createdsfromtemplate( _cstStandard=CST-FRAMEWORK, _cstType=control, _cstSubType=reference, _cstOutputDS=work.sasrefs );
Type
and SubType
identify
that it is a SASReferences table. The Standard
identifies
the module to be used. If the standard version is not specified, then
the default for standard version is used. The output is a data set
named work.sasrefs that contains 0 observations.
/* Create the table shells for CDISC SDTM 3.1.3 in the work library */ %cst_createtablesfordatastandard( _cstStandard=CDISC-SDTM ,_cststandardVersion=3.1.3 ,_cstOutputLibrary=work );
/* Step 1. Create the empty SASReferences data set used in the next step */ %cst_createdsfromtemplate( _cstStandard=CST-FRAMEWORK, _cstType=control, _cstSubType=reference, _cstOutputDS=work.sasrefs); /* Step 2. Prep the type of information to be returned. */ data work.sasrefs; if 0 then set work.sasrefs; standard='CDISC-SDTM'; standardVersion='3.1.2'; * ----- REFERENCE METADATA -----; * tables metadata; type='referencemetadata'; subType='table'; sasRef='work'; refType='libref'; memname='refTables'; iotype=’input’; filetype=’dataset’; allowoverwrite=’N’; output; * columns metadata; type='referencemetadata'; subType='column'; sasRef='work'; refType='libref'; memname='refColumns'; output; run; /* Step 3. Call the macro to get the metadata. */ %cst_getstandardmetadata( _cstSASReferences=work.sasrefs );
work.sasrefs
.
type
and subType
identify
the types of metadata to be returned. The sasRef
and memname
identify
the target library and name for each data set.
work.sasrefs
is
read, and the global metadata is used to fulfill the request.
work.refTables
contains
metadata about the CDISC SDTM 3.1.2 domains. The data set work.refColumns
contains
metadata about each of the columns defined in the domains.
/* 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_createdsfromtemplate( _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='cstmsg'; reftype='libref'; order=1; iotype='input'; filetype='dataset'; allowoverwrite='N'; output; standard='CST-FRAMEWORK'; standardversion='1.2'; type='lookup'; subtype=''; sasref='cstlkup'; reftype='libref'; order=1; iotype='input'; filetype='dataset'; allowoverwrite='N'; output; standard='CST-FRAMEWORK'; standardversion='1.2'; type='results'; subtype='validationresults'; sasref='cstrslt'; reftype='libref'; order=1; iotype='output'; filetype='dataset'; allowoverwrite='Y'; output; run;
/* Step 4. Insert the missing information from registered standard. */ %cst_insertstandardsasrefs( _cstSASReferences=sasrefs ,_cstOutputDS=outSASRefs );