sqluvput API - Write data to a vendor device
After a vendor device has been initialized with the sqluvint API, Db2® calls this API to write to the device during a backup operation.
Authorization
None
Required connection
Database
API include file
sqluvend.h
API and data structure syntax
int sqluvput ( void *hdle,
struct Data *data,
struct Return_code *return_code);
sqluvput API parameters
- hdle
- Input. Pointer to space allocated for the DATA structure (including the data buffer) and Return_code.
- data
- Output. Data buffer filled with data to be written out.
- return_code
- Output. The return code from the API call.
Usage notes
This API is used by the backup utility.
Return codes
Literal in Header File | Description | Probable Next Call | Other Comments |
---|---|---|---|
SQLUV_OK | Operation successful. | sqluvput or sqluvend, if complete (for example, Db2 has no more data) | Inform other processes of successful operation. |
SQLUV_COMM_ERROR | Communication error with device. | sqluvend, action = SQLU_ABORT (see following note). | The session will be terminated. |
SQLUV_INV_ACTION | Invalid action is requested. | sqluvend, action = SQLU_ABORT (see following note). | The session will be terminated. |
SQLUV_INV_DEV_HANDLE | Invalid device handle. | sqluvend, action = SQLU_ABORT (see following note). | The session will be terminated. |
SQLUV_INV_BUFF_SIZE | Invalid buffer size specified. | sqluvend, action = SQLU_ABORT (see following note). | The session will be terminated. |
SQLUV_ENDOFMEDIA | End of media reached, for example, end of tape. | sqluvend | |
SQLUV_DATA_RESEND | Device requested to have buffer sent again. | sqluvput | Db2 will retransmit the last buffer. This will only be done once. |
SQLUV_DEV_ERROR | Device error. | sqluvend, action = SQLU_ABORT (see following note). | The session will be terminated. |
SQLUV_WARNING | Warning. This should not be used to indicate end-of- media to Db2; use SQLUV_ENDOFMEDIA for this purpose. However, device not ready conditions can be indicated using this return code. | sqluvput | |
SQLUV_LINK_NOT_EXIST | No link currently exists. | sqluvend, action = SQLU_ABORT (see following note). | The session will be terminated. |
SQLUV_IO_ERROR | I/O error. | sqluvend, action = SQLU_ABORT (see following note). | The session will be terminated. |
Note: Next call: If the next call is an sqluvend, action = SQLU_ABORT, this
session and all other active sessions will be terminated. Committed
sessions are deleted with an sqluvint, sqluvdel, and sqluvend sequence of calls.