I have a input file with the following format
1234----1012 141516.......24 ...............51.................188
<account number1><date...........> 1
<account number1><date...........> 3
<account number1><date...........> 3
<account number1><date...........> 3
<account number1><date...........> 2
<account number2><date...........> 1
<account number2><date...........> 3
<account number2><date...........> 2
<account number3><date...........> 1
<account number3><date...........> 2
<account number1><date...........> 1
<account number1><date...........> 3
<account number1><date...........> 3
<account number1><date...........> 3
<account number1><date...........> 2
<account number2><date...........> 1
<account number2><date...........> 3
<account number2><date...........> 2
<account number3><date...........> 1
<account number3><date...........> 2
a report records arranged based on the record type on column 51.
I need to generate the file with the following format
1234----1012 141516.......24 ...............51.................188
<account number1><date...........> 1
<account number1><date...........> 2
<account number1><date...........> 3
<account number1><date...........> 3
<account number1><date...........> 3
<account number2><date...........> 1
<account number2><date...........> 2
<account number2><date...........> 3
<account number3><date...........> 1
<account number3><date...........> 2
<account number1><date...........> 1
<account number1><date...........> 2
<account number1><date...........> 3
<account number1><date...........> 3
<account number1><date...........> 3
<account number2><date...........> 1
<account number2><date...........> 2
<account number2><date...........> 3
<account number3><date...........> 1
<account number3><date...........> 2
Records are needed to be sorted based on the column 51.
Please note, records type 3 is optional and record type 1 and 2 records are mandatory in the input file.
Thanks
BOB