Sequential file validation question
Posted: Thu Nov 11, 2004 4:11 am
We need to receive a sequential file in the following format:
File Header Record
Item Header Record
Item Detail Record
Item Detail Record
Item Detail Record
Item Header Record
Item Detail Record
Item Detail Record
Item Header Record
Item Detail Record
Item Header Record
Item Detail Record
Item Detail Record
Item Detail Record
etc...
File Trailer Record
We need to validate all the detail lines for each item header. If an error is found we want to move the item header and the associated detail records to an error file. The valid records should continue to the next stage of processing. What's the best way to do this?
Thanks in advance
JR
File Header Record
Item Header Record
Item Detail Record
Item Detail Record
Item Detail Record
Item Header Record
Item Detail Record
Item Detail Record
Item Header Record
Item Detail Record
Item Header Record
Item Detail Record
Item Detail Record
Item Detail Record
etc...
File Trailer Record
We need to validate all the detail lines for each item header. If an error is found we want to move the item header and the associated detail records to an error file. The valid records should continue to the next stage of processing. What's the best way to do this?
Thanks in advance
JR