Hi. Even if one thinks that IFN and IFC functions might make SAS code difficult to read, you might want to use one of those functions in a situation with a CONDITIONAL LAG (that works since the LAG function is executed at each pass through a data step when embedded in of of those functions ... http://www.howles.com/saspapers/CC33.pdf).