BookmarkSubscribeRSS Feed
Enio
Fluorite | Level 6

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!

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

Enio
Fluorite | Level 6
Couldn't agree more on the importance of good design! Sadly, as is often the case, we're working with what we have. Appreciate the reply.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1107 views
  • 3 likes
  • 4 in conversation