Using GETMAIN SHARED storage
Shared storage is allocated by a GETMAIN SHARED command, and remains allocated until explicitly freed by the same, or by a different, task.
Shared storage can be used to exchange data between any CICS tasks that run during the lifetime of the shared storage. Transactions designed in this way must execute in the same CICS region to work correctly. The dynamic or distributed routing program should ensure that transactions using shared storage are routed to the same target region.
Figure 1
illustrates the use of shared
storage.
Figure 1. Illustration of inter-transaction
affinity created by use of shared storage. The dynamic
transaction routing program needs to be aware of this affinity, and ensure
that it routes TRN2 to the same target region as TRN1.

If the two transactions shown in Figure 1 are parts of a pseudoconversational transaction, the use of shared storage should be replaced by a COMMAREA (if the amount of storage fits within the COMMAREA size limits).