HP-UX SNAplus2 R7 APPC Programmer's Guide

Writing Transaction Programs
Basic Conversations
A 2-byte GDS identier (ID) eld (for example, 0x12FF identies the data as application data)
A data eld that can range in length from 032,763 bytes
The rst four bytes are called the LLID.
If a logical record has multiple parts, the rst part has the same format as a single record, and all subsequent parts
consist of the following elds:
A 2-byte record length (LL) eld
A data eld that can range in length from 032,765 bytes
The hexadecimal value for the LL eld includes the two bytes for the LL eld (and the two bytes for the ID eld,
if it is present). For example, a single part GDS with no zero bytes of data has a value of
0x0004 for its LL eld.
The LL eld must be in high-low format, rather than byte-swapped format. For example, a length of 230 bytes is
represented as 0x00E6, rather than 0xE600.
Bit 0 of byte 0 of the LL (the most signicant bit) is used to indicate length continuation (segmentation). The
following example shows ten bytes of data (each data byte has the value DD) split into three GDS segments. The
rst and second segments each contain four bytes of data, and the last segment contains two bytes of data.
8008 12FF DDDD DDDD
8006 DDDD DDDD
0004 DDDD
The following values for the LL eld are not valid (except when sending a PS header as described in Section 2.11.1,
Logical Records):
0x0000
0x0001
0x8000
0x8001
In a mapped conversation, the sending TP sends one data record at a time, and the receiving TP receives one data
record at a time. No record conversion is required of the TPs.
Sending PS Headers in Logical Records
If the conversations synchronization level is AP_SYNCPT, the application may need to send and receive data in the
form of PS Headers. The Syncpoint Manager is responsible for setting up the appropriate PS Headers to send to
the partner application, based on Syncpoint functions required by the application, and for performing the required
Syncpoint processing based on the PS Headers it receives from the partner application.
An LL eld of 0x0001 indicates that the data is a PS Header; the sending application must specify an LL eld of
0x0001 instead of specifying the length of the data eld, and the receiving application must interpret the data as
a PS Header if it receives an LL eld of 0x0001. If the conversations synchronization level is not AP_SYNCPT,
the value 0x0001 is not a valid LL eld, and will be rejected.
2.11.2 Reporting Errors and Abends
In a basic conversation, a TP can indicate whether an error or abend (abnormal program termination) was caused
by a service TP or by a program using the service TP. This enables two communicating service TPs to distinguish
between errors they may have caused and errors that may have been caused by the programs they serve.
2.11.3 Error Log
In case of an error or abend in a basic conversation, a TP can send an error message, in the form of a general data
stream (GDS) error log variable, to the local log and to the partner LU.
74