IDENTIFICATION
DIVISION.
PROGRAM-ID. ONSIZE.
AUTHOR. KK.
DATE-WRITTEN. 11-11-1111.
SECURITY.
DATA
DIVISION.
WORKING-STORAGE SECTION.
01 NUM1
PIC 9(4) value 4444.
01
NUM2 PIC 9(4) value 7777.
01
NUM3 PIC 9(4).
01
ERR-FLG PIC 99 VALUE 00.
PROCEDURE
DIVISION.
0000-MAIN SECTION.
1000-ACCEPT-PARA.
ADD NUM1 TO NUM2 GIVING NUM3
ON
SIZE ERROR
MOVE
1 TO ERR-FLG.
DISPLAY "NUMBER 1 IS " NUM1.
DISPLAY "NUMBER 2 IS " NUM2.
DISPLAY "NUMBER 3 IS " NUM3.
DISPLAY "ONSIZE ERROR IS "
ERR-FLG.
2000-EXIT-PARA.
STOP RUN. STOP RUN.
No comments:
Post a Comment