Application programs and their partners on half-duplex conversations regularly exchange the roles of sender and receiver according to rules enforced by VTAM®. On half-duplex conversations, only one partner can send information while the other partner is receiving (except in certain error situations). When an application program is finished sending data, it can surrender its prerogative as the sender to allow its partner to send information. This type of protocol is referred to as half-duplex flip-flop protocol.
For the most part, the sender determines when its partner LU can send logical record data. The sending application program must surrender its prerogative to send data by notifying VTAM that it is ready to receive. This places the local conversation in RECEIVE state. VTAM then notifies the receiving side that it can now send. The receiving application program receives this notification as part of the parameters returned on an APPCCMD CONTROL=RECEIVE macroinstruction. The receiver's side of the conversation is then placed in SEND state.
Attempts to issue these macroinstructions without being in SEND state result in an error.
When an APPCCMD CONTROL=SEND, QUALIFY=ERROR macroinstruction is issued while in a receiving state, the conversation is placed in SEND state. This situation is an exception to the rule that the sending side of the conversation determines when the partner LU can send data. The partner application's conversation state is changed to RECEIVE when notification of the error is reported on an APPCCMD macroinstruction.
For more information on how an application changes the conversation from SEND state to RECEIVE state, see Entering RECEIVE state.