COBCH1638 Start key ambiguous; using key key-name-1 (key key-name-2 has same offset)

A START statement KEY phrase specifies the data-name of data item that has the same offset as two or more split keys of an indexed organization file.

Each of the keys has a total length that is greater than or equal to the length of the referenced data item. In this case, it is ambiguous which key should be used for the key of reference. The first key found that satisfies the length requirement is used as indicated by first key-name in the message; the second key found, as indicated by the key-name in the parenthetical of the message, is not used in establishing the key of reference. If the second key is the desired key for the key of reference, use its split-key-name and the WITH SIZE phrase to specify a partial key to avoid any ambiguity. This message is only produced for multi-component split keys that have the same starting offset and a compatible total length.

For single component keys, that is, ones specified without a split-key-name or those listing only one component following the split-key-name and equal sign, this message is not produced. The compiler uses the last single component key that has a matching offset with the specified data-name, regardless of its length. If the data-name references a data item with a length longer than the matched key, only the part of the data item up to the key length is compared to the key at run time. This last key found is used to establish the key of reference for subsequent sequential READ statements until another START statement or READ statement with the KEY phrase is executed.