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
libname _all_ list;
dictionary.libnames accessible from proc sql (or sashelp.vlibnam from other SAS programs).
libname _all_ list;
dictionary.libnames accessible from proc sql (or sashelp.vlibnam from other SAS programs).
Thanks Linus, that's very helpful!
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 )
Thanks Barry, I have noticed that as well. Just wondering if you know there is any way to resolve that?
Eric
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
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.
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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.