klophockey
Programmer
I have an indexed file which has been partitioned. Prior to it being partitioned, it had a primary index and an alternate index with duplicates. When it was partitioned, a partition index was added to the file. Prior to the partitioning of the file, the Cobol code worked OK. I know there is a record on the file which meets the criteria of having a value of 2 in the B3-3 field which is part of the alternate key definition. I may not have something coded right in the File-Control with respect to the partitioning index which is causing my issue. I have coded it as another alternate index and maybe it should be coded differently. Perhaps there is someone who could give me a suggestion of how I might code things to work as they should.
The File-Control as I have it coded for the partitioned file is:
FILE-CONTROL.
SELECT ABC1102 ASSIGN TO VAR
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS KEY-ABC4992
ALTERNATE RECORD KEY IS B3-3 WITH DUPLICATES
ALTERNATE RECORD KEY IS B3-2S (This is the index that is the partitioning index)
FILE STATUS IS STATX.
The Cobol code which fails with a message: "no record found ABC1102"
OPEN INPUT ABC1102.
MOVE 2 TO B3-3.
START ABC1102
KEY = B3-3
END-START.
Thank you very much for your time and input.
The File-Control as I have it coded for the partitioned file is:
FILE-CONTROL.
SELECT ABC1102 ASSIGN TO VAR
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS KEY-ABC4992
ALTERNATE RECORD KEY IS B3-3 WITH DUPLICATES
ALTERNATE RECORD KEY IS B3-2S (This is the index that is the partitioning index)
FILE STATUS IS STATX.
The Cobol code which fails with a message: "no record found ABC1102"
OPEN INPUT ABC1102.
MOVE 2 TO B3-3.
START ABC1102
KEY = B3-3
END-START.
Thank you very much for your time and input.