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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4280 views
  • 0 likes
  • 2 in conversation