10-29-2017 01:25 PM - edited 10-29-2017 01:26 PM
I'd like to record in SASLOG the date and time of running programs. I have a manual solution:
%put START TIME: %sysfunc(datetime(),datetime14.);
proc print data=temp ;
with the saslog:
81 %put START TIME: %sysfunc(datetime(),datetime14.);
START TIME: 29OCT17:13:14
82 data temp;
but I don't want to manually add %PUT every time I run a code. Instead, I would like to make a change in SASLOG configuration to get datetime stamp automatically with each run of any code opened in the SAS session.
I looked up OPTIONS DATE (attached) does not produce the date in the output nor saslog.
Many thanks for any hints!
10-29-2017 02:14 PM
SAS already writes the starting time at the top of the log.
You could just add up the times for the previous steps if you really needed to figure out when a particular one started.
Otherwise use your method to add you own notes to the log.
10-29-2017 03:59 PM
10-29-2017 04:48 PM
Line 1 in the SAS log should show the start time BUT it's always the time when SAS got invoked. So that works nicely for batch jobs but doesn't give you a lot of useful information for other modes of running SAS.
You method looks good to me.