SAS Metadata dictionary tables

  • Metadata is description or definition of data or information

  • SAS Sessions metadata is stored in dictionary tables, which contain information about SAS libraries, datasets, macros, formats, external files, views, catalogues, titles etc. which have been registered to the current session

  • Those dictionary tables are presented in the form of read only tables

  • Using PROC SQL we can retrive the inforamtion as following

Sample SAS Code

PROC SQL;

select name into : columnList separated by ' ' from DICTIONARY.COLUMNS where upcase(memname) = 'OVERALL2' and upcase(libname) = 'WORK' and upcase(name) like "______20__" order by name ;

quit;

    • Various types of dictionay tables available are DICTIONARY.TABLES, DICTIONARY.COLUMNS, DICTIONARY.CATALOUGES, DICTIONARY.VIEWS, DICTIONARY.FORMATS etc.

  • We can alternatively use SASHELP library as an alternative to dictionary table.Here the same information is saved in the form of read only views. So we can use this information in data step as well while information in dictionary tables can be retrieved only using PROC SQL.