The data step carries a bunch of hidden variables in the pdv that disappear at the end of the data step. To keep them, one needs to insert them into another field. The one that you are interested in is _n_;
I have come up with a (sort of) solution, but for sure soon will get the exact solution to your query. Well this is what I thought of:
If you can create an ID variable in ur raw data set just analogous to your observation and in ur PROC PRINT use 'NOOBS' option... in dat case , ur ouput wud have soemthg like this:
Now this is gonna be fine with few rows ,,, how if the raw data has 100s of rows(I mean really huge data????)???
Will find out and let u know sooner.Even I am eager to know abt this...