04-27-2016 04:24 AM
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.
04-27-2016 04:37 AM
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.
04-27-2016 12:23 PM