Running the CDISC-SDTM to CRT-DDS Transformation on Saved Data

Problem

You want to run the CDISC-SDTM to CRT-DDS transformation on saved data so that the information that is stored in the data is added to the CRT-DDS standard.

Solution

You create and run a job with a transformation that creates a CRT-DDS define.xml file. The file includes SAS data sets that represent the CRT-DDS data standard model.
Note: For detailed information about creating a job with a transformation, see the SAS Data Integration Studio: User's Guide.

Tasks

To create a job with a transformation that creates a CRT-DDS define.xml file that includes the SAS data sets that represent the CRT-DDS data standard model, complete the following steps:
  1. In SAS Data Integration Studio, create a new job. Select Filethen selectNewthen selectJob. An empty job diagram is displayed on the Diagram page.
  2. Drag and drop the User Written Code transformation onto the diagram.
  3. Right-click on User Written, and select Properties. The User Written Properties dialog box appears.
  4. Click the Code tab. In the Code generation mode field, select All user written.
  5. In the code editor, add the code to create the define.xml file. The following code example creates a define.xml file:
    %let SASCrtddsTables = %nrquote(\\myCDIServer\mydata\crtdds_tables);
    %let DefPath = %nrquote(\\myCDIServer\mydata\crtdds_tables);
    %let DefFile = %nrquote(define.xml);
    
    %cst_setStandardProperties(
      _cstStandard=CDISC-CRTDDS
      ,_cstSubType=initialize
      ); 
    %let workPath=%sysfunc(pathname(work));
    %let _cstSASRefs=work.sasreferences;
    %let _cstSASRefsLoc=&workpath;
    %let _cstSASRefsName=sasreferences;
    %let _cstResultsds=crtdds_results;
    %cst_createds(_cstStandard=CST-FRAMEWORK, _cstType=control,
    _cstSubType=reference, _cstOutputDS=work.sasreferences);
    proc sql;
    insert into work.sasreferences 
    values ( "CST-FRAMEWORK"  "1.2"  "messages"  ""  "messages"  "libref"  "" 1  ""  "" ) 
    values ( "CDISC-CRTDDS"  "1.0"  "messages"  ""  "crtmsg"  "libref"  "" 2  ""  "" ) 
    values ( "CDISC-CRTDDS"  "1.0"  "autocall"  ""  "auto2"  "fileref"  "" 1  ""  "" ) 
    values ("CDISC-CRTDDS" "1.0" "sourcedata"  ""  "srcdata"  "libref"  
        "&SASCrtddsTables" . ""  "" )
    values ("CDISC-CRTDDS" "1.0" "externalxml"  "xml"  "extxml"  "fileref"  
        "&defpath" 1 "&deffile"  "" )
    values ("CDISC-CRTDDS" "1.0" "referencexml"  "stylesheet"  "xslt01"  
        "fileref"  "" 1 ""  "" )
    ;
    quit;
    
    %cst_insertStandardSASRefs(_cstSASReferences=sasreferences,
        _cstOutputDS=sasreferences);
    %let _cstReallocateSasrefs=1;
    %cstutil_allocatesasreferences;
    %crtdds_write(_cstCreateDisplayStyleSheet=1,_cstResultsOverrideDS=&_cstResultsDS);
    
  6. Modify the first two lines of the code to point to the location where your saved data sets exist, and where you would like to write out the resulting define.xml file.
  7. Click OK to save the code.
  8. Click Run to run the job.
  9. From the Windows Start menu, select Run. Enter the location where your data sets exist (for example, \\myCDIServer\mydata\crtdds_tables).
  10. Open the define.xml file. The Location field contains a link to the corresponding transport file. If you click on the link, and the transport file does not exist, then you get an error. Search the file for “Blank Annotated CRF (blankCRF.pdf#page=3)”. The define file has valuelist values for height and weight.