Single message control
When using the single message control option (by setting field IRM_F5 to IRM_F5_ONE), the client can receive only a single message.
If there are no messages in the IMS OTMA Asynchronous Queue for the client ID when the request is made, no message will be returned and a time out will occur. Using the single message control option will force the following sequence of events to occur:
- Client issues CONNECT function.
- 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.
- If the socket type is a transaction socket, the RESUME TPIPE call must be issued after the CONNECT function.
- Client issues RESUME TPIPE call with the correct IRM settings.
- Client issues RECEIVE function to receive the Asynchronous output.
- Client sends ACK or NAK to IMS Connect.
- The ACK or NAK can be sent with a user-specified numeric timeout
value.
Or
- Specify NOWAIT for the timeout value.
- The ACK or NAK can be sent with a user-specified numeric timeout
value.
- 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.
- 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.
- 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.