Accessing SAS System Information By Using
DICTIONARY Tables
What Are DICTIONARY Tables?
DICTIONARY tables are special read-only PROC SQL tables or views. They retrieve
information about all the SAS libraries, SAS data sets, SAS system options, and external
files that are associated with the current SAS session. For example, the
DICTIONARY.Columns table contains information such as name, type, length, and
format, about all columns in all tables that are known to the current SAS session.
PROC SQL automatically assigns the DICTIONARY libref. To get information from
DICTIONARY tables, specify DICTIONARY.table-name in the FROM clause in a
SELECT statement in PROC SQL.
DICTIONARY.table-name is valid in PROC SQL only. However, SAS provides PROC
SQL views, based on the DICTIONARY tables, that can be used in other SAS
procedures and in the DATA step. These views are stored in the Sashelp library and are
commonly called “Sashelp views.”
For an example of a DICTIONARY table, see “Example 6: Reporting from
DICTIONARY Tables” on page 281.
The following table describes the DICTIONARY tables that are available and shows the
associated Sashelp views for each table.
Table 5.1 DICTIONARY Tables and Associated Sashelp Views
DICTIONARY Table
Sashelp
View Description
CATALOGS Vcatalg Contains information about known SAS catalogs.
CHECK_CONSTRAINTS Vchkcon Contains information about known check constraints.
COLUMNS Vcolumn Contains information about columns in all known tables.
CONSTRAINT_COLUMN_USAGE Vcncolu Contains information about columns that are referred to
by integrity constraints.
CONSTRAINT_TABLE_USAGE Vcntabu Contains information about tables that have integrity
constraints defined on them.
DATAITEMS Vdatait Contains information about known information map data
items.
DESTINATIONS Vdest Contains information about known ODS destinations.
DICTIONARIES Vdctnry Contains information about all DICTIONARY tables.
ENGINES Vengine Contains information about SAS engines.
Accessing SAS System Information By Using DICTIONARY Tables 149