Hi, anybody can help me how can i initiate my _n_ from 1 when my condition is met. I am using following code to do that. It is working but it has problem where _n_ is linked to 'IF' condition. i.e. if _Type_ = 2 is appearing in row number 5 in my table "AirCont" then my call symputx outcome gives me the outome to 'Y5' , whereas I want that _N_ initiate/incriment only when condition is met. data _null_; set AirCont; if _Type_ = 2 then call symputx(compress('Y' || _n_),year); run; Thanks, KP
... View more