Dictionary Views - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Dictionary Views

Description:

Dictionary views store information about your SAS session, data ... Path Name* XENGINE ... PATH Path Name. Dictionary Views. Dictionary.macros contains: ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 27
Provided by: dougg93
Category:

less

Transcript and Presenter's Notes

Title: Dictionary Views


1
Dictionary Views
  • An introduction to SAS dictionary views.
  • Doug Gordon
  • Department of Family and Community Services
  • May 2002

2
Dictionary Views
  • Dictionary views store information about your
    SAS session, data and user options.

3
Dictionary Views
Dictionary views contain information on
  • libraries
  • datasets
  • variables
  • catalogs
  • macros
  • indexes
  • external files
  • options

4
Dictionary Views
  • There are three main ways to access this
    information
  • Dictionary views (SQL)
  • Sashelp library (Datastep)
  • SAS procedures Datasets, contents, catalog.

5
Dictionary Views
  • This presentation will focus on
  • Dictionary views
  • How you can access them, and some examples of
    their use.

6
Dictionary Views
  • Why would you want to access this information?
  • To find out about the structure of your data.
  • For input to macros or data steps

7
Dictionary Views
  • Potential uses include
  • To change your data
  • To manipulate input
  • To manipulate output

8
Dictionary Views
  • Many of the dictionary views replicate
    information found in other dictionary views.
  • As with most SAS elements - there are always
    alternative ways to achieve the same outcome.

9
Dictionary Views
  • Basic code to view contents
  • proc sql
  • select from dictionary.views
  • quit

10
Dictionary Views
Dictionary.columns contains
  • LIBNAME Library Name
  • MEMNAME Member Name
  • MEMTYPE Member Type
  • NAME Column Name
  • TYPE Column Type
  • LENGTH Column Length

11
Dictionary Views
Dictionary.columns contains
  • NPOS Column Position
  • VARNUM Column number in table
  • LABEL Column label
  • FORMAT Column format
  • INFORMAT Column informat
  • IDXUSAGE Column Index type

12
Dictionary Views
  • You can use the information in dictionary.columns
    to change your data
  • variable names for labels
  • change formats
  • reorder variables

13
Dictionary Views
  • To create utility programs
  • map your data holdings
  • output data to flatfiles

14
Dictionary Views
  • Dictionary.catalogs contains
  • LIBNAME Library Name
  • MEMNAME Member Name
  • MEMTYPE Member Type
  • OBJNAME Object Name
  • OBJTYPE Object Type
  • OBJDESC Object Description
  • MODIFIED Date Modified
  • ALIAS Object Alias

15
Dictionary Views
  • Uses of the dictionary.catalogs
  • check for existence of a format
  • listing formats

16
Dictionary Views
  • Dictionary.extfiles contains
  • FILEREF Fileref
  • XPATH Path Name
  • XENGINE Engine Name
  • xpath only contains 80 characters so be careful
    with long path and file names,

17
Dictionary Views
  • Dictionary.indexes contains
  • LIBNAME Library Name
  • MEMNAME Member Name
  • MEMTYPE Member Type
  • NAME Column Name
  • IDXUSAGE Column Index Type

18
Dictionary Views
  • Dictionary.indexes contains
  • INDXNAME Index Name
  • INDXPOS Position of Column in Concatenated
    Key
  • NOMISS No-miss Option
  • UNIQUE Unique Option

19
Dictionary Views
  • Dictionary.members contains
  • LIBNAME Library Name
  • MEMNAME Member Name
  • MEMTYPE Member Type
  • ENGINE Engine Name
  • INDEX Indexes
  • PATH Path Name

20
Dictionary Views
  • Dictionary.macros contains
  • SCOPE Macro Scope
  • NAME Macro Var Name
  • OFFSET Offset into Macro Var
  • VALUE Macro Var Value

21
Dictionary Views
  • Dictionary.titles contains
  • TYPE Title Location
  • NUMBER Title Number
  • TEXT Title Text

22
Dictionary Views
  • Dictionary.options contains
  • OPTNAME Session Option Name
  • SETTING Session Option Setting
  • OPTDESC Option Description
  • These options do not always contain platform
    dependent options.

23
Dictionary Views
  • Dictionary.tables contains
  • LIBNAME Library Name
  • MEMNAME Member Name
  • MEMTYPE Member Type
  • MEMLABEL Dataset Label
  • TYPEMEM Dataset Type
  • CRDATE Date Created
  • MODATE Date Modified
  • NOBS Number of Observations

24
Dictionary Views
  • Dictionary.tables contains
  • OBSLEN Observation Length
  • NVAR Number of Variables
  • PROTECT Type of Password Protection
  • COMPRESS Compression Routine
  • REUSE Reuse Space
  • BUFSIZE Bufffer size
  • DELOBS Number of Deleted Observations
  • INDXTYPE Type of Indexes

25
Dictionary Views
  • Dictionary.views contains
  • LIBNAME Library Name
  • MEMNAME Member Name
  • MEMTYPE Member Type
  • ENGINE Engine Name

26
Dictionary Views
  • References
  • Davis, Michael, An Introduction to SASHELP
    Dictionary Views, SUGI 26, paper 17-26
  • Hamilton, Jack, Some Utility Applications of the
    Dictionary Tables in SQL, Western Users SAS
    Conference, 1998
  • SAS Institute Inc. SAS Procedures Guide,
    Version 8, SAS Institute Inc. Cary, NC, 2000
  • SAS Institute Inc., SAS Online Doc Version 8, SAS
    Institute Inc., Cary, NC, 1999
Write a Comment
User Comments (0)
About PowerShow.com