BookmarkSubscribeRSS Feed
HM3
Calcite | Level 5 HM3
Calcite | Level 5
When a statement is submitted, I want to include Real time or CPU time in the footnote.How to go about it?
9 REPLIES 9
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You can use the SAS system option ALTLOG to capture a copy of the SAS log output to a file, and specify the FULLSTIMER option to reveal detailed statistics in the log. Then use a DATA step to parse the ALTLOG file, capturing the desired metrics. And lastly you will need to generate SAS macro variable(s) containing these SAS execution metrics.

Scott Barry
SBBWorks, Inc.
Peter_C
Rhodochrosite | Level 12
Scott
are you able to open the altlog (to parse it) before the session closesp
data_null__
Jade | Level 19
It appears that you cannot.

[pre]
40 data _null_;
41 infile "%sysfunc(getoption(altlog))";
42 input;
43 list;
44 run;

ERROR: File is in use, C:\Documents and Settings\datanull\My Documents\My SAS Files\9.1\ALT.log.
NOTE: The SAS System stopped processing this step because of errors.
[/pre]

Then there is our old friend PROC PRINTTO.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
data _null_ is correct - disregard my post-reply about using ALTLOG - that is if you want to parse the current session's log.

Scott Barry
SBBWorks, Inc.
HM3
Calcite | Level 5 HM3
Calcite | Level 5
Please share the script
Peter_C
Rhodochrosite | Level 12
data null ;
that was my expectation.
I'm surprised Scott neither suggested proc printto, nor the more interesting proc scaproc (which might be able to collect also the cpu times iirc - if you have sas92)
Peter_C
Rhodochrosite | Level 12
sorry about my wishful thinking
apparently proc scaproc reports elapse time, not CPU
HM3
Calcite | Level 5 HM3
Calcite | Level 5
can u send me the script?
Peter_C
Rhodochrosite | Level 12
to what script do you refer

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 9 replies
  • 1012 views
  • 0 likes
  • 4 in conversation