CICS COMMAREACICS Data passing between progs CICS Queues
Communication area is used to transfer the data or information from one program to another program that may be the same transaction or different transactions.
The maximum length of the data can be passed through COMMAREA is 64K.
But the recommended length is 24K and it is not preferred not to pass more than 24K.
Data can be available between the programs which are in communication (i.e. Called program and Calling program).
The programs in communication can add other programs to receive the data.
The programs involved in communication can add the COMMAREA in working-storage section and linkage section based on its hierarchy level.
The first program which creates the COMMAREA can define it in working-storage section and the rest of the programs should it have in Linkage section.
COMMAREA concept will be mainly used in three different cases.
- Passing the data between programs during the return of the transaction.
- While using the LINK of the programs.
- While using the XCTL of the programs.
Using COMMAREA in RETURN command:
The COMMAREA for return command is used to transfer the data between the successful transactions.
The COMMAREA is passed to another program when the program task is completed.
COMMAREA always loaded to main memory during the program execution and it won’t be removed from main memory until the task is completed successfully.
Using COMMAREA in XCTL/LINK command:
COMMAREA for return command is used to transfer the data between the programs are transactions which might be successful or unsuccessful.
COMMAREA used with LINK command can be updated in both calling program and called program.
Calling program can update the COMMAREA which is used with LINK command even though the control returned back from called program.
Calling program can’t update the COMMAREA which is used with XCTL command because of the control didn’t come back in XCTL communication.
CICS Data passing between progs CICS Queues