BookmarkSubscribeRSS Feed
ren2010
Obsidian | Level 7
Hi ,

I have a library that has, say for example 'n' number of sas datasets.Is there any way I can get the exact count of the sas data sets in the library.

Please help.

Ren
6 REPLIES 6
Cynthia_sas
SAS Super FREQ
Hi:
There have been a LOT of previous forum postings on the use of DICTIONARY.TABLES or the "dictionary" information that is maintained by SAS. Another "view" of the dictionary files are the SASHELP.Vxxx files -- SASHELP.VCOLUMNS, SASHELP.VTABLES, etc.
There are also a lot of user group papers on these topics with very good examples about how to use the meta-information in these files to help you manage your libraries and write data-driven programs.
I recommend that you search the forum postings on the terms
dictionary.tables or sashelp tables

and you should find some useful hits.

cynthia
ren2010
Obsidian | Level 7
I tried the following but NO ROWS SELECTED

proc sql;

select *
from dictionary.tables
where upcase(libname)='aa';
quit;

aa is my library where I have 'n' number of sas datasets.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Check your WHERE clause - you UPCASE the variable but you specify a lower-case constant value..... Also, your code presumes you have a prior LIBNAME defined with a libref of "AA".

Scott Barry
SBBWorks, Inc.
ren2010
Obsidian | Level 7
I tried the following,still did not work,says NO ROWS SELECTED

libname Aa 'O:\nnb_O\roms\quarter';
proc sql;

select *
from dictionary.tables
where libname='Aa';
quit;
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Suggest you desk-check the program by removing the WHERE.

Scott Barry
SBBWorks, Inc.
Doc_Duke
Rhodochrosite | Level 12
LIBNAMES are stored internally to SAS as UPPER CASE. So Aa, aa, and AA are all the same library, AA. See the note in your log.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 721 views
  • 0 likes
  • 4 in conversation