I need to merge 2 files which have 2 types of records - header records which start with X'80' and detail records which start with X'A8'. The records are to be merged based on a timestamp in the header record, while keeping the header and detail records grouped as they were in the original file eg.
All the records are variable length, and there's 2-4 detail records for each header. I think I need to use IFTHEN and OVERLAY statements to keep the records grouped together. Any suggestions would be much appreciated.
Here's a DFSORT/ICETOOL job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use INREC with SPLICE. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see: