Chapter Contents

Previous

Next
SAS/ACCESS Interface to SYSTEM 2000 Data Management Software: Reference

SYSTEM 2000 Item Types

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

How the values are displayed and stored 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 to appear 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, the ACCESS procedure assigns SAS formats, informats, and lengths using the item's picture. See ACCESS Procedure Data Conversions for the default SAS variable formats and informats for each SYSTEM 2000 item type.


Numeric Item Types

The following items are numeric item types. A numeric item type's picture indicates the number of places required by the longest value expected for an item. A numeric item type's picture is specified using repetitions of the numeral 9. 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.

INTEGER
stores whole numbers.

DECIMAL
stores numbers with a decimal point.

MONEY
also stores numbers with a decimal point, but these values include a floating dollar sign at the left and CR at the right (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 (four 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 (eight bytes). You can also use the DOUBLE item type for storing times. (SYSTEM 2000 software does not have a TIME item type.)


Date Item Type

You can specify dates using the DATE item type. A date does not have an assigned picture.
DATE stores calendar dates in a fixed format. For example, 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 prior to the origin of the Gregorian calendar (October 15, 1582).

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


Character Item Types

The following item types are 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. A character item type's picture is specified using repetitions of the letter X. 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 250 characters) if the specified picture is at least X(4). That is, CHARACTER and TEXT item types have overflow capabilities.

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

TEXT
also 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 EBCIDIC characters, which are treated like TEXT items except that overflow is not allowed.

Note:   When you create a view descriptor, the ACCESS procedure assigns default variable lengths to the corresponding SAS variables using the pictures of the selected items. However, since CHARACTER and TEXT item types have overflow capabilities, there may 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]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.