home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / cobol / compiler / cobol650 / cobsrc / prog424.cob < prev    next >
Text File  |  1990-09-02  |  1KB  |  39 lines

  1.        IDENTIFICATION DIVISION.
  2.       *
  3.        PROGRAM-ID. CHAP424.
  4.       *
  5.        ENVIRONMENT DIVISION.
  6.       *
  7.        CONFIGURATION SECTION.
  8.       *
  9.        SPECIAL-NAMES.
  10.            PRINTER IS PRINTER-DISPLAY.
  11.       *
  12.       *
  13.        DATA DIVISION.
  14.       *
  15.        WORKING-STORAGE SECTION.
  16.       *
  17.            01  W005-DIVISOR                     PIC 9  VALUE 0.
  18.       *
  19.            01  W005-DIVIDEND                    PIC 99 VALUE 5.
  20.       *
  21.            01  W005-QUOTIENT                    PIC 9.
  22.       *
  23.       *
  24.        PROCEDURE DIVISION.
  25.       *
  26.        MAIN-LINE-LOGIC.
  27.            GO TO PRINT-COMPUTED-VALUE.
  28.       *
  29.       *
  30.        PRINT-COMPUTED-VALUE.
  31.            DIVIDE W005-DIVISOR INTO W005-DIVIDEND GIVING W005-QUOTIENT
  32.                        ON SIZE ERROR
  33.                           DISPLAY "ON SIZE ERROR ENCOUNTERED"
  34.                           DISPLAY "PROGRAM ABORTING"
  35.                           STOP RUN.
  36.            DISPLAY "No On Size error".
  37.            DISPLAY "PROGRAM EXITING NORMALLY".
  38.            STOP RUN.
  39.