Purpose
Write a record to the iSeries™ data
queue object that is identified by the specified handle.
Syntax
unsigned int CWB_ENTRY cwbDQ_Write(
cwbDQ_QueueHandle queueHandle,
cwbDQ_Data data,
cwb_Boolean commit,
cwbSV_ErrHandle errorHandle);
Parameters
- cwbDQ_QueueHandle queueHandle - input
- Handle that was returned by a previous call to the cwbDQ_Open or cwbDQ_OpenEx functions.
This identifies the iSeries data queue object.
- cwbDQ_Data data - input
- The data object to be written to the iSeries data queue.
- cwb_Boolean commit - input
- This flag is no longer used and is ignored.
- cwbSV_ErrHandle errorHandle - output
- Any returned messages will be written to this object. It is created with
the cwbSV_CreateErrHandle API. The messages may be retrieved
through the cwbSV_GetErrText API. If the parameter is set
to zero, no messages will be retrieved.
Return Codes
The following list shows common return
values.
- CWB_OK
- Successful completion.
- CWBDQ_BAD_DATA_LENGTH
- Length of data is not correct.
- CWBDQ_INVALID_MESSAGE_LENGTH
- Invalid message length.
- CWBDQ_INVALID_QUEUE_HANDLE
- Invalid queue handle.
- CWBDQ_REJECTED_USER_EXIT
- Command rejected by user exit program.
- CWBDQ_CANNOT_CONVERT
- Unable to convert data.
Usage
This function requires that you previously
have issued cwbDQ_Open or cwbDQ_OpenEx,
and cwbDQ_CreateData.