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 (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info 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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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