Hi Guys, I wondered if someone could help me, i want every Base SAS session to output their log to a location If i use the following in the sasV9.cfg file: -ALTLOG "D:\SAS_Logs\%username%.txt It correctly creates me a log with my current username in the location. However as there could be multiple sessions and i don't want them overwriting i wanted to add parameters such as date, time, host name however nothing seems to work inside the cfg file, Both SAS and Windows variables do not work: -ALTLOG "D:\SAS_Logs\%username%_%Y_%m_%d_%H_%M.txt" -ALTLOG "D:\SAS_Logs\%username%_%computername%_%date%_%time%.txt" Can anyone tell me is it possible to use the AltLog with additional parameters? I have made it work by using a .bat file to Launch the SAS application thus: @echo off set dt=%date% set newdate=%dt:~6,4%%dt:~3,2%%dt:~0,2% set mytime=%time% set mytime=%mytime::=% set mytime=%mytime:.=_% set stamp=%newdate%_%mytime%
echo %stamp%
"D:\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "D:\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg" -ALTLOG "D:\SAS_Logs\%username%_%computername%_%stamp%.log" The above works but i would prefer it is native inside the Config File but if not i can use the above, just wondered if i am missing something? EDIT: I tweaked my Batch a bit having read a few articles so I could insert Seconds/MS in to ensure uniqueness. Updated Code above
... View more