BookmarkSubscribeRSS Feed
BarryP
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';
quit;

  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.

Thanks! 

4 REPLIES 4
novinosrin
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 

BarryP
Quartz | Level 8

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

BarryP
Quartz | Level 8

@novinosrin 

Okay,

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.  

novinosrin
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 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 5184 views
  • 0 likes
  • 2 in conversation