Try to find the key in IMS DBD that has a key value length of 8 bytes, but when using LOCATE KEY with a key value of 12345, the result is an exact key not found message.
But instead of the LOCATE command, use the FIND command, as FIND 123345 finds the value.
Z/OS
If the key segment length is larger than the actual key value, then specify the entire length of the key segment field.
If key segment field lengths are 8 bytes long but the actual value length is only 5 bytes, then use the LOCATE command as follows:
Instead of using LOCATE KEY 12345, change it to LOCATE KEY '12345 ' <<< After 5 bytes of actual value, add 3 spaces to make up the entire key length.