Just wondering how I could combine the contents of 2 identically stuctured files. Both files contain a header, details, and a trailer record. I want to include the details from both but only need one header and one trailer (it doesn't matter which). Also, each trailer contains two different record counts in PD that I would like to sum together and write to the trailer record.
Each file is FB 300 with the following being the layout of the trailer in a COBOL layout:
Actually the header, details and trailer all have the same layout for the first few bytes. So all records begin with transit, account, and then record type (in the format I described above). The record type of the header is '0', the details are '2', and the trailer is '9'. And, yes, the records need to be sorted in ascending order by the first 8 bytes (transit, account, rec type).