Outbound Chaining
The local node checks that outbound chains of requests conform to the correct SNA usage, to the chaining usage for the session, and to the current state of the session. The local node will accept valid outbound chains of data from the host if one of the following is true:
-
Data traffic is active on a full-duplex session.
-
The session is in a state where it can receive data.
-
The session is between brackets with neither half-session currently sending (see Brackets), or the session is in contention for a half-duplex contention session.
-
The session is waiting for the host to initiate a recovery procedure (see Recovery); for example, the local node has sent a negative response to an outbound chain.
The local node sends a Data message to the application for each outbound request—but note the effects of the application specifying the segment delivery option in the connection information control block (see Segment Delivery). If the application does not specify segment delivery, then the BCI and ECI application flags in the message header reflect the chaining indicators in the RH of the request.
An outbound chain can terminate in several ways:
-
The chain is received complete and without error; all the requests in the chain have been passed to the application as Data messages and have been acknowledged where applicable.
-
The application detects an error in a Data message while receiving the chain. The application should send a Status-Acknowledge(Nack-1) with associated sense data to the local node, which sends a negative response plus the sense data to the host for the request corresponding to the Data message in error. The local node will not purge the remainder of the chain, so the application will see EC (end chain). Alternatively, the host can terminate the chain with a CANCEL, which is delivered to the application as a Status-Control(CANCEL) with ACKRQD set.
-
The local node detects an error in a request and presents the application with a system detected error Data message to report the premature termination of the chain. This message carries the SDI (system detected error indicator) and ECI (end chain indicator) application flags, the sense codes for the error, and the ACKRQD indicator; it does not carry user data. When the application responds with Status-Acknowledge(Ack), the local node generates a negative response to the chain using the appropriate sense code. The application can use the reported sense codes to generate diagnostic information for the user (for example, a 3270 emulator would generate PROG check codes). The local node will purge the remainder of the chain, so the application may not see EC. Alternatively, the host can terminate the chain with a CANCEL, which is delivered to the application as a Status-Control(CANCEL) with ACKRQD set.
-
The host can cancel the chain while sending, by sending the CANCEL request. The local node sends a Status-Control(CANCEL) message to the application, which the application must acknowledge.
If an error occurs while receiving a chain, and the session uses half-duplex flip-flop protocols, then the application must assume an error-recovery-pending state (see Recovery).
For a session using half-duplex flip-flop protocols, if the application flags in the last Data message of the chain have the CDI (change direction) flag set, then:
-
If the chain was received without error, the application has direction.
-
If the application rejected any message in the chain, the host retains direction.
The following four figures illustrate outbound 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 outbound chain is received without error and accepted by the application; note that after sending Status-Acknowledge(Ack) the application has direction.
In the following illustration, a complete outbound chain is received without error, but is rejected by the application; note that even though the chain carried CD, the application does not have direction.
In the following illustration, the local node detects the invalid use of RQD without EC and converts the request to a Data message with the SDI application flag set, plus ACKRQD and appropriate sense codes. The application's Status-Acknowledge(Ack) drives the negative response to the host. This example assumes that the receive check 4007 has been specified in the CICB on the Open (SSCP).
In the following illustration, the host cancels the outbound chain.