Purpose
Start a connection to the specified data
queue. This will start a conversation with the iSeries™ system. If the connection is
not successful, a non-zero handle will be returned.
Syntax
unsigned int CWB_ENTRY cwbDQ_OpenEx(
cwbCO_SysHandle sysHandle
const char *queue,
const char *library,
cwbDQ_QueueHandle *queueHandle,
cwbSV_ErrHandle errorHandle);
Parameters
- cwbCO_SysHandle sysHandle - input
- Handle to a system object.
- const char * queue - input
- Pointer to the data queue name contained in an ASCIIZ string.
- const char * library - input
- Pointer to the library name that is contained in an ASCIIZ string. If
this pointer is NULL, the library list will be used (set library to "*LIBL").
- cwbDQ_QueueHandle * queueHandle - output
- Pointer to a cwbDQ_QueueHandle where the handle will be returned. This
handle should be used in all subsequent calls.
- 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.
- CWB_COMMUNICATIONS_ERROR
- A communications error occurred.
- CWB_SERVER_PROGRAM_NOT_FOUND
- iSeries application
not found.
- CWB_HOST_NOT_FOUND
- iSeries system
inactive or does not exist.
- CWB_COMM_VERSION_ERROR
- Data Queues will not run with this version of communications.
- CWB_INVALID_POINTER
- Bad or null pointer.
- CWB_SECURITY_ERROR
- A security error has occurred.
- CWB_LICENSE_ERROR
- A license error has occurred.
- CWB_CONFIG_ERROR
- A configuration error has occurred.
- CWBDQ_BAD_QUEUE_NAME
- Queue name is too long.
- CWBDQ_BAD_LIBRARY_NAME
- Library name is too long.
- CWBDQ_BAD_SYSTEM_NAME
- System name is too long.
- CWBDQ_REJECTED_USER_EXIT
- Command rejected by user exit program.
- CWBDQ_USER_EXIT_ERROR
- Error in user exit program.
- CWBDQ_LIBRARY_NOT_FOUND
- Library not found on system.
- CWBDQ_QUEUE_NOT_FOUND
- Queue not found on system.
- CWBDQ_NO_AUTHORITY
- No authority to queue or library.
- CWBDQ_DAMAGED_QUE
- Queue is in unusable state.
- CWBDQ_CANNOT_CONVERT
- Data cannot be converted for this queue.
- CWB_NOT_ENOUGH_MEMORY
- Insufficient memory; may have failed to allocate temporary buffer.
- CWB_NON_REPRESENTABLE_UNICODE_CHAR
- One or more input Unicode characters have no representation in the code
page being used.
- CWB_API_ERROR
- General API failure.
- CWB_INVALID_HANDLE
- Invalid system handle.
Usage
This function requires that you previously
have issued cwbCO_CreateSystem.