Tivoli Header

Tivoli Storage Manager Using the Application Program Interface

dsmSendData

The dsmSendData function call sends a byte stream of data to TSM through a buffer. The application client can pass any type of data for storage on the server. Usually, this data is file data, but it is not limited to such. You can call dsmSendData several times, if the byte stream of data that you want to send is large.

Note:
The application client cannot reuse the buffer that is specified in dsmSendData until the dsmSendData call returns.
Note:
If TSM returns code 157 (DSM_RC_WILL_ABORT), start a call to dsmEndSendObj and then to dsmEndTxn with a vote of DSM_VOTE_COMMIT. The application should then receive return code 2302 (DSM_RC_CHECK_REASON_CODE) and pass the reason code back to the application user. This will inform the user why the server is ending the transaction.

Syntax

dsInt16_t dsmSendData  (dsUint32_t   dsmHandle,
   DataBlk *dataBlkPtr);

Parameters

dsUint32_t dsmHandle (I)
The handle that associates this call with a previous dsmInitEx call.

DataBlk *dataBlkPtr (I/O)
This parameter points to a structure that includes both a pointer to the buffer from which the data is to be sent, as well as the size of the buffer. On return, this structure contains the number of bytes that is actually transferred. See Appendix A, API Type Definitions Source File for the type definition.

Return Codes

The return code numbers are provided in parentheses ( ).

Table 41. Return Codes for dsmSendData

Return Code Explanation
DSM_RC_NO_COMPRESS_MEMORY (154) Insufficient memory available to perform data compression or expansion.
DSM_RC_COMPRESS_GREW (155) During compression the compressed data grew in size compared to the original data.
DSM_RC_WILL_ABORT (157) An unknown and unexpected error occurred, causing the transaction to halt.
DSM_RC_WRONG_VERSION_PARM (2065) Application client's API version is different than the TSM library version.
DSM_RC_NEEDTO_ENDTXN (2070) Need to end the transaction.
DSM_RC_OBJ_EXCLUDED (2080) The include-exclude list excludes the object.
DSM_RC_OBJ_NOBCG (2081) The object has no backup copy group and will not be sent to the server.
DSM_RC_OBJ_NOACG (2082) The object has no archive copy group and will not be sent to the server.
DSM_RC_SENDDATA_WITH_ZERO_SIZE (2107) The object cannot send data with a zero byte sizeEstimate.


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