Chapter Contents

Previous

Next
ITEM=

ITEM=



Defines the fields within the record

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:

ITEM=
IT=
is the name that you want to assign to the field in an IMS-DL/I database segment and which the SAS/ACCESS software will use to generate a SAS variable name. This name can be a maximum of 32 characters. If any special characters or blanks are included in the name, enclose the entire name in single quotes. This is a required argument.

The generated SAS variable name will use the following naming conventions specified by the VALIDVARNAME SAS System option:

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.

If you specified the UN= statement with a value of Y, the variable names will be unique. Any duplicate names will be resolved as follows: the name will be truncated to the legal length and a number appended to the end to identify it as unique. For example, two instances of CUSTOMER_ADDRESS would be changed to CUSTOMER_ADDRESS and CUSTOMER_ADDRESS0.

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.

LEVEL=
LV=
is the two-character numeric level of the IMS-DL/I field. This level number is similar to the COBOL level number. To indicate that a field is in a group, it should have a level number greater than the group's level number. This is a required argument.

DBFORMAT=
DBF=
is used to specify how the IMS-DL/I field is stored in the database. See Using IMS-DL/I Data Types in SAS/ACCESS Descriptors for a table of recommended DB formats to use for COBOL and PL/I data types. This table also shows the SAS variable formats that the SAS/ACCESS interface to IMS-DL/I generates for the DB Formats.

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.

SASNAME=
SN=
this argument is supported for Version 6 compatibility only. It assigns a SAS variable name to this IMS-DL/I field. When VALIDVARNAME=V6, the name assigned to this argument is also used as input to the subsetting WHERE statement.

FORMAT=
FMT=
assigns a SAS format to the SAS variable. This is an optional argument.

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.

SEARCH=
SE=
is the search field name defined for the field in the DBMS DBD. If you want the IMS-DL/I engine to create SSAs directly from a WHERE statement or command that references the named item, then you must assign search field names. Otherwise, the WHERE statement is passed to the SAS System, and all occurrences of the segments referenced in the view descriptor in the database are read and passed to the SAS System for further processing. See Performance and Efficient View Descriptors for more information about SSAs and WHERE statements. This is an optional argument.

KEY=
K=
indicates with an Y, N, or a U whether this field is defined in the DBD as a sequence or key field and whether the key sequence field is unique. The default setting, N, indicates the field is not a key sequence field. You must assign one key sequence field per segment if you plan to use the view descriptors created from this access descriptor to update the IMS-DL/I database. Keys are recommended, but not required, for all segments except the lowest hierarchical level if the view descriptors will be used only for data retrieval. When KEY=U, retrieval calls to IMS will be reduced because the IMS engine will know that there is only one segment in the database for this key.

OCCURS=
O=
indicates the number of times a repeating field occurs. This is an optional argument.

DBCONTENT=
DBC=
indicates that the values for this field need special handling by the IMS-DL/I engine. This is an optional argument. You can use this argument to specify a SAS format that indicates the way date values are represented internally in the IMS-DL/I database, or to indicate how a field is initialized or stored in the database. This is not the same as the value you entered in the DBFORMAT= argument.

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.