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.

 

BASUG is hosting free webinars ! Check out recordings of our past webinars: https://www.basug.org/videos. Save the date for our in person SAS Blowout on Oct 18 in Cambridge, MA. Registration opens in September.
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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 796 views
  • 0 likes
  • 3 in conversation