Processing protected transactions in IMS
IMS receives the protected transaction and extracts the context token from the OTMA message header. IMS saves the context token in its own control block before placing the protected transaction on the IMS message queue.
Also, before placing the protected transaction on the message queue, IMS expresses interest in the context using the Express_Context_Interest service (CTXEINT). IMS will therefore be informed if anything happens to the context while the protected transaction is queued on the message queue.
When IMS schedules the protected transaction into a dependent region, IMS switches the context token to the dependent region TCB using the Switch_Context service (CTXSWCH); it also expresses protected interest in the UR using ATREINT. IMS then presents the protected transaction to an application program that processes that particular transaction. The application contains the business logic (for example, update databases, send messages, and others). After the application completes its work, it reaches a commit point. IMS then sends the application output back to the OTMA client and waits for a commit or backout event from z/OS® Resource Recovery Services.