Hi,
I have created a Windows Batch file to execute the sas code, I want to append the DateTimestamp to the Log file name. Like "Name:Datetime.Log"
I have created below command in batch file.
"C:\Program Files\SAS\SASFoundation\9.2\sas.exe" -autoexec 'C:\Program Files\autoexec2.sas' -sysin "C:\Program Files\Usage per Channel.sas" -log "C:\Program Filesfile://\\GL1015018\SAS\Usage per Channel.
log"
When I tried to do it using Proc Print to in .SAS code and removed -log command in batch file, batch did not run properly.
Any help would be appreciated.
Thanks,
Nikhil
Did you mean PROC PRINTTO? If not that may be an option if included in the program.
Hi Nikhil,
I ran into this a while ago - might help you, particularly as you're already writing batch files.
http://www.phusewiki.org/docs/2008/PAPERS/CC03.pdf
Hope this helps
Nik
Have a look into the directives for log names in the second half of below link.
This is the far better option. I think you need -logparm "rollover=session" in there for it to work
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.
Find more tutorials on the SAS Users YouTube channel.