I have a very large sequential ASCII SDF text file that includes different record types, (file header, file trailer, batch header, batch detail, etc). Each record type is identified in the same position in the record, but most of the other fields are different depending on the record type. The maximum record length is about 350 characters.
Is there a way I can read each record in sequence, determine the record type and then process the record separately. My specific need is to extract a reference number that exists in the batch header record but not in the batch detail record and then include it with the detail record.
Your thoughts will be helpful.
Alan Arons![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
Is there a way I can read each record in sequence, determine the record type and then process the record separately. My specific need is to extract a reference number that exists in the batch header record but not in the batch detail record and then include it with the detail record.
Your thoughts will be helpful.
Alan Arons
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)