BookmarkSubscribeRSS Feed
bollurajkumar
Fluorite | Level 6
Hi all,
I created a library and I add some datasets.
I want to check number of datasets in the created library and
Which one added recently (if it is possible)
Thanks in advance
3 REPLIES 3
Reeza
Super User

You can check the sashelp.vtable data set or run the following code to get a report.

 

proc datasets lib=sashelp;
run;

@bollurajkumar wrote:
Hi all,
I created a library and I add some datasets.
I want to check number of datasets in the created library and
Which one added recently (if it is possible)
Thanks in advance

 

novinosrin
Tourmaline | Level 20
proc sql;
select count(memname) as no_of_datasets
from
dictionary.tables 
where libname='YOUR_LIBRARYNAME';
quit;

proc sql;
select memname ,crdate
from
dictionary.tables 
having libname='YOUR_LIBRARYNAME'
order by crdate desc; 
quit;
kiranv_
Rhodochrosite | Level 12

you can use dictionary.tables as suggested by @Reeza. crdate is create date. use your libname instead of sashelp

 

proc sql;
select memname, crdate from dictionary.tables
where upcase(libname) ='SASHELP'
order by crdate desc;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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