BookmarkSubscribeRSS Feed
Quartz | Level 8

Hi all,

I searched the forum and found a solution, but I don't understand what any of the commands mean so I'm unable to modify it to get it to do what I need.

proc sql;
 select memname, filesize format=sizekmg10.1
   from dictionary.tables
   where libname='SASHELP' and memtype='DATA';

  This solution gives me a list of random tables I don't recognize and does not include any of the tables that I need to know the sizes of.


Tourmaline | Level 20

Hi @BarryP  Do you mean to say you want to query tables sizes in the library that is of your interest and not SASHELP?


If yes, wouldn't you be stating the libname of your interest i.e


where libname='YOUR_LIBNAME' and memtype='DATA';


Basically, Dictionary tables is akin to metadata(data about data) that contains information about various libraries, tables, columns, etc etc. In other words Dictionaries are data definitions. Therefore the need for you is perhaps query the library(schema) of your interest 

Quartz | Level 8

Would I insert the libname statement in place of YouR_Libmname?  I assume?

Quartz | Level 8



I can do this with basic Libnames, like SASHELP and WORK but other's are not working.  Specifically a name like, 'HEARTDS - DI Work (ABXY_HEARTDS_0_1_0_0_0_0_0_0)' is not returning any results.  

Tourmaline | Level 20

You will need to identify the correct library reference name for the query to work. A library reference is name that has a maximum of 8 bytes with 1 char=1 byte. The name can begin only with a letter or an underscore followed by numbers or chars 


Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2 in conversation