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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an indexed file. 1

Status
Not open for further replies.

Beep

Programmer
May 21, 2002
4
US
I posted a question a few weeks ago aabout how to find a file description when you have no source code. That would still be beneficial to me but possibly I can make this easier on myself... This may sound stupid but here goes. How do you create an indexed file??? I know what I want the FD to be - and I want to begin with new data. But if the file doesn't exist I get an error when trying to open it. I don't think there is a create statement?? Any insight would be helpful. I am running RM Cobol 85.
 

The easiest way is:

OPEN OUTPUT INX-FILE.

Note: OPEN OUTPUT will wipe out an existing indexed file and create a new one.

Alternatively in the environment division:

SELECT OPTIONAL INX-FILE

This will create the file on an open i-o or extend.

There is also a utility provided with RM/COBOL called rmdefinx.cob. It will prompt you for indexed file attributes. You still have to OPEN OUTPUT on the file to create it.

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top