BookmarkSubscribeRSS Feed
Satora_In
Quartz | Level 8
Good afternoon
I have a library and there are tables, how can I find out the table size in sas guide or sas console?
6 REPLIES 6
Satora_In
Quartz | Level 8

You misunderstood, I want know size table in the library. How I can use the SQL? Could you write example

Satora_In
Quartz | Level 8

I want to know table size in library.Maybe you know how check table size.

BrunoMueller
SAS Super FREQ

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;

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


Register now!

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 6 replies
  • 1526 views
  • 0 likes
  • 3 in conversation