BookmarkSubscribeRSS Feed
alepage
Barite | Level 11

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.

3 REPLIES 3
Quentin
Super User

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...

 

The Boston Area SAS Users Group is hosting free webinars!
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
Amir
PROC Star

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.

BillSawyer
SAS Employee

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

 

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 170 views
  • 1 like
  • 4 in conversation
OSZAR »