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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2129 views
  • 0 likes
  • 3 in conversation