Data data structure

Contains data transferred between Db2® and a vendor device. This structure is used by the sqluvput API when data is being written to the vendor device and by the sqluvget API when data is being read from the vendor device.
Table 1. Fields in the Data Structure
Field Name Data Type Description
obj_num sqlint32 The sequence number assigned by Db2 during a backup operation.
buff_size sqlint32 The size of the buffer.
actual_buff_size sqlint32 The actual number of bytes sent or received. This must not exceed buff_size.
dataptr void Pointer to the data buffer. Db2 allocates space for the buffer.
reserve void Reserved for future use.

API and data structure syntax

typedef struct Data
{
   sqlint32 obj_num;
   sqlint32 buff_size;
   sqlint32 actual_buff_size;
   void *dataptr;
   void *reserve;
} Data;
Note: The Db2 product expects the vendor library to return the number of bytes written in the actual_buff_size field when the vendor library is called to perform a write operation. When zero is returned for the actual_buff_size value to the Db2 product, this value is consider an indication that an error occurred even if vendor library provides a return code of 0 for the write operation.