OSI/AS Programming Manual
Sending and Retrieving User Data
APS Procedures Programming Concepts
056783 Tandem Computers Incorporated 2–33
Sending and
Retrieving User Data
This subsection describes how to define the user data buffers you need and then
explains how to send and retrieve user data over an OSI/AS connection.
To send user data, you call one of the APS procedures that has a
user-data
input
parameter. To retrieve user data that you have received, you call the
APS_DATA_GETPARAM_ procedure.
Note that the ACSE service sends and retrieves data only in the primitives that it
defines (associate, release, user abort, and provider abort primitives). For ACSE
connections, OSI/AS passes all user data, as well as most primitives, directly to the
Presentation Layer. Similarly, for presentation connections, OSI/AS passes some
primitives directly to the Session Layer.
Defining User Data Buffers To be able to send or retrieve user data using the APS procedures, you must define the
structure of the buffers that you use for the data.
The buffer must contain at least one data header (ZAPS-DDL-DATA-HDR). For any
data to be sent, the buffer must also contain one or more data-element headers (ZAPS-
DDL-DATA-ELEMENT-HDR). The data associated with each data-element header
can either immediately follow the data-element header in the buffer or it can reside
elsewhere and be pointed to by a field in the data-element header. The latter practice,
which is referred to as data chaining, enables you to avoid moving large blocks of data
within memory. Data chaining can be used only with data request or typed data
request primitives and cannot be used by COBOL programs. If one data element in
the buffer is chained, then all data elements in the buffer must be chained.
Figures 2-4 and 2-5 illustrate several possible buffer content configurations.
Figure 2-4. Buffer Containing a Single Data Element
ZAPS-DDL-DATA-HDR
ZAPS-DDL-DATA-ELEMENT-HDR
data
Data element resides in the buffer:
ZAPS-DDL-DATA-HDR
ZAPS-DDL-DATA-ELEMENT-HDR
data
Data element resides elsewhere in memory:
030