Brackets

An LU type 0 session can operate either with or without bracket protocols. The choice is specified in the BIND session parameter.

In the following discussion, BB denotes that the begin-bracket indicator is set on in a request, and EB denotes that the end-bracket indicator is set on in a request.

Note: The conditional end bracket indicator is not supported by LU type 0 3270 terminals.

If brackets are used, the bracket state after the BIND request (sent by OPNDST) and after the SNA Clear request (sent by SESSIONC) is the between-brackets state. The between-brackets state also occurs when a bracket is ended by sending a request specifying EB. The first data RU sent when the session is in the between-brackets state must specify BB. The application program cannot send BID to begin a bracket, because no data-flow-control requests are allowed for LU type 0. The 3270 LU is always the first speaker; that is, the LU is always the winner if both the LU and the application program try to begin a bracket at the same time. If the session is in the between-brackets state and the 3270 operator sends data to the application program, the program receives a request specifying BB. If the application program was trying to begin a bracket at the same time, the application program's request is rejected with a negative response (SNA sense code = X'08130000').

After a bracket has been started and until it is ended by the application program, all requests from either the LU or the application program are sent with both the begin-bracket and end-bracket indicators set off. Only the application program can send a request specifying EB. The unconditional bracket termination rule is used; this means that the bracket is ended immediately when a request specifying EB is sent (it is not necessary to receive a positive response to the request).

The bracket can also be ended by sending an SNA Clear request using the SESSIONC macroinstruction. The Clear request is useful to establish synchronization of bracket states between the 3270 LU and the application program. After Clear completes, both ends of the session are in the between-brackets state no matter what state they were in previously.

The application program should not begin or end a bracket with data that contains a 3270 command that causes input to occur (for example, Read Modified).

The bracket state transitions that can occur at the 3270 LU, which is always the SLU, and the bracket-protocol first speaker, are shown in Figure 1.

Figure 1. Bracket-state transitions at the 3270 SLU
The diagram shows bracket state transitions at 3270 LU. The states are between-brackets state, pending-in-bracket state, and in-bracket state.