Asynchronous output programming model

Use this programming model to retrieve output that has been queued by IMS™.

Your application might need to retrieve output that was queued at some earlier time. Such output is called asynchronous output. Asynchronous output can result from several situations: undelivered output from commit mode 0 interactions, output from program-to-program switches, output from ISRT calls to an alternate PCB, and output from an IMS application that returns multiple output messages.

To retrieve asynchronous output, a Java™ application executes a SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT or SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT interaction. Your application must provide the value for the interactionVerb property and a value of 0 for the commitMode property of the IMSInteractionSpec object that is used by the execute method of the interaction.

Two types of socket connections that can be used to retrieve asynchronous output are shareable persistent socket and dedicated persistent socket. The way to retrieve asynchronous output messages varies, depending on the type of socket connection that is used. The interactionVerb property values that can be used to retrieve asynchronous output are:
  • SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT
  • SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT
Tip: SYNC_RECEIVE_ASYNCOUTPUT was deprecated inIMS TM Resource Adapter Version 10, and is replaced by SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT.
SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT is different from SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT in how IMS Connect checks for the output on the IMS OTMA asynchronous hold queue.
  • For SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT interactions, if no asynchronous output is in the IMS OTMA asynchronous hold queue when the retrieve request is made, IMS Connect returns an execution timeout notification as soon as the execution timeout value that is specified by the client application has passed.
    Recommendation: Specify the minimum execution timeout value of 10 for SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT interactions.
  • For SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT interactions, when the execution timeout value has passed, if no asynchronous output is in the hold queue, IMS Connect returns an execution timeout error. Otherwise, IMS Connect returns the first output message when it is placed in the queue.
    Recommendation: For SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT interactions, select an appropriate execution timeout value, rather than the minimum value.

The asynchronous output programming model requires commit mode 0 and can be used on both shareable persistent socket and dedicated persistent socket connections. In addition, the IMSInteractionSpec properties purgeAsycOutput, reRoute, and reRouteName do not apply and are ignored when the interactionVerb property is set to either of these values. The interactionVerb property is invoked differently on dedicated and shareable persistent socket connections.