in reply to Re: How to increment a sequence number for evert instance of a value?
in thread How to increment a sequence number for evert instance of a value?

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
  • Comment on Re: Re: How to increment a sequence number for evert instance of a value?

Replies are listed 'Best First'.
Re: Re: Re: How to increment a sequence number for evert instance of a value?
by aschroh (Novice) on Jun 25, 2003 at 20:41 UTC
    would help if I used the code tags gees sorry about that
    ID SEQ 1 1 1 2 3 1 2 1 1 3 2 2
    This is what I want it to output. The problem is the ID aren't consecutive in my file. The question is how to write this so it looks at the ID and KNOWS 1) if it's the first time it's come up and 2) if it's not the first time what to set the SEQ number to?