If you make a copy of the dataset, deleting the first observation for each account, and then merging the copy back with the original dataset, you will have the current value and the next one on the same row of data, allowing you to substract.
For example :
[pre]
data a;
input account_no trans_amt;
datalines;
100 1000
100 500
100 2000
200 3000
200 2000
;
run;
data a2 ;
set a (rename=(trans_amt = next_amt)) ;
by account_no ;
if first.account_no then delete ;
run ;
data result (drop=next_amt) ;
merge a a2 ;
by account_no ;
amount = trans_amt-next_amt ;
run ;
proc print ;
run ;
[/pre]
Regards,
Olivier