BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Nehcour0420
Calcite | Level 5

Hi there,

I am trying to get SAS print out a list of all libraries that are visible in EG. After Googling  around, I found that most of the articles are about output the datasets within certain libraries but not the list of the libraries. (I have access to EG, DI Studio and SAS MC)

Any thoughts?

Thanks,

Eric

1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

libname _all_ list;

dictionary.libnames accessible from proc sql (or sashelp.vlibnam from other SAS programs).

Data never sleeps

View solution in original post

7 REPLIES 7
LinusH
Tourmaline | Level 20

libname _all_ list;

dictionary.libnames accessible from proc sql (or sashelp.vlibnam from other SAS programs).

Data never sleeps
Nehcour0420
Calcite | Level 5

Thanks Linus, that's very helpful!

twocanbazza
Quartz | Level 8

FYI

I think that the above suggestion will only list the Libraries that are assigned in EG, however there may be some that are visable although not assigned - non-preassigned metadata libraries (These libraries are still visible from EG Smiley Happy )

Nehcour0420
Calcite | Level 5

Thanks Barry, I have noticed that as well. Just wondering if you know there is any way to resolve that?

Eric

AnnaBrown
Community Manager

Hello Eric,

I've cross-posted this to the SAS Macro Facility, Data Step and SAS Language Elements community in case anyone has input on this.

Anna


Join us for SAS Community Trivia
SAS Bowl XXIX, The SAS Hackathon
Wednesday, March 8, 2023, at 10 AM ET | #SASBowl

Patrick
Opal | Level 21

The not pre-assigned libraries are the ones which are only defined in SAS Metadata. The libname statement hasn't been executed yet on the compute tier (eg. the workspace server).

The only way of retrieving such library definitions is by querying metadata. SAS(R) 9.3 Language Interfaces to Metadata, either by using Proc Metadata or the metadata specific data step functions.

twocanbazza
Quartz | Level 8

Hi Stumbled on this and thought it may help.  I believe it provides the answer you need (although the document has been mentioned here, here is the specific link I think)

SAS(R) 9.3 Language Interfaces to Metadata

Barry

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 connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 21173 views
  • 5 likes
  • 5 in conversation