How to find run time of any sas code

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

How to find run time of any sas code

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


Accepted Solutions
Solution
‎11-21-2014 02:41 PM
Super Contributor
Posts: 358

Re: How to find run time of any sas code

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


All Replies
Super Contributor
Posts: 358

Re: How to find run time of any sas code

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.

Occasional Contributor
Posts: 15

Re: How to find run time of any sas code

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

Super Contributor
Posts: 358

Re: How to find run time of any sas code

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.

Occasional Contributor
Posts: 15

Re: How to find run time of any sas code

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

Solution
‎11-21-2014 02:41 PM
Super Contributor
Posts: 358

Re: How to find run time of any sas code

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.

Occasional Contributor
Posts: 15

Re: How to find run time of any sas code

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

Sunil

Super Contributor
Posts: 358

Re: How to find run time of any sas code

You're welcome.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 278 views
  • 0 likes
  • 2 in conversation