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

  1.       *
  2.        IDENTIFICATION DIVISION.
  3.       *
  4.        PROGRAM-ID. CHAP428.
  5.       *
  6.        ENVIRONMENT DIVISION.
  7.       *
  8.        CONFIGURATION SECTION.
  9.       *
  10.        SPECIAL-NAMES.
  11.            PRINTER IS PRINTER-DISPLAY.
  12.       *
  13.        DATA DIVISION.
  14.       *
  15.        WORKING-STORAGE SECTION.
  16.            01  W005-FIRST-OPERAND               PIC 9.
  17.            01  W005-SECOND-OPERAND              PIC 9.
  18.       *
  19.       *
  20.        PROCEDURE DIVISION.
  21.       *
  22.        MAIN-LINE-LOGIC.
  23.            DISPLAY "THE RESULTS OF TWO IF STATEMENTS".
  24.            MOVE 1 TO W005-FIRST-OPERAND.
  25.            MOVE 1 TO W005-SECOND-OPERAND.
  26.            IF W005-FIRST-OPERAND EQUAL TO W005-SECOND-OPERAND
  27.               DISPLAY " THE VALUES ARE EQUAL "
  28.            ELSE
  29.               DISPLAY " THE VALUES ARE NOT EQUAL ".
  30.            MOVE 0 TO W005-FIRST-OPERAND.
  31.            IF W005-FIRST-OPERAND EQUAL TO W005-SECOND-OPERAND
  32.               DISPLAY " THE VALUES ARE EQUAL "
  33.            ELSE
  34.               DISPLAY " THE VALUES ARE NOT EQUAL ".
  35.            STOP RUN.
  36.