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!

Coding For Multi Field Index

Status
Not open for further replies.

klophockey

Programmer
May 25, 2016
41
US
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.
 
what cobol vendor and version? syntax can vary slightly between these.

For microfocus cobol the following link explains how to define a
select - FD -
other statements - you mainly interested on START and READ

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top