I am assuming that date will be unique otherwise replace it with a unique row identifier.
data temp;
input date : date9. amt;
format date date9.;
datalines;
1JAN2013 45
2JAN2013 31
3JAN2013 65
;
run;
proc sql;
select a.date, a.amt, (select SUM(b.amt) from temp as b where b.date <= a.date) as running_total
from temp as a
order by a.date;
quit;
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.