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

  1.        IDENTIFICATION DIVISION.
  2.       *
  3.        PROGRAM-ID. PROG406.
  4.       *
  5.       ***************************************************
  6.       *                                                 *
  7.       * 1. DATE-WRITTEN. 08/01/90.                      *
  8.       *                                                 *
  9.       * 2. THIS PROGRAM DISPLAYS ON THE PRINTER         *
  10.       *    A VALUE COMPUTED FROM AN ADD OPERATION.      *
  11.       *                                                 *
  12.       ***************************************************
  13.       *
  14.       *
  15.        ENVIRONMENT DIVISION.
  16.       *
  17.        CONFIGURATION SECTION.
  18.       *
  19.        SPECIAL-NAMES.
  20.       *
  21.            PRINTER IS PRINTER-DISPLAY.
  22.       *
  23.       *
  24.        DATA DIVISION.
  25.       *
  26.       *
  27.       ****************************************************
  28.       *                                                  *
  29.        WORKING-STORAGE SECTION.
  30.       *                                                  *
  31.       ****************************************************
  32.       *
  33.       *
  34.        01  W005-FIRST-OPERAND              PIC 9   VALUE 2.  
  35.       *
  36.        01  W005-SECOND-OPERAND             PIC 99  VALUE 12.
  37.       *
  38.       *
  39.        PROCEDURE DIVISION.
  40.       *
  41.        PRINT-COMPUTED-VALUE.
  42.            ADD W005-FIRST-OPERAND TO W005-SECOND-OPERAND.
  43.            DISPLAY "PROGRAM PROG406: THE SUM OF 2 + 12 IS:"
  44.                                        UPON PRINTER-DISPLAY.
  45.            DISPLAY W005-SECOND-OPERAND UPON PRINTER-DISPLAY.
  46.            STOP RUN.
  47.