07-31-2014 05:38 AM
I am trying to create a dataset with a system date and time as part of the name, but am not winning. Conceptually, I am trying to do something like this :
proc freq data=lib.set1 noprint;
tables book*lastAssignedQueue / out=lib.Freq1_&sysDate._&sysTime (drop=percent);
It is not working because of the ":" in systime. Any suggestions please ?
07-31-2014 06:07 AM
One more thing. The sysdate and systime are related to the date and time I opened the SAS session. Is there any way I can get the real time when the job is submitted ? i.e. the SAS session was opened at 08h00 and I submitted the job at 12h06, but the time I ge from systime is 08h00
07-31-2014 06:34 AM
As far as I know there is no macro variable for time SAS started. You could however put some code in your autoexec.sas file:
call symput('SAS_INIT_TIME',&sysdate._%sysfunc(compress(&systime.,": ")));
Then use that macro variable in you programs.
Need further help from the community? Please ask a new question.