- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You declared: "The log I have prints the run time for each iteration."
Did you "print" it into a file? what kind of file? Can you post a sample of that file ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
They weren't short or simple. They (probably) wouldn't help with custom message for each "iteration" .. but we are all sas programmers...
If these iterations are in one data step, the step should give the step elapse time in log.
So please let us see the messages you want totalled.
For the next time?, recommend liberal use of
%put INFO: at %put %sysfunc( now(), datetime17.2) ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks autocorrect
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Are you aware of PROC PRINTTO? You didn't mention if you were able to send your log to a file yet. Well if you already know, this should help the person using this article in the furture.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
May want option Fullstimer with Stimer set when creating the log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I usually scan for lines that with MPRINT(... so I can see what macro is running.
If you are asking for the timing from data steps or proc steps then I normally also scan for DATA ... or PROC ... and remember.
Or scan for the NOTE: lines that say how many observations and variables were written.
You can use RETAIN to keep the dataset name or macro name and then search for and read the lines with the timing information. I seem to remember you need to use STIMER informat to read the times. Or perhaps count the numbers colons and prefix the string with enough extra '00:' so the seconds don't become hours.
In terms of counting the loops if there is not a distinct dataset name for each loop then look for some distinct line in the log you can use to detect when a new loop starts and increment a counter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I suggest you check out PROC SCAPROC