Compared to IMS-DC the process for CICS is easier. In this post I would like to give some of the important topics.
EIBCALEN: This CICS reserved word we use usually in the subroutine, say, we are calling a sub-program, and passing some data.
The interesting point is we do not know whether data is received or not (I hope you got the point. I am getting some data from the screen passing to first main program and next to sub-program). With this variable we can test it and control the program logic.
IF EIBCALEN = 0
And, we 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 sub program.
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 .