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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 21339 views
  • 5 likes
  • 5 in conversation