Chapter Contents |
Previous |
Next |
SAS Companion for the CMS Environment |
Using the GETEXEC DATA Step Function |
The following SASMACRO submits a DATA step that uses the GETEXEC function to retrieve the value of the REXX variable DATALINE. It then prints the value of DATALINE in the SAS log. Note that the REXX variable name must be specified in uppercase letters.
/* GETLINE SASMACRO - a SAS REXX macro */ dataline='This data will be placed into the SAS', 'data set A' /* Pass a DATA step to SAS */ "data a;" "x=getexec('DATALINE');" "put x;" "run;" exit
For more information about the syntax and usage of GETEXEC, see GETEXEC.
Using the PUTEXEC CALL Routine |
The following SASMACRO submits a DATA step that assigns the value of a SAS variable to the REXX variable SASTIME. The SASMACRO then displays the value of the REXX variable on the console. Note that the REXX variable name must be specified in uppercase letters.
/* PUTTIME SASMACRO - a SAS REXX macro */ "data _null_;" "time=symget('SYSTIME');" "call PUTEXEC('SASTIME',time);" "run;" say 'SAStime is' sastime exit
For more information about the syntax and usage of PUTEXEC, see CALL PUTEXEC.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.