Good afternoon
I have a library and there are tables, how can I find out the table size in sas guide or sas console?
PROC CONTENTS will tell you the size,both in terms of observation numbers and physical file size.
You can also query DICTIONARY.TABLES in PROC SQL.
You misunderstood, I want know size table in the library. How I can use the SQL? Could you write example
If I misunderstood you, write a more clear and detailed question.
I want to know table size in library.Maybe you know how check table size.
I already answered this. For more detailed information, you MUST ask a more clear and detailed question. Terse one-liners don't cut it.
As already suggested you can use Proc SQL together with a dictionary table to get back this information.
See this code for an example. Beside the filesize some additional columns are shown, see Accessing SAS Information By Using DICTIONARY Tables for more details. It also shows an example for using the the SIZEKMG format.
%let libref = sashelp;
proc sql;
create table tableSizes as
select
libname, memname, memtype, memlabel, nobs, nlobs, nvar, num_character, num_numeric,
filesize, filesize as filesizekmg format=sizekmg16.1
from
dictionary.tables
where
libname = "%upcase(&libref)"
order by
filesize desc
;
quit;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.