| Automatic Macro Variables |
| Type: | Automatic macro variable (read only) |
| Details | |
| Example | |
| Identifying the Day When a SAS Session Started | |
| 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 |
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
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.