Module 8: CICS Program and Data Passing
Passing Data Between Programs
Ways to pass data between CICS programs
- COMMAREA: one flat data area passed on LINK, XCTL or RETURN. Simple, but both programs must agree on the layout.
- CHANNEL with CONTAINERs: many named data items passed on LINK, XCTL, START or RETURN. Flexible and easy to extend.
- CICS storage areas: CWA, TWA and TCTUA. Shared storage reached with the ADDRESS command.
- Temporary storage queues: one program writes, another reads. Good for larger data.
- Files and DB2 tables: pass a key in the COMMAREA and let each program read the record itself.
COMMAREA vs CHANNEL - which to use
- Use COMMAREA for small, fixed data where both programs are written together.
- Use CHANNEL when the data has many parts, or when different programs need different parts.
- Use CHANNEL when the called program must send changed data back to the caller.
- Adding a container never breaks existing programs. Changing a COMMAREA layout can break them.
- For new development, CHANNEL is the recommended approach.
Sharing data with CWA, TWA and TCTUA
MainframeBug Assistant