The destination resolution user exit
This topic contains a sample destination resolution user exit for IMS.
If we have set registers 15 to 4 in DFSYPRX0, or if the source of the transaction was OTMA and you set Register 15 to zero, your DRU exit is invoked. In this example, the DRU exit name is DRU0VCPE.
The DRU exit checks if the destination is VCPEVCPE. If it is, it sets the OTMA user data (in the OTMA prefix) as follows:
- Offset
- OTMA user data
- (decimal)
- 0
- OTMA user data length (in this example, 334)
- 2
- MQMD
- 326
- Reply to format
These offsets are where the IBM MQ - IMS bridge expects to find this information.
We suggest that the DRU exit is as simple as possible. Therefore, in this sample, all messages originating in IMS for a particular IBM MQ queue manager are put to the same IBM MQ queue.
If the message needs to be persistent, IMS must use a synchronized transaction pipe. To do this, the DRU exit must set the OUTPUT flag. For further details, refer to the IMS/ESA Customization Guide.
Write an IBM MQ application to process this queue, and use information from the MQMD structure, the MQIIH structure (if present), or the user data, to route each message to its destination.
A sample assembler DRU exit is shown in Figure 1. Parent topic: Use OTMA exits in IMS