%let _cstStandard=CDISC-SDTM;
%let _cstStandardVersion=3.1.3;
%let _cstVersion=;
%let _cstCTPath=;
%let _cstCTMemname=;
%let _cstCTDescription=;
These macro variables
are used as substitution parameters later in the driver module to
reduce the number of code changes required.
%cst_setStandardProperties(_cstStandard=CST-FRAMEWORK,_cstSubType=initialize);
Initialize the minimum
set of global macro variables used to run any SAS Clinical Standards
Toolkit process. This includes the names of work data sets, default
locations of files, and metadata used to populate the process Results
data set.
Each registered standard
should have its own initialize.properties. For each standard that
is included in a specific process, the %cst_setstandardproperties
macro can be called at this point. Alternatively, type=properties
records can be added to the SASReferences data set, and the properties
are processed when the %cstutil_allocatesasreferences macro is called.
This latter approach is followed in the SDTM validate_data.sas driver
module.
%cst_getRegisteredStandards(_cstOutputDS=work._cstStandards);
data _null_;
set work._cstStandards (where=(standard="CST-FRAMEWORK"));
call symputx('_cstVersion',strip(productrevision));
run;
Get the list of registered
standards to determine the version of the SAS Clinical Standards Toolkit.
* Set Controlled Terminology version for this process *;
%cst_getstandardsubtypes(_cstStandard=CDISC-TERMINOLOGY,_cstOutputDS=work._cstStdSubTypes);
data _null_;
set work._cstStdSubTypes (where=(standardversion="&_cstStandard" and isstandarddefault='Y'));
* User can override CT version of interest by specifying a different where clause: *;
* Example: (where=(standardversion="&_cstStandard" and standardsubtypeversion='201104')) *;
call symputx('_cstCTPath',path);
call symputx('_cstCTMemname',memname);
call symputx('_cstCTDescription',description);
run;
proc datasets lib=work nolist;
delete _cstStandards _cstStdSubTypes;
quit;
Choose the default controlled
terminology that is associated with the _cstStandard and _cstStandardVersion.
Cleanup work files.
*********************************************************************************************;
* The following data step sets (at a minimum) the studyrootpath and studyoutputpath. These *;
* are used to make the driver programs portable across platforms and allow the code to be *;
* run with minimal modification. These macro variables by default point to locations within *;
* the cstSampleLibrary, set during install but modifiable thereafter. The cstSampleLibrary *;
* is assumed to allow write operations by this driver module. *;
*********************************************************************************************;
%cstutil_setcstsroot;
data _null_;
call symput('studyRootPath',cats("&_cstSRoot",
"/cdisc-sdtm-3.1.3-&_cstVersion/sascstdemodata"));
call symput('studyOutputPath',cats("&_cstSRoot",
"/cdisc-sdtm-3.1.3-&_cstVersion/sascstdemodata"));
run;
Note: &_cstSRoot is set by
the call to %cstutil_setcstsroot to the location of the cstSampleLibrary
that was defined during the product installation.
%let workPath=%sysfunc(pathname(work));
The workPath value provides
the path to the Work directory. This directory is referenced within
the sample study SASReferences data set path column. It is not required.