As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
Tips Talk:Adding a date and time stamp message to the SAS Log
The timestamp info could be provided in a log without executing any step, with code like
%put as at %now;
where %now is a macro defined as simply as
%macro now( fmt=datetime21.2) /des='timestamp'; %do;%sysfunc( datetime(), &fmt )%end; %mend now ;
That macro could be extended to eliminate almost all macro debugging info like symbolgen - but that should be subject for another tip.
In recent releases (9.2+?), option FULLSTIMER adds a timestamp among end-of-step notes, too
Good Tip, but wouldn't it be more useful to suggest running the macro as part of, say, one's autoexec.sas? --Art T 19:04, 5 February 2014 (CST)
Agree with Art. And I am not sure why it even needs to be a macro (which then requires that the autoexec points to the macro lib. Just an open code %put statement like the following should suffice:
%put Job Started Execution at %sysfunc(time(),timeampm.) on %sysfunc(date(),worddate.).;
I had already rated this as a good tip back in February, 2014 --Art T 10:27, 18 December 2014 (CST)
- Since it was changed since you/Peter reviewed, I wanted an OK for the revision. Am assuming, based on your comment, that you still think this is a good tip. So I promoted it to Tip Ready.--Don Henderson (talk) 18:08, 10 January 2015 (CST)