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 up: Joe Madden & Joseph Henry present Putting Power into the Hands of the Programmer with SAS Viya Workbench on Wednesday Nov 6.
Register now at https://www.basug.org/events.
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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1013 views
  • 0 likes
  • 3 in conversation