Compared to IMS-DC the process for CICS is easier. In this post I would like to give some of the important topics.
CICS reserved word and you would use it in the subroutine. For example, you are calling a subprogram and passing data. The interesting point is you do not know whether data is received or not.
I pass data from the screen to first main program and to next sub-program. With this variable, you can test it and control the program-logic.
IF EIBCALEN = 0
And, you can continue writing the code, If EIBCALEN = 1 to throw abend.
The above sample code shows how we receive the data in sub-module.
Similarly, we can use DFHCOMMAREA in Linkage section, to get data from the main program into subprogram.
In the main program, we pass data as below:
LINK PROGRAM (ABCDEF)
LENGTH(LENGTH OF WS-DATA-AREA)
In the sub-program we need to use DFHCOMMAREA in linkage section to get the data.
10 LS-DATA-AREA PIC X(1000)
The above are the possible ways to get data from main-program to sub-program. I have collected the picture from IBM, how data will pass check here .