Previous Topic: Sorted Chain or Index Sets


CALC Records

Inconsistent sign nibbles for zone or packed decimal fields used in a calckey may have more of an impact than when those fields are used as keys for a chain set or index set. The initial operation applied against a CALC record runs a hashing algorithm against the calckey to identify the page on which IDMS will store the record occurrence. Prior to executing the hashing algorithm, IDMS constructs the calckey into a piece of contiguous storage from the various fields defined as making up the key. The algorithm has no knowledge of the individual component fields comprising the calckey or their various formats. The algorithm simply performs logical arithmetic calculations against the character string to determine the record's target page.

As a result, values of x'00999C' and x'00999F' although functionally equivalent, will in all probability generate different target pages for their CALC records. If a zone or packed field is used as part of a calckey it is very important that all programs involved with the creation or accessing of these records use a consistent method for initializing these numeric fields.