Main Program: ID DIVISION. PROGRAM-ID. HAS. ...
ID DIVISION.
PROGRAM-ID. HAS.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 TID PIC X(4).
77 MSG PIC X(50) VALUE 'IMPORTANT OF LINK PROGRAM'.
77 A PIC X(35) VALUE 'THIS IS MAIN PROGRAM'.
77 B PIC X(35) VALUE 'NOW CONTROL MOVE TO SUB'.
PROCEDURE DIVISION.
EXEC CICS RECEIVE INTO (TID) LENGTH(LENGTH OF TID) END-EXEC.
EXEC CICS SEND FROM(MSG) END-EXEC.
EXEC CICS RECEIVE END-EXEC.
EXEC CICS SEND FROM(A) ERASE END-EXEC.
EXEC CICS RECEIVE END-EXEC.
EXEC CICS SEND FROM(B) END-EXEC.
EXEC CICS RECEIVE END-EXEC.
EXEC CICS XCTL
PROGRAM('SUB')
END-EXEC.
EXEC CICS RETURN END-EXEC.
Sub Program:
ID DIVISION.
PROGRAM-ID. SEN.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 D PIC X(35) VALUE 'THIS IS SUB PROGRAM'.
77 E PIC X(50) VALUE 'NOW CONTROL TO MAIN'.
77 C PIC X(40) VALUE 'THANK U BYE'.
PROCEDURE DIVISION.
EXEC CICS SEND FROM(D) END-EXEC.
EXEC CICS RECEIVE END-EXEC.
EXEC CICS SEND FROM(E) END-EXEC.
EXEC CICS RECEIVE END-EXEC.
EXEC CICS SEND FROM(C) END-EXEC.
EXEC CICS RECEIVE END-EXEC.
EXEC CICS RETURN END-EXEC.
No comments
Post a Comment