ID DIVISION. PROGRAM-ID. AD12GM. DATA DIVISION. ...
PROGRAM-ID. AD12GM.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY ADD001.
01 RES.
02 A PIC 9(3).
02 B PIC 9(3).
02 C PIC 9(4).
77 Z PIC X(80).
PROCEDURE DIVISION.
MOVE LOW-VALUES TO ADD1I.
MOVE LOW-VALUES TO ADD1O.
EXEC CICS
SEND MAP('ADD1') MAPSET('ADD001')
END-EXEC.
MAIN-PARA.
EXEC CICS HANDLE AID
PF1(ADD-PARA)
PF2(SUB-PARA)
ANYKEY(E-PARA)
END-EXEC.
EXEC CICS
RECEIVE MAP('ADD1') MAPSET('ADD001')
END-EXEC.
ADD-PARA.
MOVE NO1I TO A.
MOVE NO2I TO B.
COMPUTE C = A + B.
MOVE C TO RESO.
MOVE 'ADD SUCCESSFUL' TO MSGO.
EXEC CICS
SEND MAP('ADD1') MAPSET('ADD001')
ERASE
END-EXEC.
EXEC CICS RETURN END-EXEC.
SUB-PARA.
MOVE NO1I TO A.
MOVE NO2I TO B.
COMPUTE C = A - B.
MOVE C TO RESO.
MOVE 'SUB SUCCESSFUL' TO MSGO.
EXEC CICS
SEND MAP('ADD1') MAPSET('ADD001')
ERASE
END-EXEC.
EXEC CICS RETURN END-EXEC.
E-PARA.
MOVE 'PRESS F1 AND F2' TO MSGO.
EXEC CICS SEND
SEND MAP('ADD1') MAPSET('ADD001')
ERASE
END-EXEC.
go to main-para.
<!--8eb9d0a906534de48f8c0c9d846a1fe7-->
No comments
Post a Comment