space
Previous Page | Next Page

SYSTEM 2000 Software

SYSTEM 2000 Item Types


Overview of Item Types

Every schema item in a SYSTEM 2000 database has a specified item type. You can specify numeric item types, a date item type, and character item types. The item type tells the software how the values for that item are to be stored and displayed. The way you store the values determines how you can use them. For example, values consisting exclusively of digits can be stored in a way that is suitable for computation.

How the values are stored and displayed is also determined by the picture (or length) assigned to an item. For example, a picture for decimal numbers indicates how many digits can be stored and where the decimal point is placed when the values are displayed or used in computation.

When you create a view descriptor, in addition to assigning SAS variable names from the schema item names, PROC ACCESS assigns SAS formats, informats, and lengths using the item's picture. See PROC ACCESS Data Conversions for the default SAS variable formats and informats for each SYSTEM 2000 item type.


Numeric Item Types

A numeric item type's picture indicates the number of places required by the longest value expected for an item, and is specified by repeated 9s. For example, 9999 or 9(4) specifies four places. Values for numeric item types cannot exceed their specified picture, that is, overflow is not allowed for numeric values. The following are numeric item types:

INTEGER

stores whole numbers.

DECIMAL

stores numbers with a decimal point.

MONEY

stores numbers with a decimal point, but these values include a floating dollar sign ($) at the left of the value and CR at the right of the value (if negative) when displayed.

REAL

stores fullword (single-precision), floating-point (or FLOAT) numbers. REAL items do not have a picture. Each REAL value occupies one word (4 bytes) in the database.

DOUBLE

stores double-word (double-precision), floating-point numbers. DOUBLE items do not have a picture. Each DOUBLE value occupies two words (8 bytes). You can also use the DOUBLE item type for storing time values.

Note:    SYSTEM 2000 does not have a TIME item type. To store time values, use the DOUBLE item type.  [cautionend]


Date Item Types

You can specify date values using the DATE item type. A date does not have an assigned picture.

DATE

stores calendar dates in a fixed format. If the date format is MM/DD/YYYY (the default), the value stored must be in the form 07/04/1989 (including the slashes). You cannot store dates that occurred before the date of origin of the Gregorian calendar, October 15, 1582.


Character Item Types

A character item type's picture corresponds to the number of places that would accommodate most of the values for the item, and is specified by repeated Xs. For example, XXXX or X(4) specifies four places. Values for character item types, except for the UNDEFINED item type, can exceed their picture (up to a maximum of 250 characters) if the specified picture is at least X(4). CHARACTER and TEXT item types have overflow capabilities. The following are character item types:

CHARACTER

stores alphanumeric values with trailing, leading, and extra internal blanks removed. For example, JOHN∅∅∅SMITH is stored and displayed as JOHN∅SMITH.

TEXT

stores alphanumeric values, but blanks are not removed. For example, ∅∅JOHN∅∅∅SMITH∅∅∅ is stored and displayed as ∅∅JOHN∅∅∅SMITH∅∅∅.

UNDEFINED

stores binary bit-string data. UNDEFINED items can contain any of the 256 EBCDIC characters, which are treated like TEXT items except that overflow is not allowed.

Note:   When you create a view descriptor, PROC ACCESS assigns default variable lengths to the corresponding SAS variables by using the pictures of the selected items. However, because CHARACTER and TEXT item types have overflow capabilities, there might be values stored in the database that are greater than the default variable length. When you use the view descriptor to select data stored in the database, the larger values will not be recognized.

Therefore, to access values that exceed their item's picture, you must change the length in the view descriptor definition to the largest possible value stored in the database, up to a maximum of 200.  [cautionend]

space
Previous Page | Next Page | Top of Page