Joined: 24 Jul 2011 Posts: 651 Location: Down on the pig farm
Posted: Wed Apr 09, 2014 2:04 pm Post subject:
Is the data already in the order of the second field? Can you have multiple records for other record types? Going by the data supplied a simple sort on major key of record type and minor key of the first four bytes should be sufficient. If not, why not? _________________ Regards
I want above file to be sorted only for record type 5 for first 4 bytes , rest of the data should be same as input.
Sample output :
1000 1 Amol
1000 2 Amit
2000 3 Sumit
1000 5 Rakesh -- order changed
2000 5 Supriya -- Order changed
2000 6 Sarita
1000 6 satish
There are multiple records for each record type but is it not neccessary to have amount field should be sorted in input file ( Position 1 to 4) , i want to sort on this amount field only for record type 5, rest of the record should be same as sorted on record type.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum