Implementing the asynchronous callout function

Start of changeTo issue an asynchronous callout request from your IMS™ application, issue the ISRT ALTPCB call and specify the OTMA destination descriptor name or the DFSYPRX0 and DFSYDRU0 routing exit routines.End of change

Any response to the callout request that is returned to IMS is handled as a new incoming transaction. If there is a response, the requesting application or a different IMS application must be coded to handle the response that is returned in a separate transaction.

Unlike synchronous callout requests, asynchronous callout requests do not require the IMS application program that issues the request to wait for a response in the dependent region. After it issues an asynchronous callout request, the application program can terminate and free the dependent region. Any response to the callout request that is returned to IMS is handled as a new incoming transaction and IMS schedules a new application program instance to process it.

If an asynchronous callout request generates a response, however, the benefit gained by freeing dependent regions might be offset by the additional complexity of managing the response. For asynchronous callout responses, your installation is responsible for developing the method for correlating the response to the original request. For synchronous callout requests, IMS manages that correlation.

The following high-level steps provide an overview of implementing and deploying your asynchronous callout application and function.

  1. Plan for the correlation of asynchronous callout responses.
  2. Create or modify an IMS application to issue an ISRT ALTPCB call for asynchronous callout requests.
  3. Define the callout routing information. There are two options to define the required information:
    • Define an OTMA routing descriptor.
    • Code the DFSYPRX0 and DFSYDRU0 exit routines.
    Start of changeYou can use either the routing descriptor, the exit routines, or a combination of both to specify how the callout request is routed.End of change
  4. Optional: Restart IMS for the newly defined OTMA descriptor. A restart is required only if you create or modify an OTMA routing descriptor in the DFSYDTx member of the IMS.PROCLIB data set. You do not need to restart IMS if you use the CREATE OTMADESC or UPDATE OTMADESC commands.
  5. Run the IMS application that issues the callout request. The IMS application is usually triggered through an initiating client, such as a terminal, or an IMS Connect or OTMA client.