I dont think you are missing any trick,you have to go the hard way.
You have to write your own sorting finction which uses the second parameter i.e. A,A,B,B,D etc as primary keys and the linenumber of each of them as the secondary key.
amit
crazy_indian@lycos.com
to bug is human to debug...