SAS® users have an easy and convenient way to quickly obtain useful information (referred to as metadata) about their SAS session with a number of read-only SAS DICTIONARY tables or SASHELP views. At any time during a SAS session, information about currently defined system options, libnames, tables, columns and their attributes, formats, indexes, and more can be accessed and captured. This tip explores the purpose and use of the Dictionary table DICTIONARIES and SASHELP view VSVIEW, how the content is accessed, and what information is available.
As new SAS versions become available, users can easily identify the names of all Dictionary tables by accessing and displaying the contents of the “read-only” DICTIONARIES table or its cousin, the VSVIEW SASHELP view. In the first example, below, a PROC SQL SELECT-clause, along with the UNIQUE keyword, is used to display the individual names of all the Dictionary tables for the version and/or release of SAS you’re using. In SAS 9.4, for example, there are 32 unique Dictionary tables.
In the second example, below, a PROC SQL SELECT-clause, along with the UNIQUE keyword, is used to display the individual metadata names found in the VSVIEW SASHELP view for the version and/or release of SAS you’re using. A PROC PRINT, or your favorite procedure, can also be used, as shown below. It is worth noting that the view member names found in the SASVIEW SASHELP view all start with the letter, “V”, and are constrained to eight characters in length. In SAS 9.4, for example, there are 39 unique metadata views.
About Kirk Paul Lafler
Kirk Paul Lafler has used SAS® since 1979 and is senior consultant and founder of Software Intelligence Corporation. Kirk is an application developer, adjunct professor at UCSD Extension, provider of IT consulting services, educator to SAS users around the world, mentor, and emeritus sasCommunity.org Advisory Board member. As the author of six books including Google® Search Complete! (Odyssey Press. 2014) and PROC SQL: The Basics and Beyond Using SAS, Second Edition (SAS Institute. 2013); Kirk has written hundreds of papers, tips and articles; been an Invited speaker and trainer at hundreds of SAS user group conferences and meetings; and is the recipient of 25 “Best” contributed paper, hands-on workshop (HOW), and poster awards. Kirk can be reached for questions at:
Kirk Paul Lafler
Senior SAS Consultant, Application Developer, Entrepreneur, Educator and Author
Software Intelligence Corporation
Google Search Complete!