I hear you talking about _N_ as the observation number. However, _N_ is actually the number of times the code cycled to the DATA statement. Try this code to see what I mean: data new_class; set sashelp.class; if sex eq 'M' then return; x=_n_; output; run; proc print data=new_class; run; the original class had 19 obs, new_class has only 9. look at the values for x they are not the same as the obs number, but the number of times the code hit the DATA statement. Just be crateful when referring to _N_ as the observation number. MRG
... View more