Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

COBOL Programming :: RE: Need help in reading and validating a multiline file

$
0
0
Author: enrico-sorichetti
Subject: Reply to: Need help in reading and validating a multiline file
Posted: Tue Apr 18, 2017 9:02 pm (GMT 5.5)

Quote:
Define a table large enough to hold the entire group of records, say 15000.


simpler to access the same dataset using two file-definitions

synchronize file1/file2 reads on the same header

use file1 to keep reading until the next header remembering if the current block must be copied.

if so read file2 and write until the next header
otherwise read file2 until the next header

repeat until done

beware ...

You have to process the last block of records remembering that You have an end of file instead of a new header
_________________
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort icon_cool.gif


Viewing all articles
Browse latest Browse all 8500

Trending Articles