BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Angel_Saenz
Quartz | Level 8

I need a list of all datasets in a library but showing number of observations of each one

Like:

proc datasets library=libname;

run;

But showing the number of observations of all datasets.

Do you know if exists a proc for that?

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20


data list;
set sashelp.vtable;
where libname='WORK';
keep memname nobs;
run;

proc print noobs;run;

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Use PROC CONTENTS

 

proc contents data=_all_ details;
run;
--
Paige Miller
novinosrin
Tourmaline | Level 20


data list;
set sashelp.vtable;
where libname='WORK';
keep memname nobs;
run;

proc print noobs;run;
Jagadishkatam
Amethyst | Level 16

alternatively with proc sql,

 

dictionary tables

 

proc sql;
create table want as select memname, nobs from dictionary.tables where libname='SASHELP';
quit;
Thanks,
Jag

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 3297 views
  • 1 like
  • 4 in conversation