My appologies in an attempt to be brief and to the point...I have made my question too vague.
This is what I am doing. X one of many ID numbers. I want to loop through my file and write it to a second file checking the ID number on the way. For every UN-unique instance of the ID (say it appear 10 times throughout the file)I want to increment it's sequence number
So the output might look like this
ID SEQ
1 1
1 2
2 1
3 1
1 3
My problem is I just am not good enough to understand how to accomplish this unless all ID 1's were consecutive and all ID 2's were consecutive etc etc etc.
aschroh