BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sdennett
Fluorite | Level 6

I'm working on a log analysis program (based on the LOGPARSE macro) for my team.  We use EG, which helpfully inserts some macro code at the beginning and end of tasks which can be used to identify process flow and task labels.  However, I'm running into a weird problem, specifically when PROC DATASETS is used as the last code submitted in a program node. 


If PROC DATASETS is the last code submitted, the timing results come back after the macro code injected at the end of the program.  This does not happen if, say, a data step or a proc sort is the last code submitted. This is tripping me up when parsing the log as the i'm using the %LET _CLIENTTASKLABEL part of the log to determine the associated task node, but it's being reset to blank before I can get the timing info.

 

I've attached sample code and log files so you can see what I'm talking about.  The ones labeled Program_1 work as expected (with a data step as the last submitted code), and the ones labeled Program_2 do not work as expected (with a PROC DATASETS as the last submitted code).

 

I'd greatly appreciate if anyone has any insight as to why the log behaves in this way, or suggestions for how to get the timing info to show up before the macro variables get reset.

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
sdennett
Fluorite | Level 6

Here are the log files, which did get uploaded for some reason.

Kurt_Bremser
Super User

See Maxim 1.

proc datasets supports run blocks (a run does not terminate it), and stays active until a new procedure or data step starts, or a quit statement is issued.

sdennett
Fluorite | Level 6

Aha!  Thank you, using a quit statement instead of run solved it!

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
  • 3 replies
  • 1384 views
  • 2 likes
  • 2 in conversation