Automatic macro variables are created by the macro processor and
they supply a variety of information. They are useful in programs
to check the status of a condition before executing code. When you
use automatic macro variables, you reference them the same way that
you do macro variables that you create such as &SYSLAST or &SYSJOBID.
CAUTION:
Do not
create macro variable names that begin with SYS.
The three-letter prefix
SYS is reserved for use by SAS for automatic macro variables. For
a complete list of reserved words in the macro language, see
Reserved Words in the Macro Facility.
For example, suppose
you want to include the day and date that your current SAS session
was invoked. Write the FOOTNOTE statement to reference the automatic
macro variables SYSDAY and SYSDATE9:
footnote "Report for &sysday, &sysdate9";
If the current SAS session
was invoked on June 13, 2007, macro variable resolution causes SAS
to see this statement:
FOOTNOTE "Report for Friday, 13JUN2007";
All automatic variables
except for SYSPBUFF are global and are created when you invoke SAS.
The following table lists the automatic macro variables and describes
their READ and WRITE status.
Automatic Macro Variables