HP-UX SNAplus2 R7 APPC Programmer's Guide

Writing Transaction Programs
Basic Conversations
This timeout is dened for the invoked TP in the SNAplus2 invokable TP data le.
For more information about the conguration of invoked TPs, refer to the
HP-UX SNAplus2 Administration Guide.
2.10 LU-to-LU Sessions
An LU-to-LU session is a logical connection between two LUs. Conversations between TPs occur within sessions.
One conversation can use a session at a time; many conversations can reuse the same session serially.
SNAplus2 enables an LU type 6.2 to have multiple sessions (two or more concurrent sessions with different partner
LUs) and parallel sessions (two or more concurrent sessions with the same partner LU).
During conguration, the System Administrator determines how many sessions a particular LU supports and whether
the LU supports parallel sessions.
2.10.1 Contention
When both LUs attempt to allocate a conversation on the same session at the same time, one must win (the
contention winner) and one must lose (the contention loser). The contention-winner LU and the contention-loser
LU are determined when the session is established.
In a session, the contention-loser LU must ask permission of the contention-winner LU before allocating a
conversation. The contention winner may or may not grant permission. The contention-winner LU, on the other
hand, simply allocates a conversation when desired.
During conguration, the System Administrator can dene modes. A mode is a set of networking characteristics.
Among the characteristics the System Administrator can specify within a mode denition is the number of contention-
winner and contention-loser sessions for the local LU and partner LU that use the mode. (The TP issuing the
[MC_]ALLOCATE verb species a mode, local LU, and partner LU.)
2.11 Basic Conversations
Basic conversations are generally used by service TPs. Service TPs are programs that provide services to other local
programs. They are more complex than mapped conversations but provide an experienced LU 6.2 programmer with
a greater degree of control over the transmission and handling of data. This section summarizes the characteristics
of basic conversations where they differ from mapped conversations.
2.11.1 Logical Records
In a basic conversation, data is sent in the form of logical records. A logical record is a record that has the general
data stream (GDS) syntax described in this section. For more information about GDS syntax, refer to the IBM
publication SNA Formats.
The sending TP must format the data into logical records, and the receiving TP must decode the logical records into
usable data. A TP can send multiple logical records with a single SEND_DATA verb, or it can send a single logical
record in multiple parts (called segments) with multiple SEND_DATA verbs. A TP can receive multiple logical
records with a single receive verb (RECEIVE_AND_WAIT, RECEIVE_IMMEDIATE, or RECEIVE_AND_POST),
or it can receive a single logical record in multiple parts with multiple receive verbs.
If a logical record is a single record, it consists of the following elds:
A 2-byte record length (LL) eld
73