Macro library access and SYSPARM

Macro library access

Two ways to allocate a SAS macro library and have the macros included to SAS. Use the SASAUTO parameter in the SAS execution statement to specify the macro library. Include a DD statement to allocate the macro library and use the SAS include statement. Both of these techniques are displayed below.

SYSPARM

The sysparm option in the SAS execution statement allows the string specified in the JCL to be available to the SAS program. This gives operations or the programmer direct control of jobs to select the desired function through JCL. This prevents the need to create multiple copies of code with slight variations. SAS code should be designed to accommodate change. Multiple copies require additional maintenance.

//STEP1    EXEC SAS,SASAUTO='SAS Fifth Dimension library',
//         PARM='SYSPARM="TA0001"'
//STEP2    EXEC SAS,PARM='SYSPARM="TA0001"'
//MACROS   DD  DISP=SHR,DSN=SAS Fifth Dimension library
//SYSIN    DD  * 
  %INCLUDE MACROS ;