cst_report.sas Sample driver program to perform a primary Toolkit action, in this case, reporting of process results. This code performs any needed set-up and data management tasks, followed by one or more calls to the %cstutil_createreport() macro to generate report output. Two options for invoking this routine are addressed in these scenarios: (1) This code is run as a natural continuation of a CST process, within the same SAS session, with all required files available. The working assumption is that the SASReferences data set (referenced by the _cstSASRefs macro) exists and contains information on all input files required for reporting. (2) This code is being run in another SAS session with no CST setup established, but the user has a CST results data set and therefore can derive the location of the SASReferences file that can provide the full CST setup needed to run the reports. Assumptions: To generate all panels for both types of reports, the following metadata is expected: - the SASReferences file must exist, and must be identified in the call to cstutil_processsetup if it is not work.sasreferences. - a Results data set. - a (validation-specific) Metrics data set. - the (validation-specific) run-time Control data set itemizing the validation checks requested. - access to the (validation-specific) check messages data set.
Message PROCESS STANDARD: CDISC-SDTM PROCESS STANDARDVERSION: 3.1.3 PROCESS DRIVER: SDTM_VALIDATE PROCESS DATE: 2012-10-01T09:57:14 PROCESS TYPE: VALIDATION PROCESS SASREFERENCES: &_cstSRoot./cdisc-sdtm-3.1.3-1.7/sascstdemodata/control/ sasreferences.sas7bdat
Data or Metadata Source
|
Scenario 1: Continuation
of an Active SAS Session
|
Scenario 2: Using a
Results Data Set from a Previous SAS Session
|
---|---|---|
SASReferences
|
&_cstSASRefs used
by the prior task that generated the Results data set.
|
The Results data set
record containing the message PROCESS SASREFERENCES attempts to use
the referenced file. &_cstSASRefs is set to this file.
|
Results
|
Precedence:
|
As provided in the cst_report.sas
driver program _cstRptResultsDS macro variable.
|
Metrics
|
Precedence:
|
The data set referenced
in &_cstSASRefs with type=results and subtype is either metrics
or validationmetrics.
|
Validation_Control
|
The data set referenced
in &_cstSASRefs with type=control and subtype=validation.
|
The data set referenced
in &_cstSASRefs with type=control and subtype=validation.
|
Messages
|
&_cstMessages used
by the prior task.
|
&_cstMessages built
by a call to %CSTUTIL_ALLOCATESASREFERENCES.
|
* Initialize macro variables used for this task *; %let _cstRptControl=; %let _cstRptLib=; %let _cstRptMetricsDS=; %let _cstRptOutputFile=&studyOutputPath/results/cstreport.pdf; %let _cstRptResultsDS=; %let _cstSetupSrc=SASREFERENCES; %let _cstStandard=CDISC-SDTM; %let _cstStandardVersion=3.1.2; %cstutil_processsetup(_cstSASReferencesLocation=&studyrootpath/control); %cstutil_reportsetup(_cstRptType=Results);
&studyOutputPath/results/cstreport.pdf
.
The studyOutputPath variable was previously defined to point to a
folder with Write permissions.
%let _cstSetupSrc=RESULTS; %cstutil_processsetup(); %let _cstRptResultsDS=work.validation_results; %cstutil_reportsetup(_cstRptType=Results);
%cstutil_createreport(_cstsasreferencesdset=&_cstSASRefs,_cstreportbydomain=Y, _cstreportoutput=&studyrootpath/results/cstchecktablereport.pdf);
%cstutil_createreport( _cstsasreferencesdset=&_cstSASRefs, _cstresultsdset=&_cstRptResultsDS, _cstmetricsdset=&_cstRptMetricsDS, _cstreportbytable=N, _cstreporterrorsonly=Y, _cstreportobs=50, _cstreportoutput=%nrbquote(&_cstRptOutputFile), _cstsummaryReport=Y, _cstioReport=Y, _cstmetricsReport=Y, _cstgeneralResultsReport=Y, _cstcheckIdResultsReport=Y);