SAS example

Note:This example assumes that the path to the SAS executable has already been specified in Phoenix. (Select Edit > Preferences > SAS.)

This example generates a PROC mean and a graph from NCA data. Let’s take a closer look at one of the lines in the SAS script file we will be using (proc_mean_plus_grf.sas).

libname indata XPORT "Final_Pa.xpt"; /*WNL_IN auclast tmax cmax aucinfob lambda_z hl_lz*/

The WNL_IN comment has been added to the SAS script to tell the Phoenix SAS Shell object that this line specifies the input information. The indata library reference name is used by the SAS object for mapping the input dataset. The column names that follow WNL_IN (auclast, tmax, cmax, aucinfob, lambda_z, and hl_lz) will be used by the SAS object as the context headings in the Mappings panel.

When the script is submitted to SAS during execution of the object, the dataset mapped to indata is converted to a SAS transport file named Final_PA.xpt and copied to the temporary work direc­tory where SAS performs any other processing steps outlined in the script file.

Let’s continue with the example steps:

  1. Create a new project named SAS_Example.

  2. Import the SAS script file proc_mean_plus_grf.sas from …\Examples\SAS\Exam­ple2.

    The script is added to the project’s Code folder and is parsed for comments indicating the data input “/*WNL_IN*/” as well any column names listed in the comment.

  3. Import Final_Parameters.csv from …\Examples\SAS\Example2. (Be sure to check the Has units row option.)

  4. Select workflow in the Object Browser and then select Insert > External Software > SAS Shell.

  5. With SAS Script selected in the Setup list, expand the Code folder and drag proc_mean_plus_grf.sas to the Mappings panel.

  6. Select indata in the Setup list and drag Final Parameters from the Data folder to the Mappings panel. (Notice that the context headings are the same as the names specified in the script file.)

  7. Map the study variable AUCINF_D_obs to the aucinfob context.

  8. Map the study variable HL_Lambda_z to the hl_lz context.

  9. Specify an output location in the SAS object's Options tab by typing the path directly in the Output Folder field or by using the Browse button.

  10. Click icon_execute_9.png (Execute icon) to execute the SAS object.

In addition to the aucdescrp.xpt output file, the example script also calls for some additional xpt files to be created (finpar2.xpt, which contains only datasets where Lz is defined, and fin­par.xpt). The finpar2.xpt file is then used to generate a graph (cmax_log.gif). All output files defined in the script are placed in the output folder specified in the Options tab (step 9).

This concludes the SAS example.


Last modified date:7/9/20
Certara USA, Inc.
Legal Notice | Contact Certara
© 2020 Certara USA, Inc. All rights reserved.