The communication area is an area of main storage that’s designed to let programs or tasks communicate with one another.
Best books to Read on CICS here
Rules to Use COMMAREA
- In general, you’ll use the communication area in one of two ways: (1) to communicate with a program you invoke via a LINK or XCTL command or (2) to communicate with the next task invoked at the same terminal as the current task .
- You provide two definitions for the communication area. The working-storage definition, which can have any name, is the source of the data that’s passed on to the next program execution. The Linkage Section definition, which must be named DFHCOMMAREA, is used to access the data passed by the previous program execution.
- The communication area can be up to 32K in length, and its contents are up to you. It can contain control totals, file records, flags that indicate the current event context, and so on.
- To send a communication area to a task or program, you specify the name of the area in the COMMAREA option of a LINK, XCTL, or RETURN command. To receive a communication area, you simply code the DFHCOMMAREA field in the Linkage Section.
- The important step. Even if you don’t need to save data between program executions, you should code a one-byte communication area in working storage and a one-byte DFHCOMMAREA in the Linkage Section. This allows you to detect the first execution of the program in a pseudo-conversational session.
Syntax to Use DFHCOMMAREA
Coding to access common system areas
- Db2-How to Access CICS from Db2 Stored Proc? (srinimf.com)
- DB2 Stored Proc from CICS-How? (srinimf.com)
- COBOL- Debugger and Programmer Role (srinimf.com)