Chapter Contents |
Previous |
Next |
SAS Companion for the CMS Environment |
A command-style SAS macro that invokes a SASMACRO should have the following form:
%macro TRYIT/cmd parmbuff; pgm; submit "TRYIT &syspbuff;" %mend;In the example, the first line begins the definition of a command-style SAS macro named TRYIT whose arguments are assigned as the value of the automatic macro variable SYSPBUFF. The second and third lines specify the execution of TRYIT SASMACRO from within the TRYIT SAS macro, by using the original arguments.
You can store this macro as you would any other SAS macro, in SAS code or in an autocall library for example, as described in the SAS Macro Language: Reference. Once the macro is defined in your SAS session, you can issue the command TRYIT on the windowing environment command line to execute the TRYIT SASMACRO.
Note: The SAS system option CMDMAC must be in effect for SAS to
recognize command-stye macros.
Autocall macros that invoke the Productivity Aid SASMACROs (see Productivity Aids for Interactive SAS Sessions under CMS) are already provided for you so only the CMDMAC system option is required to use them as windowing environment commands.
Note: The SAS system option MAUTOSOURCE must be in effect in order
for you to use the autocall facility.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.