BookmarkSubscribeRSS Feed
Tushar
Obsidian | Level 7

Hi Everyone,

I have one question like we can list out the sas dataset their location and as well as library using SAS dictionary object, but would it possible to list all program which are calling perticular library? Like suppose i have library TEST in which 10 dataset is there, so can i get list of .sas file in which my dataset present in that libary is getting called? Also same about autocall library for macro, can we list all .sas program based on the autocall library ? imean if we just have a library name? Please Assist me for the same. Thanks in Advanced.

Regards,

Tushar Jagtap.

6 REPLIES 6
LinusH
Tourmaline | Level 20

If you are using Base to create those .sas files, there are no out-of-the-box tool in SAS for this. One SAS tool that can get you half way is the SAS code analyzer.

Basic OS tools may help, such as grep (UNIX) and FindStr (Windows).

You could if you like create some SAS program that reads through all SAS-programs.

Either way, it could be quite complex. If your lucky you can find some sample on the Internet.

Data never sleeps
Tushar
Obsidian | Level 7

Thanks LinusH for your quick reply.

Basically as per my requirement i found this similar functionality in SAS DI that is what we called Impact Analysis. So basically what i was doing to implement the same using BASE SAS Code. but its look like i need to write some SAS-Unix wrapper programming. Initially i had the same thought in my mind using some OS specific functionality. Then i thought before implement lets throw this discussion on SAS community portal, looking for wether any Proc present in Base SAS for implementing kind of funcitonality. Anyway Thanks a lot again. Smiley Happy

Regrads,

Tushar J.

LinusH
Tourmaline | Level 20

If your SAS programs are running in batch, consider to import them to DI Studio, and then you could make use of the Analyze capabilities there (for this, the SAS Code Importer usually works fine).

Data never sleeps
Tushar
Obsidian | Level 7

Thanks LinusH,

I will try that option too...

Regards,

Tushar J

Amarnath7
Fluorite | Level 6

Hi,

you can make use of dopen, dnum & dread functions if you do not want use OS commands

Tushar
Obsidian | Level 7

Hey Amarnath7,

Thanks for your suggestion. I will try to implement that option too.

Regards,

Tushar J

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
  • 6 replies
  • 1200 views
  • 3 likes
  • 3 in conversation