dsmSendData
The dsmSendData function call sends a byte stream of data to IBM® Storage Protect through a buffer. The application client can pass any type of data for storage on the server. Usually, these data are file data, but are not limited to such. You can call dsmSendData several times, if the byte stream of data that you want to send is large.
Restriction: The application client cannot reuse the buffer that is specified in
dsmSendData until the dsmSendData call returns.
Tip: If IBM Storage Protect 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 then receives return code 2302 (DSM_RC_CHECK_REASON_CODE) and passes the reason code
back to the application user. This informs 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 are 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 API type definitions source files for the type definition.
Return codes
The return code numbers are provided in parentheses ( ).
| 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 IBM Storage Protect 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 is not sent to the server. |
| DSM_RC_SENDDATA_WITH_ZERO_SIZE (2107) | The object cannot send data with a zero byte sizeEstimate. |