Christoffer
Christoffer

Reputation: 346

SAS Enterprise-guide run time acummulated instead of individual process time

How do I show get the run time for the whole SAS project instead of the individual process run times? : Run Time example

Would it possible to store the run times, so I can make statistics on how the job performs over time?

I hope you can point me in the right direction.

#Update: Maybe my issue with @kermit solution is how my process is structured: Project structure

Upvotes: 0

Views: 656

Answers (1)

Kermit
Kermit

Reputation: 3117

Let's say you have the following SAS project

                         enter image description here

The first step would be to create the an empty log sas table in a pre-defined library.

data lib.log;
length date 8. run_time 8.;
format date datetime17. run_time time8.;
stop;
run;

What I would do now is adding a program (START.sas) before the first program and one after the very last program/export job (END.sas) to run in the process flow.

             enter image description here

START.sas

libname lib "<path-to-your-folder>"
%let run_start = %sysfunc(time());

END.sas

%let run_end = %sysfunc(time());

proc sql;
insert into lib.log
values(%sysfunc(datetime()), %sysevalf(&run_end.-&run_start.))
;
quit;

With that, you only need to right-click on the start program and select Run from selected item and it will insert the date and run time into the log table at the end of the execution of your project.

                                                  enter image description here

Upvotes: 3

Related Questions