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
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
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.
Ready to level-up your skills? Choose your own adventure.