Hi, You can try something like this as suggested by data_null_ data have; input num; substract=dif(num); datalines; 1 2 3 4 5 ; run; Thanks, Jagadish
... View more
Meant to mention they were the same but replied to fast. Thanks for pointing that out Hai.kuo. I wasnt sure how much data step understanding there was so I broke down what the automatic sum statement does. EJ
... View more