Hi All,
I have a input file (FB, LRECL: 10). Alphabets F or K or M at the first byte are the delimiters for the group or set of records.
Sample Input File
A -> First set of records.
1
2
F -> Start of new set i.e. second set of records.
1
2
3
F -> Start of new set i.e. third set of records.
1
2
F -> Start of new set i.e. fourth set of records.
1
K -> Start of new set i.e. firth set of records.
1
2
3
K -> Start of new set i.e. sixth set of records.
1
M -> Start of new set i.e. seventh set of records and so on...
1
2
3
Requirement:
Would wish to split the above input file into two files using Sort / Icetool.
1) File 1, where we have all records which are "F delimited" record along with dependents 1,2,3 records.
2) File 2, where we have all records which are NOT "F delimited" record along with dependents 1,2,3 records.
Output File 1
F
1
2
3
F
1
2
F
1
Output File 2
A
1
2
K
1
2
3
K
1
M
1
2
3
Regards,
Anand.