LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 1999, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 3 Dec 1999 14:30:58 -0700
Reply-To:   Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:   (MVS): Re:Dictionary Tables
Content-Type:   text/plain; charset=us-ascii

If you're interested in the SASHELP views of dictionary tables rather than the tables themselves, you can use this code, which dynamically generates the needed DESCRIVE VIEW statements:

---------- proc sql;

reset noprint;

select 'describe view sashelp.' || memname || ';' into :SHOVIEWS separated by ' ' from dictionary.views where libname = 'SASHELP';

reset print;

&SHOVIEWS;

quit; ----------

The advantage of this method is that it automatically finds new views when they are added. By looking through the output, you can get the names of the underlying dictionary tables.

-- JackHamilton@FirstHealth.com Development Manager, Technical Group METRICS Department, First Health West Sacramento, California USA

>>> "RAITHEM" <RAITHEM@WESTAT.COM> 12/03/1999 7:41 am >>> In a thread that is now colder than the remains of the Endurance (--a stretch, but I am going to a lecture on Shackleton's legendary odyssey at National Geographic headquarters tonight, so...), Deborah A. Testa asked the following:

>Can someone tell me where the contents of the dictionary tables are >documented? I've used these tables before by imitating the syntax of >others, but am now in need of knowing the extent of what's available there. >My immediate need is how to obtain the physical path assigned to a libref. >

Deborah, I saw that you got a few good answers on this one, particularly the one that pointed you at the relevant section of Technical Report P-222. I thought that I would just share the code that lists out the "contents" of the Dictionary tables. It might come in handy for those who (unbelievably enough) do not have THE Technical report.

By executing the following on the SAS System under any post SAS V6.06 release (V6.07, V6.09, V6.12, etc., V7, V8), you can get a description of the specific Dictionary table that you are interested in:

proc sql; describe table dictionary.catalogs; describe table dictionary.columns; describe table dictionary.extfiles; describe table dictionary.indexes; describe table dictionary.members; describe table dictionary.options; describe table dictionary.tables; describe table dictionary.views; quit;

By cutting and pasting the code, above, into an interactive SAS session, and then executing it, you will get a great look at the characteristics of each column in each dictionary table. The listing will be printed in your SAS Log.

Deborah, best of luck using the Dictionary tables; they are a _GREAT_ , low-cost source of metadata that can be exploited within your SAS programs!

I hope that this explanation proves helpful now, and in the future!

Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Michael A. Raithel, Westat E-mail: raithem@westat.com Author: Tuning SAS Applications in the MVS Environment ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Have the courage to act instead of react. -- Earlene Larson Jenks ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Back to: Top of message | Previous page | Main SAS-L page