See also DECL and USE BEFORE REPORTING for creating Declarative Section statements, paragraphs, and sections.
Program Painter code
DPAR DUMMY-FOOTER SECTION USE BEFORE REPORTING FOOTER-DUMMY DPAR DUMMY-FOOTER-PARA MOVE TOTAL-DIFF TO TIME-TOTAL SUPPRESS PRINTING DPAR TOTAL-FOOT-SECTION SECTION USE BEFORE REPORTING TOTAL-FOOT TOTAL-FOOT-PARA TIME-AVERAGE = TIME-TOTAL / AVERAGE-CNT CALL-PERCENTAGE = (HALF-HOUR-CALLS / AVERAGE-CNT) ... * 100 MOVE HALF-HOUR-CALLS TO HOLD-CALLS ADD HOLD-CALLS TO HALF-HOUR-CNT MOVE ZERO TO HALF-HOUR-CALLS DPAR CONTROL-FOOTING-FINAL SECTION USE BEFORE REPORTING CNTL-FT-GP DPAR CONTROL-FOOTING-FINAL-PARA IF SYSIN-TRACKER NOT = 'CTSALL' SUPPRESS PRINTING ELSE FINAL-PERCENTAGE = (HALF-HOUR-CNT / FINAL-PROB- CNT * 100)
Generated code
DECLARATIVES. DUMMY-FOOTER SECTION. USE BEFORE REPORTING FOOTER-DUMMY DUMMY-FOOTER-PARA. MOVE TOTAL-DIFF TO TIME-TOTAL SUPPRESS PRINTING TOTAL-FOOT-SECTION SECTION. USE BEFORE REPORTING TOTAL-FOOT $TOTAL-FOOT-PARA TIME-AVERAGE = TIME-TOTAL / AVERAGE-CNT CALL-PERCENTAGE = (HALF-HOUR-CALLS / AVERAGE-CNT) ... * 100 MOVE HALF-HOUR-CALLS TO HOLD-CALLS ADD HOLD-CALLS TO HALF-HOUR-CNT MOVE ZERO TO HALF-HOUR-CALLS CONTROL-FOOTING-FINAL SECTION. USE BEFORE REPORTING CNTL-FT-GP CONTROL-FOOTING-FINAL-PARA. IF SYSIN-TRACKER NOT = 'CTSALL' SUPPRESS PRINTING ELSE FINAL-PERCENTAGE = (HALF-HOUR-CNT / FINAL-PROB-CNT * 100) END DECLARATIVES.
Comments: