A sample application
A simple example can be used to explain the consequences of different application design techniques.
Figure 1
shows how CICS MAPs and transaction
IDs are correlated, and how the transactions
work, without
DB2 considerations.
Figure 1. Example of a typical application
design
In this example:

- The transaction ID, TRX0, is specified in the EXEC CICS RETURN TRANSID(TRX0) command, when a program (not shown) returns control after displaying MAP0.
- The next transaction then uses the transaction ID, TRX0, independent of what the terminal user decided to do.
- Program P0 is the initial program for transaction TRX0.
- We assume that all programs shown are issuing SQL calls.
- Depending on the option chosen by the terminal user, program P0 performs a CICS transfer control (XCTL) to one of the programs: P1, P2, or P3.
- After issuing some SQL calls, these programs display one of the maps: MAP1, MAP2, or MAP3.
- The example shown on the right side of the figure works in the same way.
- In some situations, program P3 transfers control to program PB.