SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

How to output a list of all libraries in SAS?

Accepted Solution Solved
Reply
Contributor
Posts: 25
Accepted Solution

How to output a list of all libraries in SAS?

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


Accepted Solutions
Solution
‎10-21-2013 10:01 AM
Super User
Posts: 5,256

Re: How to output a list of all libraries in SAS?

libname _all_ list;

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

Data never sleeps

View solution in original post


All Replies
Solution
‎10-21-2013 10:01 AM
Super User
Posts: 5,256

Re: How to output a list of all libraries in SAS?

libname _all_ list;

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

Data never sleeps
Contributor
Posts: 25

Re: How to output a list of all libraries in SAS?

Thanks Linus, that's very helpful!

Super Contributor
Posts: 356

Re: How to output a list of all libraries in SAS?

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 )

Contributor
Posts: 25

Re: How to output a list of all libraries in SAS?

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

Eric

Community Manager
Posts: 486

Re: How to output a list of all libraries in SAS?

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

Respected Advisor
Posts: 3,892

Re: How to output a list of all libraries in SAS?

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.

Super Contributor
Posts: 356

Re: How to output a list of all libraries in SAS?

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 1176 views
  • 1 like
  • 5 in conversation