Syntax, %LET statement:
%LET variable=value;
variable
is any name that follows
the SAS naming convention.
value
can be any string from
0 to 65,534 characters long.
|
&macvar
),
the reference is evaluated before the assignment is made.
Name
|
Value
|
---|---|
SYSDATE |
the date of the SAS
invocation (DATE7.)
|
SYSDATE9 |
the date of the SAS
invocation (DATE9.)
|
SYSDAY |
the day of the week
of the SAS invocation
|
SYSTIME |
the time of the SAS
invocation
|
SYSENV |
FORE (interactive execution)
or BACK (noninteractive or batch execution)
|
SYSSCP |
an abbreviation for
the operating system that is being used, such as WIN or LINUX
|
SYSVER |
the release of SAS that
is being used
|
SYSJOBID |
an identifier for the
current SAS session or for the current batch job (the user ID or job
name for mainframe systems, the process ID (PID) for other systems)
|
Name
|
Value
|
---|---|
SYSLAST |
the name of the most
recently created SAS data set, in the form
LIBREF.NAME .
This value is always stored in all capital letters. If no data set
has been created, the value is _NULL_. |
SYSPARM |
text that is specified
when SAS starts.
|
SYSERR |
contains a return code
status that is set by the DATA step and some SAS procedures to indicate
whether the step or procedure executed successfully.
|
footnote1 "Created &systime &sysday, &sysdate9"; title "MPG City Over 25"; proc print data=sashelp.cars; var Make Model Type MPG_City MPG_Highway MSRP; where MPG_City>25; run;
1 | time of day (SYSTIME) |
2 | day of the week (SYSDAY) |
3 | date (day, month, and year) (SYSDATE9) |