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
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.
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.
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
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.
Oh great, but what sas job do i need to write.
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.
Perfect, I got it resolved. Thanks for your help.
Sunil
You're welcome.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.