Help using Base SAS procedures

List all dataset names in a library

Accepted Solution Solved
Reply
Regular Contributor
Posts: 196
Accepted Solution

List all dataset names in a library

I'm trying to view a list of all dataset names in a library called SAPEng that begin with /BIC/ (the datasets were created in SAP).

Any ideas?

Thank you.


Accepted Solutions
Solution
‎06-12-2014 02:01 PM
Super Contributor
Posts: 333

Re: List all dataset names in a library

You should be able to use SQL and the sas dictionary tables to get what you want.

Proc sql;

     select *

     from sashelp.vmember

     where libname = "SAPEng " and memname like "BIC%"

  ;

quit;

See if that helps.

EJ

View solution in original post


All Replies
Super User
Posts: 17,963

Re: List all dataset names in a library

Look at querying sashelp.vtable or dictionary.table

OR

Proc contents

OR

Proc datasets

Solution
‎06-12-2014 02:01 PM
Super Contributor
Posts: 333

Re: List all dataset names in a library

You should be able to use SQL and the sas dictionary tables to get what you want.

Proc sql;

     select *

     from sashelp.vmember

     where libname = "SAPEng " and memname like "BIC%"

  ;

quit;

See if that helps.

EJ

Super User
Super User
Posts: 6,502

Re: List all dataset names in a library

Note that the value of LIBNAME will always be in uppercase in the dictionary tables.  So you would need

libname = "SAPENG"

🔒 This topic is solved and locked.

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

Discussion stats
  • 3 replies
  • 14461 views
  • 0 likes
  • 4 in conversation