BookmarkSubscribeRSS Feed
mediaeval
Calcite | Level 5

Is there an efficient way to examine the Log and see what data steps and procs are taking a long time? "Long time" for me means more than 60 seconds. My program is a couple of thousand of lines long, is run several times a day as I'm still in test phase, and it would be great if there were a way to go through it quickly to see what's taking the longest. My initial thought was to manually search for the word "minutes" in the log, but SAS reports data steps in seconds, e.g. "Data statement used ... real time 2:34.37" meaning two minutes and 34.37 seconds. It doesn't mention the word "seconds" if it takes longer than a minute.

Thanks everyone,

Joe

3 REPLIES 3
UrvishShah
Fluorite | Level 6

Hi,

I have prepared one SAS Code for it...It is saved in my laptop...but what i can suggest you ri8 nw is like you can directly see the execution time by using following code...

%let o_time = %sysfunc(datetime());

/*--------------------------------------*/

YOUR SAS PROGRAMME

/*--------------------------------------*/

%let n_time = %sysfunc(datetime());

/*calculation of Total Execution Time*/
%let diff_T = %sysevalf(&n_time - &o_time);

%put "Total Execution Time is:";
%put "Total Execution Time"
     %sysfunc(putn(%sysevalf(&n_time - &o_time), time8.));

-Urvish

Quentin
Super User

Hi,

Consider using a log parsing program to read this data from the log, and then report on it.  For example, http://www2.sas.com/proceedings/sugi30/219-30.pdf .

HTH,

--Q.

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.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 981 views
  • 1 like
  • 4 in conversation