Fields in the HISAM secondary index pointer

Fields in a HISAM secondary index database support both unique and non-unique keys.

This topic contains Diagnosis, Modification, and Tuning information.

A HISAM secondary index database supports both unique and non-unique keys. Non-unique keys are stored and retrieved in last-in first-out (LIFO) order. Both KSDS and ESDS data sets are required when the secondary index database supports non-unique keys. The first inserted non-unique key is stored in the KSDS data set and the remaining non-unique keys are stored in the ESDS data set in LIFO order.

A HISAM secondary index database supports subsequence field, duplicate data field, user data field, and the /CK operand. The subsequence field, and the /CK operand can be used to make the secondary index key unique.

A HISAM secondary index database contains fixed-length segments, provides data partitioning using a partition selection exit routine, and supports the Segment edit/compression exit routine (DFSCMPX0).

Fields in the HISAM secondary index pointer with a unique key

The following figure shows the fields in a HISAM secondary index pointer with a unique key.

Figure 1. Example of a HISAM secondary index pointer with a unique key
begin figure description. This figure is described in the surrounding text. end figure description.
Logical record
A secondary index pointer segment is stored in a logical record.
Pointer segment
A secondary index pointer segment contains prefix and data fields.
Prefix
Delete byte: one byte
Data fields
Search field
Variable-length bytes, made up of up to 5 fields from the source.
Subsequence field
Variable-length bytes, made up of up to 5 fields from the source or IMS™-generated values (optional). It is used to make the secondary index key unique. It can be used to order segments in a secondary index database. The search field and the subsequence field together make up the key of the secondary index.
Duplicate data field
Variable-length bytes, made up of up to 5 fields from the source (optional). It is only used when processing the secondary index as a database.
Symbolic pointer field
Variable-length bytes. It is the concatenated key to the target.
User data
Variable-length bytes, made up of any user data fields (optional). It is only used when processing the secondary index as a database.

Fields in the HISAM secondary index pointer with a non-unique key

Figure 2. Example of a HISAM secondary index pointer with a non-unique key
begin figure description. This figure is described in the surrounding text. end figure description.
Logical record
A secondary index pointer segment is stored in a logical record.
Duplicate key pointer
Four byte pointer for HISAM secondary index when the secondary index key is non-unique. If the keys are not unique, some pointer segments will contain duplicate keys. These pointer segments must be chained together, and this is done using the duplicate key pointer field at the beginning of the logical record. The duplicate key pointer exists when the OVFLW= operand on the DATASET statement is defined.
Pointer segment
A secondary index pointer segment contains prefix and data fields.
Prefix
Delete byte: one byte
Data fields
Search field
Variable-length bytes, made up of up to 5 fields from the source.
Subsequence field
Variable-length bytes, made up of up to 5 fields from the source or IMS-generated values (optional). It is used to make the secondary index key unique. It can be used to order segments in a secondary index database. The search field and the subsequence field together make up the key of the secondary index.
Duplicate data field
Variable-length bytes, made up of up to 5 fields from the source (optional). It is only used when processing the secondary index as a database.
Symbolic pointer field
Variable-length bytes. It is the concatenated key to the target.
User data field
Variable-length bytes, made up of any user data fields (optional). It is only used when processing the secondary index as a database.