We receive 3 sets of records usually but at times there can be more sets in an input file (The LRECL is 85 and RECFM is FB). Each set starts with a "011" and ends with "099". The objective is to split first 3 sets of records into 3 files so that each file can have 1 set of records and extra records, if any, should be put into a file. The ouput files also should be of same LRECL & RECFM. We use Syncsort v1.2.3.
Input:
011 PART19X ..X563484.... 20091009
012 PART19X ..Y8B7756.... 20091218
013 PART19X ..XU8C432.... 20090501
099 PART19X ..CBU9000.... 20080726
011 PART64U ..PRI0005.... 20090119
012 PART45B ..VEX6B90.... 20090205
099 PARTERR ..INVALID.... 20090101
011 PART98P ..HET8765.... 20090606
012 PART98P ..VOR9090.... 20090807
013 PART98P ..VOR9090.... 20090808
014 PART98P ..FIX8765.... 20091014
099 PART98P ..S5645GT.... 20090612
011 PART10A ..W9045XP.... 20091116
011 PART75G ..T040506.... 20090111
012 PART19X ..Y8B7756.... 20091218
013 PART19X ..XU8C432.... 20090501
099 PART19X ..CBU9000.... 20080726
011 PART64U ..PRI0005.... 20090119
012 PART45B ..VEX6B90.... 20090205
099 PARTERR ..INVALID.... 20090101
011 PART98P ..HET8765.... 20090606
012 PART98P ..VOR9090.... 20090807
013 PART98P ..VOR9090.... 20090808
014 PART98P ..FIX8765.... 20091014
099 PART98P ..S5645GT.... 20090612
011 PART10A ..W9045XP.... 20091116
011 PART75G ..T040506.... 20090111
Output-1:
011 PART19X ..X563484.... 20091009
012 PART19X ..Y8B7756.... 20091218
013 PART19X ..XU8C432.... 20090501
099 PART19X ..CBU9000.... 20080726
012 PART19X ..Y8B7756.... 20091218
013 PART19X ..XU8C432.... 20090501
099 PART19X ..CBU9000.... 20080726
Output-2:
011 PART64U ..PRI0005.... 20090119
012 PART45B ..VEX6B90.... 20090205
099 PARTERR ..INVALID.... 20090101
012 PART45B ..VEX6B90.... 20090205
099 PARTERR ..INVALID.... 20090101
Output-3:
011 PART98P ..HET8765.... 20090606
012 PART98P ..VOR9090.... 20090807
013 PART98P ..VOR9090.... 20090808
014 PART98P ..FIX8765.... 20091014
099 PART98P ..S5645GT.... 20090612
012 PART98P ..VOR9090.... 20090807
013 PART98P ..VOR9090.... 20090808
014 PART98P ..FIX8765.... 20091014
099 PART98P ..S5645GT.... 20090612
Output-4:
011 PART10A ..W9045XP.... 20091116
011 PART75G ..T040506.... 20090111
011 PART75G ..T040506.... 20090111
Please help.
TIA.