IDENTIFICATION DIVISION. PROGRAM-ID. TEST_DIVIDE. DATA DIVISION. WORKING-STORAGE SECTION. 77 NUM-02 PIC S9(8). 77 NUM-03 PIC S9(11)V9(3) COMP. 77 NUM-04 PIC S9(10)V9(4) COMP. 77 EDI-01 PIC --,---,---,--9.999. PROCEDURE DIVISION. MAIN. * DIVIDE ope1 BY ope2 GIVING ope3 REMAINDER DISPLAY \"DIVIDE 8 BY 3 GIVING \" WITH NO ADVANCING DIVIDE 8 BY 3 GIVING NUM-02 REMAINDER NUM-03 MOVE NUM-02 TO EDI-01 DISPLAY EDI-01 WITH NO ADVANCING MOVE NUM-03 TO EDI-01 DISPLAY \", REMAINDER \" EDI-01 * DIVIDE ope1 BY ope2 GIVING ope3 REMAINDER DISPLAY \"DIVIDE 8 BY 3 GIVING \" WITH NO ADVANCING DIVIDE 8 BY 3 GIVING NUM-03 REMAINDER NUM-04 MOVE NUM-03 TO EDI-01 DISPLAY EDI-01 WITH NO ADVANCING MOVE NUM-04 TO EDI-01 DISPLAY \", REMAINDER \" EDI-01 * DIVIDE ope1 BY ope2 GIVING ope3 ope4 ope5 DISPLAY \"DIVIDE 60072916306 BY 260663 GIVING \" DIVIDE 60072916306 BY 260663 GIVING NUM-02 NUM-03, NUM-04 MOVE NUM-02 TO EDI-01 DISPLAY EDI-01 WITH NO ADVANCING MOVE NUM-03 TO EDI-01 DISPLAY \", \" EDI-01 WITH NO ADVANCING MOVE NUM-04 TO EDI-01 DISPLAY \", \" EDI-01 * DIVIDE ope1 INTO ope2, ope3, ope4 DISPLAY \"DIVIDE 3 INTO \" WITH NO ADVANCING DISPLAY NUM-02 \", \" NUM-03 \", \" NUM-04 \"= \" DIVIDE 3 INTO NUM-02, NUM-03, NUM-04 MOVE NUM-02 TO EDI-01 DISPLAY EDI-01 WITH NO ADVANCING MOVE NUM-03 TO EDI-01 DISPLAY \", \" EDI-01 WITH NO ADVANCING MOVE NUM-04 TO EDI-01 DISPLAY \", \" EDI-01 * DIVIDE ope1 INTO ope2 GIVING ope3 ope4 ope5 DISPLAY \"DIVIDE 260663 INTO 60072916306 GIVING \" DIVIDE 260663 INTO 60072916306 GIVING NUM-02 NUM-03, NUM-04 MOVE NUM-02 TO EDI-01 DISPLAY EDI-01 WITH NO ADVANCING MOVE NUM-03 TO EDI-01 DISPLAY \", \" EDI-01 WITH NO ADVANCING MOVE NUM-04 TO EDI-01 DISPLAY \", \" EDI-01 STOP RUN . * ================================================================= * The result is: * DIVIDE 8 BY 3 GIVING 2.000, REMAINDER 2.000 * DIVIDE 8 BY 3 GIVING 2.666, REMAINDER 0.002 * DIVIDE 60072916306 BY 260663 GIVING * 230,462.000, 230,462.000, 230,462.000 * DIVIDE 3 INTO +00230462, +00000230462000, +00002304620000= * 76,820.000, 76,820.666, 76,820.666 * DIVIDE 260663 INTO 60072916306 GIVING * 230,462.000, 230,462.000, 230,462.000