Chapter Contents |
Previous |
Next |
ITEM= |
Required statement | |
Applies to: | access descriptor |
Syntax | |
Details | |
Arguments |
Syntax |
ITEM= item-name LEVEL=level-number
DBFORMAT=database-format <SASNAME=SAS-name> <FORMAT=SAS-format > <SEARCH=search-name> <KEY=Y|N|U> <OCCURS=number-of-repeats> <DBCONTENT=database-content >; |
Details |
The ITEM= statement defines the fields within the record.
Arguments |
In the ITEM= statement, you must enter the item name, level number, and the DBFORMAT= argument. The other arguments are used to further define the item and are not required. The following list explains each argument that can appear in the ITEM= statement:
If you specified the AN= statement with a value of Y, you will not be able to change the SAS variable names when you create a view descriptor from this access descriptor after the access descriptor statements have been entered.
Sites commonly refer to undesired portions of the data buffer by using the FILLER notation in the ITEM= statement and by defining the DBC (DB Content) as $CHAR. See Using Filler Notation in ITEM= for information.
You must specify one of the following valid SAS informats in this argument. For character data, the valid SAS informats are
$w. | $HEXw. |
$CHARw. | $PHEXw. |
$CHARZBw. |
For numeric data, the valid SAS informats are
w.d | ZDBw.d | RBw.d |
Fw.d | IBw.d | PDw.d |
BZw.d | PIBw.d | PKw.d |
ZDw.d | HEXw. |
If you specified the AN= statement with a value of Y, the SAS System assigns default formats (based on the field's database format) to the variables when the access descriptor is created. If you want, you can enter formats using the FORMAT= argument in the ITEM= statement at that time. However, you will not be able to change these formats when you create a view descriptor from this access descriptor once the access descriptor is created.
For example, you would use the DBFORMAT= argument to specify that a date is stored as a packed decimal. You would then use the DBCONTENT= argument to indicate where the month, day, and year are stored in that packed decimal. Valid parameters for date values are
YYMMDD6. | MMDDYY8. | JULIAN5. |
YYMMDD8. | DDMMYY6. | JULIAN7. |
MMDDYY6. | DDMMYY8. |
Valid parameters for special formats values that indicate how a field is initialized are
B | when values are blanks for zero |
H | for high values |
L | for low values. |
These special formats affect how the SAS System displays and updates the fields in the database. Use special format B to indicate to the IMS-DL/I engine that a numeric variable has blanks when its value is zero. Use the special codes H and L to indicate that a variable is initialized to high or low values, respectively.
For example, if you specify L for a variable, the SAS System displays a missing value when it finds low values (hexadecimal zeroes) in the variable. If you update that variable with a missing value, the IMS-DL/I engine writes low values to the variable in the database. If you specify H for a variable, the SAS System displays a missing value when it finds high values (hexadecimal Fs) in the variable. If you update that variable with a missing value, the IMS-DL/I engine writes high values to the variable in the database.
You can also use the special formats values when a date
is initialized in a special way. For example, if you had a date initialized
to low values, you would enter, enclosed in single quotes, the date format
followed by a slash (/) and an initialization code. For example, for an eight-digit
date in the MMDDYY8. form initialized to low values, you would enter the following
value for the DBCONTENT argument:
'MMDDYY8./L'
Do not specify a DBCONTENT for records and groups.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.