The division of application data into Data messages and the control of inbound chaining are the responsibility of the application.
The secondary maximum send RU size for the session is a parameter in the BIND from the host and is available in the BICB on the Open(PLU) (OK) Confirm message. The application should ensure that each inbound Data message corresponds to a single RU; that is, it does not contain more data than the maximum RU size given in the BICB.
The application should use the BCI and ECI application flags in the Data message headers to control chaining (see Application Flags). The chain is the unit of recovery, and if recoverable errors occur in the chain, then the application should assume responsibility for recovery (see Recovery).
An inbound chain can terminate in the following ways:
If the local node detects a noncritical error in the format of a Data message from the application or the state of the session, it does not close the PLU connection. Instead, it rejects the Data message in error with a Status-Acknowledge(Nack-2) containing an appropriate error code. No data is sent to the host.
If an inbound chain terminates with an error, then if the session uses half-duplex protocols, the application must assume a receive state (see Recovery).
The following six figures illustrate inbound chaining protocols between the local node and the application, and how those protocols relate to the underlying SNA protocols.
In the first illustration, a complete inbound chain is sent without error and accepted by the host; note that after receiving Status-Acknowledge(Ack) the application relinquishes direction to the host.
In the following illustration, the local node detects a critical error in the format of the second Data message in the chain (ACKRQD without the ECI application flag), sends a Status-Acknowledge(Nack-2) to the application with the appropriate error code, and closes the PLU connection. Note that the local node only generates the CANCEL where the session's FM profile supports CANCEL.
In the following illustration, a complete inbound chain is sent without error, but is rejected by the host; after the negative response, the application must enter receive state, pending error-recovery (see Recovery).
In the following illustration, the application cancels the chain by sending Status-Control(CANCEL); note that the application still has direction and can start a new chain.
In the following illustration, the application closes the PLU session while sending the chain; the local node only generates the CANCEL where the session's FM profile supports CANCEL.
In the following illustration, the local node detects a noncritical error in the format of the second Data message in the chain and sends a Status-Acknowledge(Nack-2) to the application with the appropriate error code.