Details
You can use SYSINDEX in a program that uses macros when you need a unique number
that changes after each macro invocation.
SYSINFO Automatic Macro Variable
Contains return codes provided by some SAS procedures.
Type: Automatic macro variable (read only)
Details
Values of SYSINFO are described with the procedures that use it. You can use the value
of SYSINFO as a condition for determining further action to take or parts of a SAS
program to execute.
For example, PROC COMPARE, which compares two data sets, uses SYSINFO to store
a value that provides information about the result of the comparison.
SYSJOBID Automatic Macro Variable
Contains the name of the current batch job or user ID.
Type: Automatic macro variable (read only)
See: “Automatic Macro Variables in UNIX Environments” in SAS Companion for UNIX
Environments
“Automatic Macro Variables” in SAS Companion for Windows
“Macro Variables” in SAS Companion for z/OS
Details
The value stored in SYSJOBID depends on the operating environment that you use to
run SAS. You can use SYSJOBID to check who is currently executing the job to restrict
certain processing or to issue commands that are specific to a user.
SYSLAST Automatic Macro Variable
Contains the name of the SAS data file created most recently.
Type: Automatic macro variable (read and write)
See: “SYSDSN Automatic Macro Variable” on page 206
Details
The name is stored in the form libref.dataset. You can insert a reference to SYSLAST
directly into SAS code in place of a data set name. If no SAS data set has been created in
the current program, the value of SYSLAST is _NULL_, with no leading or trailing
blanks.
214 Chapter 14 • Automatic Macro Variables