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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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