Using keyed sequence access paths for database files

A keyed sequence access path is based on the contents of the key fields as defined in data description specifications (DDS).

This type of access path is updated whenever records are added or deleted, or when records are updated and the contents of a key field is changed. The keyed sequence access path is valid for both physical and logical files. The sequence of the records in the file is defined in DDS when the file is created and is maintained automatically by the system.

Key fields defined as character fields are arranged based on the sequence defined for EBCDIC characters. Key fields defined as numeric fields are arranged based on their algebraic values, unless the UNSIGNED (unsigned value) or ABSVAL (absolute value) DDS keywords are specified for the field. Key fields defined as DBCS are allowed, but are arranged only as single bytes based on their bit representation.

Physical file fields that have a field procedure may not appear to arrange or order correctly because the access paths have the internal form of the data stored in the access path, not the external form of the data that is returned for the field in the file. This appearance of incorrect ordering is true even for logical files whose key fields are defined over the physical file fields that have a field procedure. When using these types of keyed sequence access paths, equal requests (get equal, next equal, or previous equal) appear to work correctly, but other get requests (next, previous, and similar ones) can appear to return an incorrect record. Key fields that attempt to use alternative collating sequence, SRTSEQ (sort sequence), ABSVAL (Absolute Value), DIGIT (Digit) or ZONE (Zone) are not allowed over physical file fields that have a field procedure.