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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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