The pre-routing exit DFSYPRX0
This topic contains a sample pre-routing exit for OTMA in IMS.
We must first code a pre-routing exit DFSYPRX0. Parameters passed to this routine by IMS are documented in IMS/ESA Customization Guide.
This exit tests whether the message is intended for a known OTMA destination (in our example VCPEVCPE). If it is, the exit must check whether the transaction sending the message originated in OTMA. If the message originated in OTMA, it will have an OTMA header, so we should exit from DFSYPRX0 with register 15 set to zero.- If the transaction sending the message did not originate in OTMA, we must set the client name to be a valid OTMA client. This is the XCF member-name of the IBM MQ queue manager to which we want to send the message. The IMS/ESA Customization Guide tells you where to set this value. We suggest you set your client name (in the OTMACON parameter of the CSQ6SYSP macro) is set to the queue manager name. This is the default. We should then exit from DFSYPRX0 setting register 15 to 4.
- If the transaction sending the message originated in OTMA, and the destination is non-OTMA, we should set register 15 to 8 and exit.
- In all other cases, we should set register 15 to zero.
If you set the OTMA client name to one that is not known to IMS, the application CHNG or ISRT call returns an A1 status code.
For an IMS system communicating with more than one IBM MQ queue manager, we should repeat the logic for each IBM MQ queue manager.
Sample assembler code is shown in Figure 1: Parent topic: Use OTMA exits in IMS