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

Hi,

I have a model in sas and wondering is there any way we can find Average run time for any sas code/model?

Can you please let me know.

Thanks,

Sunil Jadhav

1 ACCEPTED SOLUTION

Accepted Solutions
OS2Rules
Obsidian | Level 7

You need to read the log file that you create and find all the run times for each data step or proc.  I'm sure a Google

search or a check of Lex's site will provide you with examples of SAS programs that parse the log.

View solution in original post

7 REPLIES 7
OS2Rules
Obsidian | Level 7

Hi:

There are a lot of factors involved in this - are you running in batch or interactive?  PC, Server, or mainframe?  If you are running

in batch, how do you submit the job?  Do you want figures for the entire job or for each data/proc step?

Firstly, turn on FULLSTIMER option.  You will have to capture the values from the LOG and keep them somewhere to later

calculate the averages.  If you are running batch, you can capture the start and end times of the job and use them the same way.

You can also capture the log by writing it to a file to later extract the timing for each data set or procedure.

Either way - you have to calculate the average yourself (or set up another SAS program to do it for you).

Some systems (like AutoSys and CA7) automatically keep average run times, but that is at the job level only.

SunilJ
Fluorite | Level 6

Hi,

Code is running on PC server and no batch is involved. I want for entier job.

I have only copy of SAS code and log, but i am not authorised to run the code or make any changes in the code to uput option "FILLSTIMER".

Thanks

OS2Rules
Obsidian | Level 7

SunilJ:

If you are running interactively, you can save the log to a file when the job is complete.  Then you can write a small SAS job that

will read the log files you have saved and calculate your averages for you.

SunilJ
Fluorite | Level 6

Oh great, but what sas job do i need to write.

OS2Rules
Obsidian | Level 7

You need to read the log file that you create and find all the run times for each data step or proc.  I'm sure a Google

search or a check of Lex's site will provide you with examples of SAS programs that parse the log.

SunilJ
Fluorite | Level 6

Perfect, I got it resolved. Thanks for your help.

Sunil

OS2Rules
Obsidian | Level 7

You're welcome.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 7 replies
  • 10069 views
  • 0 likes
  • 2 in conversation