Hello,
It is possible to reroute the sas log using this statement.
proc printto log='alternate-log-file' new;
run;
But by doing that, in SAS EG, we are loosing the log into the various tabs.
Is there a way to keek the log in SAS EG as it is and to make a copy of it somewhere else for documentation per say.
See the approaches in this thread: https://communities.sas.com/t5/SAS-Programming/Print-the-same-SAS-Log-to-BOTH-the-log-window-and-ext...
Hi,
You can try using the ALTLOG System Option; from the documentation:
Specifies a location to write a copy of the SAS log.
Valid in: | Configuration file, SAS command, SASV9_OPTIONS environment variable |
Category: | Environment Control: Files |
PROC OPTIONS GROUP= | ENVFILES, LOGCONTROL |
Default: | None |
Note: | This option cannot be restricted by a site administrator. For more information, see Restricted Options. |
Thanks & kind regards,
Amir.
Alternatively, you can use the built-in Project Log feature w/o the need for adding any coding.
The Project Log feature can keep a running log for each project including the logs created for your code as well as the logs created by EG tasks.
Tools > Options > Project and Process Flows > then select "Enable project log for new projects" > OK to close/save.
This will add a "Project Log" tab from which you can choose
Share > Export (or Export as a Step) based on when you want to write the Project Log to disk.
Regards,
Bill
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.