TABLE FILE AAA SUM COSTAMT BY COSTDT WHERE COSTDT GE '&FROMDT' AND COSTDT LE '&TODT'; END
OUTPUT of the above code: COSTDT COSTAMT 2010/03/18 1424.6900 2010/03/22 31293.2500 2010/03/23 8429.5600 2010/03/24 8653.3200 2010/03/25 11015.5500
In this code I am summing the COSTAMT for each date. Instead I want the COSTAMT field to be cumulative sum, which means 2010/03/18 will have 1424.6900, next 2010/03/22 should be '31293.2500 + 1424.6900' (COSTAMT for 2010/03/22 + COSTAMT for 2010/03/18). So my final output should look like this :