Vous êtes sur la page 1sur 2

Summary of SAS Dictionary Tables and Views

Notation:
In headers, dict indicates SQL usage (dictionary.tableName); sh indicates SASHELP usage (sashelp.viewName); PW identifies tables with no data displayed if member is password-protected. indicates a field used for uniquely identifying an observation NN identifies a field whose value may be missing for non-native SAS file types (including SAS Transport files). V identifies a field whose value may be missing or 0 for SAS views Highlighted names are unique to Version 9.2 (TS2M0) MEMNAME: o Native SAS engines store member names in upper case. Other engines (access, excel, et al.) preserve case and spacing. Using the EXCEL engine, for example, program references to sheet name Sheet One must be Sheet One$n o Generation datasets are stored as memname[#nnn] (e.g., MAST, MAST#001) Non-native/foreign files: if the data sources name exceeds 32 characters, has security limitations, or uses syntax not understood by SAS, the data source will not be represented in any Table or View. Not all tables are shown

dict.dictionaries / sh.vDctnry
npos varnum format informat num num $49 $49

Dictionary Table Attributes

Column position [offset within observation. >= 0] Column number in table [1, 2, 3, ] Column format [may include width, period] Column informat [may include width, period]

Usage Notes:

dict.engines / sh.vEngine
engine alias description preferred properties $8 $8 $40 $3 $1024 Alias [upper case] Description Preferred? [yes|no]

Attributes of all available engines

Engine name [upper case]

Engine dialog properties

dict.extfiles / sh.vExtfl
fileref xpath xengine directory exists fileSize level modDate temporary $8 $1024 $8 $3 $3 num num num char

User, system external files

dict.catalogs / sh.vCatalg
libname memname memtype objname objtype objdesc created modified alias level $8 $32 $8 $32 $8 $256 num num $8 num Library name [upper case]

Catalog Member Attributes

Fileref [upper case] [duplicated for concatenated files] Path name or piped command [case preserved] Engine name [upper case] Does fileref point to a directory [yes|no] Does the location exist? [yes|no] Size of file, in bytes File concatenation level File modification date-time [DATETIME informat/format] Allocated as a temporary location? [yes|no]

Member name [upper case] Member type [CATALOG] Object name [upper case] Object type [SCL|FRAME|FORMAT|FORMATC|MACRO] Object description Date created [DATETIME informat/format] Date modified [DATETIME informat/format] Object alias [upper case] Library concatenation level [0, 1, 2, ]

dict.formats / sh.vFormat
libname memname path objname fmtname fmttype source minw mind maxw maxd defw $8 $32 $1024 $32 $32 $1 $1 num num num num num

Attributes of system/user-written formats

Library name [upper case] [when source=C] Member name [upper case] [when source=C] Path name [case preserved] [when source=U] Object name [upper case] [e.g. GROUP, TYPE] [when source=U, C] Format name [upper case] [e.g., GROUP, $TYPE] [no decimal point] Format type [F (format) I (informat)] Format source [U (system, using DLL) B (built-in) C (catalog, i.e., created by PROC FORMAT)] Minimum width [>= 0] Minimum decimal width [>= 0] Maximum width [>= 0] Maximum decimal width [>= 0] Default width [>= 0]

dict.columns / sh.vColumn
libname memname memtype name $8 $32 $8 $32

PW

Variable Attributes

Library name [upper case] Member name. Member type [DATA|VIEW] Column name [case as-is from data set creation except for transport files (always upper-cased)] Can contain blanks. Column type [char|num] Column length Column position [offset within obs., e.g., 0, 1, 20] Column number in table [1, 2, 3, ] Column label Column format [DATE9. $HEX22.] Column informat [MMDDYY10. 8.2] Column index type [SIMPLE|COMPOSITE|BOTH] Key sequence order [0, 1, ] Negative if descending Extended type Not NULL? [no|yes] Precision Scale Did source/target encoding differences require character remapping (transcoding)? [no|yes]

type length npos varnum label format informat idxusage sortedby xtype notnull scale transcode
NN V

$4 num num num $256 $16 $16 NN $9 num $12 $3 num $3

dict.functions / sh.vFunc
fncname fncargs fncprod fnctype maxarg minarg source $32 num $1 $1 num num $1 Function name [upper case] Argument attributes Implementation type Function type Maximum arguments to function Minimum arguments to function Format source

Available Functions

precision NN V num

dict.destinations / sh.vDest
destination style $100 $32

dict.indexes / sh.vIndex
Open ODS Destinations
libname memname memtype name idxusage indxname indxpos nomiss unique $8 $32 $8 $32 $9 $32 num $3 $3

PW

Native Engine Index Attributes

Library name [upper case] Member name [upper case] Member type [DATA] Column name [mixed case] Column index type [COMPOSITE|SIMPLE] Index name [mixed case] Position of column in concatenated key. Missing if not concatenated key. NOMISS option [yes|blank] UNIQUE option [yes|blank]

Destination [upper case] [PDF|RTF|PS|] Style [Journal|Printer|] One-level name only.

dict.dictionaries / sh.vDctnry
memname memlabel name type length $32 $256 $32 $4 num Dictionary Table label

Dictionary Table Attributes

Dictionary table name [upper case] Column name [upper case] Column type [char|num] Column length

2010 CodeCrafters, Inc.

Revised May 14, 2010

www.CodeCraftersInc.com

Summary of SAS Dictionary Tables and Views


dict.libnames / sh.vLibnam
libname engine path level fileformat readonly sequential sysdesc sysname sysvalue temp $8 $8 $1024 num $8 $3 $3 $1024 $1024 $1024 $3

Attributes of Allocated Libraries

dict.tables / sh.vTable
typemem crdate modate nobs delobs nlobs obslen nvar maxvar maxlabel V num_character V V V

Attributes of Tables and Views

Library name [upper case] Engine name [V9|V8|] Path name [blank for some engines: URL, ] For non-native engines, may include file name, extension. Library concatenation level [0, 1, 2, ] Default file format Read only? [no|yes] Sequential? [no|yes] System information description System information name System information value Allocated with temporary access? [yes|no]

Typical setting for non-native (MDB, XLS, REMOTE, XPT) member DATA $8 Dataset type [upper case] [blank|DATA|-

num num num num num num num num num num num $3 $8 $8 num num num $3 num $9 $24 num num $3 $8 $4 $8 $32 $170 $256

MSGFILE|ATTLIST|VIEW|] Date created [DATETIME informat/format] Date modified [DATETIME informat/format] Number of observations Number of deleted observations [>= 0] Number of logical observations [. if view, else positive integer] Observation length Number of variables Length of longest variable name Length of longest label [>=0] Number of character variables Number of numeric variables Password protection [position 1: -|R position 2: -|W position 3: -|A] Compression routine [NO|CHAR|BINARY] Encryption [NO|YES] File size [>= 0] Number of pages [0, 1, ] Percent compression [0, 1, ] [value stored is truncated integer -can be negative] Reuse space [no|yes] Buffer size {0} Type of indexes [blank|SIMPLE|COMPOSITE|BOTH] Requirements vector [$HEX informat, format] Maximum number of generations Generation number [., 0, 1, 2, ] Can be greater than MAXGEN, above Data set attributes [S|ON|] Name of collating sequence Sorting type [S=sort verified SR=sort w. NODUPREC SK=sort w. NODUPKEY] Character sorted by [ANSI|ASCII|] Data representation Data representation name Data encoding [blank if view]

missing missing missing 0 missing 0

dict.macros / sh.vMacro
scope name offset $9 $32 num

Macro Variable Values

Macro variable scope [GLOBAL|AUTOMATIC|macro name (if local)] Macro variable name [upper case] Offset into macro variable [0, 200, ]. Note that the beginning of the value spanning observations may not always be stored with OFFSET=0. Macro variable value [case, spacing are preserved]

num_numeric protect
#

V V V V V V V V V V V

--NO NO 0 0 missing no 0 missing 0 0 missing missing missing missing missing NATIVE missing

compress encrypt filesize npage pcompress reuse bufsize indxtype reqvector # maxgen gen attr sortname sorttype sortchar datarep

value

$200

dict.members (See following table for views)


libname memname memtype
dbms_memtype

Member Attributes

$8 $32 $8 $32 $8 $32 $1024

engine index path

Library name [upper case] Member name. Member type [DATA|VIEW|ITEMSTOR| CATALOG|] DBMS member type [VIEW|DATA|LINK|] Engine name [upper case] Indexes? [yes|no] [not index names!] Path name [mixed case] [if concatenated, enclosed in parentheses, each path name quoted; otherwise, no parentheses or quotes] [For most non-native engines, directory + file name + extension; otherwise, just directory]

Views defined for members


sh.vMember sh.vsAccess sh.vsCatlg sh.vsLib sh.vtsTble sh.vsView sh.vsTabvw All fields from dict.members LIBNAME, MEMNAME where memtype=ACCESS LIBNAME, MEMNAME, where memtype=CATALOG LIBNAME, PATH for unique values of LIBNAME LIBNAME, MEMNAME where memtype=DATA LIBNAME, MEMNAME where memtype=VIEW LIBNAME, MEMNAME, MEMTYPE where memtype=DATA, VIEW

datarepname V

encoding
#

Default

If password protected (TABLES.PROT position 1 = R) this field will be populated

dict.options / sh.vOpt dict.goptions / sh.vGopt sh.vAllopt


optname setting optdesc level $32 $1024 $160 $8

Option Settings

dict.styles /sh.vStyle
libname memname style crdate $8 $32 $32 num

Attributes of Currently Allocated Styles


Library name Member name Style name [case preserved] V9: two-level style path V8: one-level style identifier Date created [DATETIME informat/format]

group

$32

opttype

$8

Option name [upper case] Full name, not alias Option setting [mixed case] Option description Option location GOPTIONS: [GRAPH] OPTIONS: [Portable|Host] Option group [upper case] GOPTIONS: [blank] OPTIONS: [MACRO|SORT|ENVFILES|] Option type [boolean|char|num]

dict.titles / sh.vTitle
type number text $1 num $256 Title location [T|F]

Values of Titles and Footnotes


Title number [1||10] Text [case preserved] Rendering information (h=1 j=l etc.) is removed. Macro variables are resolved.

dict.tables / sh.vTable
libname
#

Attributes of Tables and Views

Typical setting for non-native (MDB, XLS, REMOTE, XPT) member

dict.views / sh.vView
libname memname memtype engine $8 $32 $8 $8

PW

View Attributes (SAS file formats only)

$8 $32 $8 $8 $256

Library name [upper case] Member name. Member type [DATA|VIEW] If DBMS (non-native engine), member type [VIEW|TABLE|LINK|]. Otherwise, blank Dataset label

Library name [upper case] Member name [upper case] Member type [VIEW] Engine name [SASESQL|SASDSV| ]

memname # memtype #
dbms_memtype

memlabel

missing

2010 CodeCrafters, Inc.

Revised May 14, 2010

www.CodeCraftersInc.com

Vous aimerez peut-être aussi