This really should be easy, but my mind is in "I hate you" mode.
My VSAM file key is:
Code: Select all
Record Code PIC X(2) '51'
Appl Code PIC X(1) unknown, set to space
Procedure Code PIC X(5) '0910V'
Only the Appl Code is unknown. I can view the records on the VSAM file and know the existing keys are 51, C, 0910V and 51, V, 0910V.
I don't know if the file read codes are generic or unique to my installation, but here are the read methods I have tried:
1. START (F), then READ-NEXT (G) Return code from START is 23
2. START-GREATER-THAN (N), then READ-NEXT (G) Return code from S-G-T is 00, return code from READ-NEXT is also 00, but the record retrieved was the first record in the VSAM, not the key requested
3. READ-KEY (H), then READ-NEXT (G) Return from READ-KEY is 23
I just don't what do to with this. #2 seems to be correct, but it is not returning the correct record! And I double-checked the key before the READ-NEXT and it is populated with the original partial key - and the called module that actually performs the VSAM access does have my key values in it before the READ-NEXT.
What expect to see is the first read pointing to the first entry that is immediately one record greater than my supplied key |51| |0910V|, which should be |51|C|0910V|. Instead I get |51|C|A0010|.
Can anyone see what I am doing wrong?