IBM Books

Administrative API Reference

sqluvput - Writing Data to Device

After initialization, this function can be used to write data to the device.

Authorization

One of the following:

Required Connection

Database

Version

sql.h

C API Syntax



/* File: sqluvend.h */
/* API: Writing Data to Device */
/* ... */
int sqluvput (
  void * pVendorCB,
  struct Data  *,
  struct Return_code  *);
/* ... */
 

API Parameters

pVendorCB
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 is used in the backup function.

Return Codes

Table 83. Valid Return Codes for sqluvput and Resulting DB2 Action
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_ABORTa The session will be terminated.
SQLUV_INV_ACTION Invalid action is requested. sqluvend, action = SQLU_ABORTa The session will be terminated.
SQLUV_INV_DEV_HANDLE Invalid device handle. sqluvend, action = SQLU_ABORTa The session will be terminated.
SQLUV_INV_BUFF_SIZE Invalid buffer size specified. sqluvend, action = SQLU_ABORTa The session will be terminated.
SQLUV_ENDOFMEDIA End of media reached, for example, end of tape. sqluvend See the explanation of DB2's handling of end-of-media conditions under PROMPTING Mode, and Device Characteristics.
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_ABORTa 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 See the explanation of DB2's handling of warnings in Warning Conditions.
SQLUV_LINK_NOT_EXIST No link currently exists. sqluvend, action = SQLU_ABORTa The session will be terminated.
SQLUV_IO_ERROR I/O error. sqluvend, action = SQLU_ABORTa The session will be terminated.
Next call:

  • a If the next call will be an sqluvend, action = SQLU_ABORT, this session will be terminated. In addition, all other active sessions are terminated with sqluvend, action = SQLU_ABORT. Committed sessions are deleted with an sqluvint, sqluvdel, and sqluvend sequence of calls (see If Error Conditions Are Returned to DB2).


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]