BookmarkSubscribeRSS Feed
bbieber
Fluorite | Level 6

I would like to automatically save the overall project log for a SAS EG project to the folder in which the project is saved. 

 

I can obviously point and click my way to the folder when exporting the log, but I would like to avoid these steps. I also have parallel execution of several programs so I cannot simply output the log for each program to the same file (i.e. proc printto log = "&path.\projectLog.log"; run;) 

4 REPLIES 4
Quentin
Super User

If you want one log for program. you could do something like:

proc printto log = "&path.\&program..log";
run;

I think EG might create an automatic macro variable similar to &program with the name of the current program.  If not, there are ways find out.

 

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in March 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
bbieber
Fluorite | Level 6

This solution does not solve my problem - i.e. there are multiple programs running in parallel so printing to the same log file within each proc printto fails.

andreas_lds
Jade | Level 19

The variable &_ClientProjectPath has the name of the egp including full path, enclosed in single quotes. To get the path only, you can use something like:

data _null_;
   path = substr(&_ClientProjectPath, 1, findc(&_ClientProjectPath, '/\', 1, 'b') -1);
   call symputx('cpp', path);
run;
bbieber
Fluorite | Level 6

This is helpful as the first step, but I still can't figure out how to programmatically access the project log. Right now I right click on the last program in the process flow, choose "Share" . . . "Export as  a step in the project", choose the "Project Log", and then manually point and click to the desired save location. I would like to just have a program I could place at the end of a process flow to save off the log.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 1278 views
  • 0 likes
  • 3 in conversation