09-12-2014 08:24 PM
I am trying to have SAS compute execution time for a stored process which simply includes a SAS program file. I was able to do this with very simple program but when the program was more complex (includes macros, sql junk, etc) I have problems. SAS for some reason does not create a data file? Also, do stored processes have a macro variable defined for execution time that I can access?
Code registered as stored process in metadata follows:
%let startdatetime= %sysfunc(datetime());
%let executeSAStime= %sysfunc(round(%sysevalf(%sysfunc(datetime())-&startdatetime),0.01));
The append program creates a dataset and appends it to a sql database. However, the datastep used does not seem to be making the dataset for the complex program while it does for the simple one. Very confusing.
400 +%put &_METAUSER;
401 +%put &_username;
402 +%put &_program;
403 +%put &startdatetime;
404 +%put &executeSAStime;
405 +%put &rc;
407 +*create dataset;
408 +data newtempfile;
409 +length client username $16. Program $30. datetime exectime rc 8. ;
NOTE: The data set WORK.NEWTEMPFILE has 0 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
09-13-2014 01:56 AM
what you are trying to do is standard part of ARM.
The log4j is a well known interface. APM and Eventmananager are build on top of this. When activated ill you are trying to build is already there.