gtpa2m1uApplication Programming

Types of Functions

The provided functions that make up the collection library are divided into three types:

Returned Data Structures

When TPFCS returns an element in response to a TO2_at, TO2_atCursor, TO2_peek, or other similar function (except for TO2_atRBA), it returns a data structure that resides in a private heap storage area. The calling routine must use the free function call to free the buffer once it has completed processing the returned data. When the function call includes the pointer to a buffer (for example, a TO2_atWithBuffer, TO2_atCursorWithBuffer or a TO2_peekWithBuffer function call), the data is also returned in the buffer.

The normal return from these types of APIs is a pointer (TO2_BUF_PTR) to a structure (buffer) of type TO2_BUF_HDR. The structure of this buffer has five fields:

Field
Description

spare
Type long, reserved for IBM use.

updateSeqNbr
Type long, update sequence counter value.

dataL
Type long, length of the data.

spare
Type long, reserved for IBM use.

data
Array of char, the beginning of the actual data. The data does not contain the key.