Reputation: 521
I'm trying to create a macro with library name as input and which loops on all the datasets in that library and lists out the dataset name and number of obs in each dataset... Is there any way to get this by querying dictionary?
Upvotes: 2
Views: 339
Reputation: 63434
Number of obs isn't guaranteed to be accurate, but will usually be if you haven't been mucking around with SQL deletes or other things that might not update the metadata.
proc sql;
create table mycols as select * from dictionary.tables where libname="LIBRARYNAME";
quit;
You probably want NOBS, MEMNAME.
Upvotes: 1