DATA Step, Macro, Functions and more

Number of records in for each dataset available in a metadata sas library

Reply
Contributor
Posts: 20

Number of records in for each dataset available in a metadata sas library

I am working with some of the tables which are basically somewhere in Oracle and SAS have the metadata library. If I want to check the number of records in all these tables in SAS. How can I do that?

Contributor
Posts: 49

Re: Number of records in for each dataset available in a metadata sas library

do it like this 

 

proc sql;
create table table_name as select memname,nobs from dictionary.tables
where libname='/*your library name*/';
quit;

Contributor
Posts: 20

Re: Number of records in for each dataset available in a metadata sas library

Posted in reply to soham_sas

This is giving me a blank value.

 

memnamenobs
Table 1.
Table 2.
Table 3.
Table 4.
Contributor
Posts: 49

Re: Number of records in for each dataset available in a metadata sas library

please share your log details , the code is working for me
Valued Guide
Posts: 585

Re: Number of records in for each dataset available in a metadata sas library

Have a look at sashelp.vtable, the view contains metadata of all datasets in assigned libraries.

Contributor
Posts: 20

Re: Number of records in for each dataset available in a metadata sas library

Posted in reply to andreas_lds

Value is (.)  for metadata tables.

Valued Guide
Posts: 585

Re: Number of records in for each dataset available in a metadata sas library


@Srigyan wrote:

Value is (.)  for metadata tables.


For all metadata-tables or only those using tables in oracle?

Super User
Posts: 5,890

Re: Number of records in for each dataset available in a metadata sas library

No of records is not available in SAS for external data sources. You need to query Oracle for that information.
Data never sleeps
Ask a Question
Discussion stats
  • 7 replies
  • 92 views
  • 0 likes
  • 4 in conversation