INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Jobs from Indeed

Coding For Multi Field Index

Coding For Multi Field Index

(OP)
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.

RE: Coding For Multi Field Index

what cobol vendor and version? syntax can vary slightly between these.

For microfocus cobol the following link explains how to define a
select - http://documentation.microfocus.com/help/index.jsp...
FD - http://documentation.microfocus.com/help/index.jsp...

other statements - http://documentation.microfocus.com/help/index.jsp...
you mainly interested on START and READ

Regards

Frederico Fonseca
SysSoft Integrated Ltd
www.syssoft-int.com

FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?
FAQ181-2886: How can I maximize my chances of getting an answer?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close