|
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
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|