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

Read different length input files with one program??

Status
Not open for further replies.

RICHINMINN

Programmer
Dec 31, 2001
138
In an IBM mainframe OS/390 COBOL II environment, I need to write a program to read any of 67 different input files, with record lengths ranging from 20 characters up to 1269 characters. Can I set the record length within the program at 1269, and then read any of the files? The IBM environment seems to be much more picky in this regard than some other mainframe platforms I've worked on.

Thanks for your input (whatever its length).

Rich (in Minn.)
 
Hi,

look up in the manual about
RECORD 0
and use
READ .... INTO

This will work!

Manuals can be found at IBM's Bookmanager.

Regards,

Crox
 
Hi Rich,

You can do as Crox says, but a lot depends on what you intend to do with the data once it is read and whether or not you can identify the various record types/lengths you've
just read.

If you can identify the record just read you can redefine the "into" field as many times as needed to identify each record expected. But, again, that depends on what your objective(s) is(are).

Regards, Jack.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top