Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read Partitioned File With Alternate Index Fails

Status
Not open for further replies.

klophockey

Programmer
May 25, 2016
41
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top