The reroute function, multiple-message output, and NAK responses
If a transaction produces multiple output messages, OTMA reroutes the first output message that triggers a NAK response and any subsequent output messages for the same transaction that are on the IOPCB at the time the NAK response message is received.
OTMA reroutes subsequent output messages for the same transaction that arrive to the IOPCB after the initial reroute only after triggering another NAK response.
If a transaction initiates a program-to-program switch and IMS Connect receives a NAK response to the first output message from an application program, OTMA reroutes output messages sent by a secondary application program after a program-to-program switch only if they are already on the output queue when the initial NAK response message is received or if the original input message specifies a reroute destination. If the original input message does not specify a reroute destination, OTMA does not reroute undeliverable output generated after a program-to-program switch.
If a send-then-commit (CM1) transaction message does a program-to-program switch to a second CM0 transaction message and the first transaction does an insert to the IOPCB, IMS reroutes only the second or subsequent CM0 messages that insert to the IOPCB. IMS reroutes the CM0 output of a CM1 input message only if the client application requests reroute in the original CM1 transaction message.