I am looking for a way in SAS to do the following.
Say you have the following dataset
I would like to number all the records for each customers as follows:
cust_number transno transcounter
A abc123 1
A def456 2
A fed666 3
B bbb444 1
B ttt567 2
B ert444 3
B eee444 4
C tyk333 1
C kyt567 2
As you can see, I want to be able to number of observations in each subgroup (in this case customers) 1, 2, 3, 4 and so on and then restart from 1 again for the next customer or subgroup and so. How can I accomplish this in SAS.