z/OS Communications Server: SNA Programmer's LU 6.2 Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Maintaining conversation states

z/OS Communications Server: SNA Programmer's LU 6.2 Guide
SC27-3669-00

LU 6.2 architecture defines the status of a conversation at any given time in terms of a finite state machine. The states define conditions such as whether the application program is sending or receiving data, or ending a conversation. VTAM® maintains a finite state machine internally to track changes in a conversation's status. As the name implies, only a limited number of states are possible. While in a given state, application programs are restricted to a subset of APPCCMD macroinstructions. VTAM always tracks the state of the conversation and prevents application programs from issuing macroinstructions not allowed in a specific state.

The state of a conversation is somewhat predictable. For half-duplex conversations, the states for each side of the conversation are complementary. When one side of the conversation is in SEND state, the other side of the conversation is in RECEIVE state. The SEND state implies that the LU on the side of the conversation in this state can send data. The RECEIVE state implies that the LU on the side of the conversation in RECEIVE state can receive data. When the application program on the SEND side of a half-duplex conversation issues a RECEIVE macroinstruction, the application program's side of the conversation enters RECEIVE state and the other side of the conversation enters SEND state.

For full-duplex conversations, both sides of the conversation maintain a SEND/RECEIVE state, because both conversation partners can send and receive information concurrently. When an APPCCMD CONTROL=DEALLOC|DEALLOCQ macroinstruction is issued, the conversation initiating the deallocation enters RECEIVE_ONLY state. The conversation partner's side of the conversation is placed in SEND_ONLY state as soon as the deallocation request is received.

Application programs do not have to implement their own finite state machine to track a conversation. Many of the states are of interest only to VTAM. When designing the application program, however, be aware of which state the conversation is in and which APPCCMD macroinstructions the application program can issue from that conversation state. (For example, normal deallocation of a half-duplex conversation could not be initiated by the application program while the conversation is in RECEIVE state.) You can code the application program to include flags to prevent the application program from attempting to issue invalid macroinstructions, or you can implement your own version of a finite state machine.

Information about the current conversation state can be obtained several ways. VTAM returns the current conversation state in the RPL6CCST (CONSTATE) field of the ISTRPL6X on many of the APPCCMD macroinstructions. The APPCCMD CONTROL=TESTSTAT, QUALIFY=SPEC|ISPEC macroinstruction can also return conversation state information. The following sections provide further information about conversation states.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014