jingju11 发表于 2012-9-28 10:34 
had is your original data set--with grouped id. what i am doing is to find the alternative to transp ...
Sure, it does work. The result exactly matches with my expectation. Appreciate.
One question: what's the function of x++1. In other words, how does it work among array statement.
One concern: In advance of executing the code, I need to check the number of records of each ID to find the max. After that, I can set the dimension of the array tt.
All in all, sincerely grateful for your help.