SYSDAY Automatic Macro Variable

Contains the day of the week that a SAS job or session began executing.
Type: Automatic macro variable (read only)

Details

You can use SYSDAY to check the current day before executing code that you want to run on certain days of the week, provided you initialized your SAS session today.

Example: Identifying the Day When a SAS Session Started

The following statement identifies the day and date when a SAS session started running.
%put This SAS session started running on: &sysday, &sysdate9.;
When this statement executes on Wednesday, December 19, 2007 for a SAS session that began executing on Monday, December 17, 2007, the following line is written to the SAS log:
This SAS session started running on: Monday, 17DEC2007