This COMPUTE statement begins a compute block that executes at the end of the report. The LINE statement writes the quoted text and the value of Sales.sum (with the DOLLAR7.2 format). An ENDCOMP statement must end the compute block.
   compute after;
       line 'Total for all departments is: '
            sales.sum dollar7.2 '.';
   endcomp;