klophockey
Programmer
I have a situation where a indexed file has been updated with indexes through another process.
Therefore, I have a file with an alternate index that has been created on two fields.
I have not been able to determine how to code the SELECT statement in the FILE-CONTROL portion of the program so that it can work and I can attempt to read a record using a secondary index. I would like to know how to code the ??????? portion.
Example of what I have where FLD1 and FLD2 have been made an index together (an index of the 2 columns or fields of the record).
SELECT FILEXYZ ASSIGN TO DDNAME
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS KEY-PRIM
ALTERNATE RECORD KEY IS ?????????? WITH DUPLICATES
The record is defined as
FD FILEXYZ
01 FILEXYZ-REC.
05 KEY-PRIM Pic 9(9).
05 FLD1 Pic X(20).
05 FLD2 Pic S9(7)v99.
05 FLD3 Pic S999.
As always, thank you so very much for your kind input. Very much appreciated.
Therefore, I have a file with an alternate index that has been created on two fields.
I have not been able to determine how to code the SELECT statement in the FILE-CONTROL portion of the program so that it can work and I can attempt to read a record using a secondary index. I would like to know how to code the ??????? portion.
Example of what I have where FLD1 and FLD2 have been made an index together (an index of the 2 columns or fields of the record).
SELECT FILEXYZ ASSIGN TO DDNAME
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS KEY-PRIM
ALTERNATE RECORD KEY IS ?????????? WITH DUPLICATES
The record is defined as
FD FILEXYZ
01 FILEXYZ-REC.
05 KEY-PRIM Pic 9(9).
05 FLD1 Pic X(20).
05 FLD2 Pic S9(7)v99.
05 FLD3 Pic S999.
As always, thank you so very much for your kind input. Very much appreciated.