Hi,
Below is the sample input file -
Input File:
ACCOUNT AMONUT
111111 100.00
999999 200.00
888888 500.00
999999 50.00
111111 150.00
999999 600.00
888888 750.00
999999 999.00
111111 200.00
999999 250.00
888888 300.00
I want to create a file in which the records will be as follows -
Required Output:
ACCOUNT AMONUT
999999 999.00
999999 600.00
999999 250.00
999999 200.00
999999 50.00
888888 750.00
888888 500.00
888888 300.00
111111 200.00
111111 150.00
111111 100.00
The sorting needs to be done on the amount field but the grouping should be on the Account # field in such a way that the records corresponding to the account # having the highest amount should be listed in descending order in the output file. Then the records corresponding to the account of 2nd highest amount and so on.
I'm not good at DFSORT/SYNCSORT. And not sure if this kind or sorting+grouping would be possible. But thought of exploring the possibilities before having to write a program to create the required output file.[code][/code]