Chapter Contents |
Previous |
Next |
SAS Companion for the CMS Environment |
A set of directives is available to SASMACRO programs to control
printing to the SAS log. SASMACRO directives use a leading
++
sequence to differentiate them from normal SAS language statements. The directives
must be specified in uppercase letters and cannot end in a semicolon. They
must also be submitted on a separate line from other SAS statements.
Three directives are available for controlling printing to the SAS log:
++
SASLOG'++
NOLOG'++
SASLOG message-text'The following example uses the
++
SASLOG
directive to place text and subsequent SAS statements in the SAS log:
/* An extended version of TRYIT SASMACRO */ /* process arguments, establish defaults */ parse arg dname argname . if dname = '' then dname = 'a' if argname = '' then argname = 'x' /* Place text into SAS log */ /* and subsequent SAS statements */ '++SASLOG Running the TRYIT macro.' /* Pass a DATA step and PROC step into SAS */ 'data' dname';' argname'=1; run;' 'proc contents; run;' exit /* Return to SAS */
SAS Log for TRYIT SASMACRO shows the resulting SAS log:
1 tryit; ++++ Running the TRYIT macro. ++++ data a; x=1; run; NOTE: The data set WORK.A has 1 observations and 1 variables. ++++ proc contents; run; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.