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 ?
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.
May want option Fullstimer with Stimer set when creating the log.
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.
I suggest you check out PROC SCAPROC
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: