BookmarkSubscribeRSS Feed
japsas100
Pyrite | Level 9

Hi Guys,

 

Just wanted to check is there is fastest way to list down all the sas datasets name from number of logs stored in log directory.

 

My task is to find datasets name from thousand of sas logs.

 

 

Any one has sas prog to do the same teask?

 

 

Regards

Japs

5 REPLIES 5
DMIN
Fluorite | Level 6

It seems you'd better write shell scripting codes to capture these file names. 

japsas100
Pyrite | Level 9

Can anyone share the shell script?

DMIN
Fluorite | Level 6
Dataset names are either in work library or in permanent libraries, so their names should be identified by following work or other library names when creating shellscripts. Unfortunately, i don't have the scripts at hand. Hopefully other guys can help.
Reeza
Super User
Search lexjansen.com or on here with the term 'log parsing' and you'll find examples. They definitely exist.
Tom
Super User Tom
Super User

You want to scan SAS logs and see what dataset names were used?

You can get a pretty good hit rated by just searching for the NOTE lines that SAS normally writes.

Start with this and perhaps fine tune it more as you see what messages it finds.

grep '^NOTE:.* data set ' *.log

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 5 replies
  • 853 views
  • 2 likes
  • 4 in conversation