As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Dictionary.Dictionaries listing

From sasCommunity
Jump to: navigation, search

This page is Bricolage.

Q: How can I see all the SQL dictionaries?

A: write describe table statements for each dictionary.

  1. review data structure: describe table
  2. review data: select distinct
  3. select text
  4. report

harvested from SAS-L:

Author: Ronald_J._Fehd

Program.1 build up

PROC SQL; describe table dictionary.dictionaries;
 
          select distinct Memname
            from Dictionary.Dictionaries;
 
          create table List_Dictionaries as
          select distinct Memname
            from Dictionary.Dictionaries;
 
          select 'describe table dictionary.'
                , Memname
            from List_Dictionaries;
 
          select 'describe table dictionary.'
              !!  Memname
              !! ';'
            from List_Dictionaries;
          quit;

Program.2

AutoMagic: write describe table statements for all dictionaries.

PROC SQL noprint;
 
         create table List as
         select distinct Memname
           from Dictionary.Dictionaries;
 
         select    'describe table dictionary.'
                !!  Memname
                !! ';'
           into :List separated by ' '
           from List;
 
         &List.  
 
         quit;

... and: one statement:

PROC SQL; select distinct Memname as unique_Memname
                ,'describe table dictionary.'
                 !! calculated unique_Memname
            into :List_Memnames separated by ' '
                ,:List_describe separated by ';'
            from Dictionary.Dictionaries;
 
          &List_describe.  
 
          quit;

... and: one statement, v2:

PROC SQL noprint; 
         select distinct(  'describe table dictionary.'
                          !! trim(Memname)
                          !! ';' 
                         )
         into :List_describe separated by ' '
         from Dictionary.Dictionaries;
 
         &List_describe.  
 
         quit;

References

  • todo

--Ronald_J._Fehd macro.maven == the radical programmer 08:53, 16 May 2012 (EDT)