I have a very bad data file and it look like this:
4567,34,89,19970528 12:45 am,abC123^F
4567,34,67,19970528 06:13 pm, waBc^M
[Abc23;^M
cdf^M
^M
^F
4567,34,67,19970528 12:29 am,cdf346^F
1234,78,67,19970529 08:08 am,BCab^F
There are 5 fields in the file, field separator = ',' and record
separator = '^F'.
The 1st and the 4th field are char type and I would like to do the
sorting on these 2 fields in the following order:
1. Sort the 4th field with the latest date 1st record followed by the
related record (because the 1st field need to be group together in the
same group) starting from the oldest date and go in ascending order.
2. Group the 1st field in the same group,(i.e., below)
Base on the input above, the output should look like this:
1234,78,67,19970529 08:08 am,BCab^F
4567,34,67,19970528 06:13 pm, waBc^M
[Abc23;^M
cdf^M
^M
^F
4567,34,67,19970528 12:29 am,cdf346^F
4567,34,89,19970528 12:45 am,abC123^F
Please help.