BookmarkSubscribeRSS Feed
vickys
Obsidian | Level 7

Hi Experts,

 I am trying to extract some of the Libraries and all their datasets  by the following query.

I ran this query in EG and can see only few libraries are listed , but when I check in SAS DI there are so many libraries.

 

How to get all those libraries that I see in SAS DI and I need to write that Macro so that I can enter required lib name in the Macro

 

proc SQL;
select
*
from
dictionary.members where libname in ('...')
;
quit;

 

Appreciate your inputs.

 

Thanks,

Vicks

1 REPLY 1
jimbarbour
Meteorite | Level 14

Generally speaking, a Libname has to be allocated in your SAS session for you to know what datasets are in the library.  I'm not familiar with DI, but somewhere there has to be a mechanism for DI to allocate the libraries that you're seeing.  It may be a config file.  I would talk to your DI administrator and ask about such a config file.  If you can then format that config file such that it has valid SAS statements, then you can save the results in a text file with a .sas ending.  You would then %INCLUDE that file into a program in EG or you can set up EG have code run automatically whenever you open an EG session.  When the %INCLUDE brings in the code, all those Libnames will be available to your EG session, and then you can query against the dictionary tables to your heart's content.

 

Jim

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1 reply
  • 595 views
  • 2 likes
  • 2 in conversation