Administrative API Reference

sqluvget - Reading Data from Device

After initialization, this function can be called to read data from the device.

Authorization

One of the following:

Required Connection

Database

Version

sqluvend.h

C API Syntax



/* File: sqluvend.h */
/* API: Reading Data from Device */
/* ... */
int sqluvget (
  void * pVendorCB,
  struct Data         *,
  struct Return_code  *);
/* ... */
 
typedef struct Data
}
   sqlint32  obj_num;                 
   sqlint32  buff_size;               
   sqlint32  actual_buff_size;        
   void      *dataptr;                
   void      *reserve;                
{ Data;
 
 

API Parameters

pVendorCB
Input. Pointer to space allocated for the DATA structure (including the data buffer) and Return_code.

Data
Input/output. A pointer to the data structure.

Return_code
Output. The return code from the API call.

obj_num
Specifies which backup object should be retrieved.

buff_size
Specifies the buffer size to be used.

actual_buff_size
Specifies the actual bytes read or written. This value should be set to output to indicate how many bytes of data were actually read.

dataptr
A pointer to the data buffer.

reserve
A reserve for future use.

Usage Notes

This is used by the restore function.

Return Codes

Table 84. Valid Return Codes for sqluvget and Resulting DB2 Action
Literal in Header File Description Probable Next Call Other Comments
SQLUV_OK Operation successful. sqluvget DB2 processes the data
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_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 or SQLUV_ENDOFMEDIA_NO_ DATA for this purpose. However, device not ready conditions can be indicated using this return code. sqluvget, or sqluvend, action =SQLU_ABORT See the explanation of DB2's handling of warnings ( Warning Conditions).
SQLUV_LINK_NOT_EXIST No link currently exists. sqluvend, action = SQLU_ABORTa The session will be terminated.
SQLUV_MORE_DATA Operation successful; more data available. sqluvget
SQLUV_ENDOFMEDIA_NO_ DATA End of media and 0 bytes read (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_ENDOFMEDIA End of media and > 0 bytes read, (for example, end of tape). sqluvend DB2 processes the data, and then handles the end-of-media condition as described under PROMPTING Mode, and Device Characteristics.
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.


[ Top of Page | Previous Page | Next Page ]