Overview

The following global macro variables are used by the SAS Clinical Standards Toolkit. Most SAS Clinical Standards Toolkit global macro variables that are provided by SAS are defined in property files in the form of name and value pairs, such as:
_cstDebug=
Each registered standard, including CST-Framework, has an initialize.properties file. This file specifies global macro variables that are required by the standard and are available for use in any SAS Clinical Standards Toolkit processes that reference the standard. Each registered standard might have an action-related properties file that specifies global macro variables that are needed for processes performing the action. An example of this type of file is validation.properties.
A properties file is processed in one of two ways:
A direct call is made to the SAS Clinical Standards Toolkit utility macro %cstutil_setproperties in a code module, such as a driver program like validate_data.sas.
The file is included in the SASReferences data set (with type=properties), in which the %cstutil_allocatesasreferences macro calls %cstutil_setproperties.
Global macro variables can be deleted at the end of a process if the SAS Clinical Standards Toolkit utility macro %cstutil_cleanupcstsession is called with the _cstDeleteGlobalMacroVars parameter set to 1.
Two commonly used global macro variables are not defined in the properties files previously described. The _cstGRoot global macro variable defines the location of _cstGlobalLibrary and is set with the autocall macro %cstutil_setcstgroot. This macro is called in most framework macros. The &studyRootPath global macro variable defines the location of the study data and metadata. It is often set in user-defined driver programs (for example, validate_data.sas).
Global Macro Variables
Global Macro Variable
Values
* default value
Comments
CST-Framework initialize.properties
_cstDebug
0 (off)1
1 (on)
If on, then _cstDebugOptions are set. Many files remain in the Work library at process conclusion.
Note: When _cstDebug=1, the size of the SAS log is significantly larger.
_cstDebugOptions
mprint mlogic symbolgen mautolocdisplay1
SAS system options set when _cstDebug=1.
_cst_rc
0 (no error)1
1 (error)
Set to 1 during processing if an error is encountered that should halt the process.
_cst_MsgID
<blank>1
The result or validation check ID that is used for reporting process results. A value is set in each code module.
_cst_MsgParm1
<blank>1
Any result message parameter (1) that is used for reporting process results. A value is set in each code module.
_cst_MsgParm2
<blank>1
Any result message parameter (2) that is used for reporting process results. A value is set in each code module.
_cstResultSeq
01
Sequence indicator that is used to signal multiple instances of the same event (such as running the same validation check multiple times). This variable should be initialized to 0. This variable is used for reporting process results. Values are incremented in each code module. This variable is used to join the Results and Metrics data sets.
_cstSeqCnt
01
Sequence indicator that is used to count the number of records that were output to the Results data set in _cstResultSeq. This variable should be initialized to 0. This variable is used for reporting process results. Values are incremented in each code module
_cstResultsDS
work._cstresults 1
The default data set name that is used to accumulate results during a process. This variable might be persisted at the end of the process based on the SASReferences (type=results) entry.
_cstSrcData
<blank>1
This variable is used for reporting process results. A value is set in each code module.
_cstResultFlag
01
-1
1
This variable reports the status of any result. A value of 0 indicates an informational or non-error status. A positive integer indicates an error status. A negative integer indicates that the assessment could not be completed, often because of metadata problems or SAS errors.
_cstReallocateSASRefs
01 (no)
1 (yes)
This variable specifies whether the SAS Clinical Standards Toolkit should attempt to reallocate any SAS librefs and filerefs if they are already allocated. If the value is yes, then allocation is based on SASReferences content.
_cstFMTLibraries
<blank>1
** work.fmt (example)
This variable enables users to change the format search path built from SASReferences (type=fmtsearch) entries with <libref> or <libref.catalog> references. If only <libref> is provided, then SAS assumes a catalog name of FORMATS. If the value begins with ** (such as ** WORK), then the SAS Clinical Standards Toolkit moves WORK.FORMATS to the end of the format search path.
_cstMessageOrder
APPEND1
MERGE
This variable is used in the derivation of _cstMessages. The value APPEND appends message files based on the order of SASReferences (type=messages) entries. The value MERGE allows references to multiple standard-specific message files (including internationalized messages), retaining a single message per message ID, standardversion, and checksource.
_cstMessages
work._cstmessages1
The default data set name that is used to aggregate all standard messages based on SASReferences (type=messages) entries. This file is used during processing to fully resolve the results.message field.
_cstSASRefsLoc
&workpath1
The path to a directory that contains the SASReferences data that is specified in _cstSASRefsName. By default, the SAS Clinical Standards Toolkit assumes that the SASRferences data set is located in the SAS Work library (signified by &workpath). Use of &workpath is not required.
_cstSASRefsName
sasreferences1
The name of the SASReferences data set (in _cstSASRefsLoc) to be used as the initial source of information about all inputs and outputs defined for a SAS Clinical Standards Toolkit process. The name of the data set that is a SASReferences data set. This allows more than one SASReferences data set to be stored in a directory.
_cstSASRefs
work._cstsasrefs1
The SASReferences data set that is used during processing that contains fully resolved records (for example, paths) based on using standard-level SASReferences data sets for default values.
CDISC SDTM (3.1.1 and 3.1.2) initialize.properties
_cstSubjectColumns
studyid usubjid1
The standard-specific set of columns that identify a subject. Columns are used by standard-specific macros and for metrics calculations. Columns do not need to be in all source tables (for example, non-patient-level domains like CDISC trial design domains).
_cstTableMetadata
work._csttablemetadata1
Data set that is used during processing that contains table-level metadata (derived from either the reference or study table metadata) that is used by the process.
_cstColumnMetadata
work._cstcolumnmetadata1
Data set that is used during processing that contains column-level metadata (derived from either the reference or study column metadata) that is used by the process.
CDISC SDTM (3.1.1 and 3.1.2) validation.properties
_cstCheckSortOrder
_DATA_1
<keys>
This variable enables specification of the order in which the checks are to be run. The _DATA_ value indicates that checks are to be processed in the order defined in the Validation Control data set. Users can specify a set of space-delimited keys from Validation Control columns (for example, checksource checkid).
_cstMetrics
0 (off)1
1 (on)
Toggle this variable to enable or disable metrics reporting. This variable attempts to provide a denominator for the errors that are detected. Increased processing time can result.
_cstMetricsDS
work._cstmetrics1
The default data set name that is used to accumulate results during a process. This variable is typically stored at the end of the process based on the SASReferences (type=results) entry.
_cstMetricsTimer
0 (off)
1 (on)1
This variable estimates the elapsed time to perform an action. Results are added to _cstMetricsDS. The value is ignored if _cstMetrics=0.
_cstMetricsNumSubj
0 (off)
1 (on)1
This variable enables counts on a subject level. The value is ignored if _cstMetrics=0.
_cstMetricsNumRecs
0 (off)
1 (on)1
This variable enables counts on the number of records tested. The value is ignored if _cstMetrics=0.
_cstMetricsNumChecks
0 (off)
1 (on)1
This variable specifies whether to report the number of distinct validation check invocations. The value is ignored if _cstMetrics=0.
_cstMetricsNumBadChecks
0 (off)
1 (on)1
This variable specifies whether to report the number of check invocations that were not run. The value is ignored if _cstMetrics=0.
_cstMetricsNumErrors
0 (off)
1 (on)1
This variable specifies whether to report the number of resultseverity="Error" records in the Results data set. This value is ignored if _cstMetrics=0.
_cstMetricsNumWarnings
0 (off)
1 (on)1
This variable specifies whether to report the number of resultseverity="Warning" records in the Results data set. This value is ignored if _cstMetrics=0.
_cstMetricsNumNotes
0 (off)
1 (on)1
This variable specifies whether to report the number of resultseverity="Note" records in the Results data set. The value is ignored if _cstMetrics=0.
_cstMetricsNumStructural
0 (off)
1 (on)1
This variable specifies whether to report the number of structural errors that were detected. This variable is based on the errors reported for checks where checktype= "Metadata". This excludes informational records in the Results data set. The value is ignored if _cstMetrics=0.
_cstMetricsNumContent
0 (off)
1 (on)1
This variable specifies whether to report the number of content errors that were detected. This variable is based on the errors reported for checks where checktype ^= "Metadata". This excludes informational records in the Results data set. The value is ignored if _cstMetrics=0.
_cstMetricsCntNumSubj
01
Actual count of the number of subjects that were tested. The value is not calculated if _cstMetrics=0.
_cstMetricsCntNumRecs
01
Actual count of the number of records that were tested. The value is not calculated if _cstMetrics=0.
_cstMetricsCntNumChecks
01
Actual count of the number of validation checks that were run. The value is not calculated if _cstMetrics=0.
_cstMetricsCntNumBadChecks
01
Actual count of the number of check invocations that were not run. The value is not calculated if _cstMetrics=0.
_cstMetricsCntNumErrors
01
Actual count of the number of errors that were reported. The value is not calculated if _cstMetrics=0.
_cstMetricsCntNumWarnings
01
Actual count of the number of warnings that were reported. The value is not calculated if _cstMetrics=0.
_cstMetricsCntNumNotes
01
Actual count of the number of notes that were reported. The value is not calculated if _cstMetrics=0.
_cstMetricsCntNumStructural
01
Actual count of the number of structural errors that were reported. The value is not calculated if _cstMetrics=0.
_cstMetricsCntNumContent
01
Actual count of the number of content errors that were reported. The value is not calculated if _cstMetrics=0.
_cstCRTVersion
1.01
Current CDISC CRT-DDS version.
Note: This variable might be deprecated in a future release.
General Purpose (not set in properties files)
_cstGRoot
Example:
C:\cstGlobalLibrary
This variable is required. It defines the location of _cstGlobalLibrary. It is set with the autocall macro %cstutil_setcstgroot, which is called in most framework macros. It is used most often in SASReferences paths to enable relative path mobility.
studyRootPath
Example:
C:\Study1
This variable is optional. It defines the location of study data and metadata. It is often set in user-defined driver programs (for example, validate_data.sas). It is used in SASReferences paths to limit the changes that are required when changing input data sources, which facilitates portability.
1default value