Hi,
Before I start coding, I was wondering if any users have any existing code / macros that can read a SAS log, and list the input datasets that are used by that code? The logs exist as individual text files, but the reading and looping round is all fine, I'm after any logic / code that can extract the names of the input datasets from data steps, procs and sql statements etc.
Thanks!
I would imagine a lot of us have log check programs, however these are proprietary to our jobs. Reading and extracting things from the log is not quite as straight forward as you think it is. Does you code contain macros or other generated code? What about modifications to files outside datasteps. Several connotations. I would question why you need to do this in the first place, is it for some kind of validation effort (which is what these types of questions come up as), if so then I would say you working from the wrong end. A properly validated (or QC'd) system/process, can only be achieved by planning up front, documenting, then develpoment and testing. Doing things the other way round doesn't actually prove anything at all other than something actually happens.
Search for log parsers on lexjansen.com
PROC SCAPROC.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.