Previous Topic: Conversation States

Next Topic: Return Codes and System Variables

Conversation Processing

Only a small number of verbs are acceptable to NCL from any given conversation state, otherwise a state error ensues. Following the successful completion of each verb, either the state remains unchanged, or a single state transition is possible. This means that the programmer can always determine the next course of action for the conversation. If verb completion is not successful then further analysis of the reason, by examination of conversation status fields, might be required to determine the most appropriate course of action to follow.

In the simplest analysis, the APPC protocol is a flip-flop communication channel where, in normal operation, the procedure currently sending controls the data flow. Hence, the first speaker procedure continues sending data until it decides to stop. It might decide to stop only when all data has been sent. For example, after sending a request for a database query, to reverse the direction of data flow and receive the response. Or it might pause during transmission to request confirmation (actual receipt by the partner procedure) of that portion of the data sent so far.

Only when the current speaker changes direction can the partner procedure send data the other way. However, if some condition arises that is generally unrecoverable, an error indication can be sent to the current sender to cause transmission to cease, and allow the current receiver to enter send state.

Within your product, all information being sent is buffered until enough data is accrued to warrant transmission, or the need for some application response dictates that an actual network transmission take place. This provides for efficient use of network resources, but means that to synchronize local and remote processing, the application must manage the protocol appropriately. This is achieved through use of the confirmation protocols.