Single with wait message control

When using the single with wait message control option (by setting IRM_F5 to IRM_F5_SWAIT), the client can receive only one single message; however, unlike single message control, the single with wait message control can receive a message that is placed in the IMS OTMA Asynchronous Queue for the client ID.

Using the single with wait message control option will force the following sequence of events to occur:

  1. Client issues CONNECT function.
    1. Following the CONNECT function, if the socket type is persistent socket, one or more transactions can be sent and the responses received before RESUME TPIPE call processing.
    2. If the socket type is transaction socket, then the RESUME TPIPE call processing must be issued after the CONNECT function.
  2. Client issues RESUME TPIPE call, with the correct IRM settings.
  3. Client issues RECEIVE function to receive the Asynchronous output.
  4. Client sends ACK or NAK to IMS Connect.
    1. The ACK or NAK can be sent with a user-specified timeout notification.

      Or

    2. Specify NOWAIT for the timeout value.
  5. If a numeric timeout value is specified, the client must issue a RECEIVE function to receive the timeout notification. If the NOWAIT option is specified, no timeout notification is sent. Therefore, the client must not issue a RECEIVE function if NOWAIT is specified.
  6. IMS Connect disconnects the Socket from the Host end if the socket connection is a transaction socket. If the socket connection is a persistent socket, IMS Connect does not disconnect the socket.
  7. Client must issue a DISCONNECT function if the socket connection is a transaction socket. If the socket is a persistent socket, the client can either DISCONNECT the socket or choose to send in a new request such as SENDONLY, SEND of transaction code and data, or issue another RESUME TPIPE call.

If the client responds with a NAK rather than an ACK, the message that has been NAKed will be put back on the OTMA Asynchronous Hold Queue, and can be re-retrieved later. IMS Connect will continue to process as described in events five through seven when a NAK is sent to IMS Connect by the Client.