Summary

This article provides an example of a SAS script that contains format information.

Table of Contents


Below is an example of a SAS script that contains format information. It is usually written by client SAS programmers. 

For a more in-depth look at SAS formats, please click here.

Example SAS Format File

proc format;
  value $ALCAVGA
  '1'='Less than 1 unit of alcohol'
  '2'='1-5 units of alcohol'
  '3'='6-10 units of alcohol'
  '4'='More than 10 units of alcohol'
;run;

proc format;
  value $BIOPREA
  'FU'='Lost to Follow up'
  'NA'='Clinically Not Advisable'
  'OT'='Other'
  'PR'='Patient Refused'
;run;

proc format;
  value $BSCHG
  'C'='Changed'
  'ND'='Not Done'
  'U'='Unchanged'
;run;

proc format;
  value $CHANGES
  'I'='Improved/Resolved'
  'W'='Worsened/New'
;run;

proc format;
  value $ETHNIC
  'H'='Hispanic'
  'NH'='Not Hispanic'
;run;

proc format;
  value $GENDER
  'F'='Female'
  'M'='Male'
;run;

Uploading the Format File

The file can be loaded to the trial directory through Trial Manager > Find the Trial > Design > Data Files. This way the file will be bundled together with the rest of the export files in one zip file when the export is run.

Configuring the Export for Custom Formats

After the file is loaded, configure the DataArchitect by entering the include parameter for the export writer:

Param NameParam Value
includeFile name of the SAS format script

After the file is available, configure the DataArchitect by entering the format parameters for the appropriate questions:

Param NameParam Value
format_questionAliasFormat defined in the SAS format script

Configuration Example

Below is an example of the configuration in DataArchitect.


Need more help?

Please visit the Fountayn Contact Information page.