Purpose
Issues the command on the system identified
by the handle. The return code will indicate success or failure of the
command. Additional messages can be returned by using the message handle that
is returned.
Syntax
unsigned int CWB_ENTRY cwbRC_RunCmd(
cwbRC_SysHandle system,
const char *commandString,
cwbSV_ErrHandle msgHandle);
Parameters
- cwbRC_SysHandle system - input
- Handle that was returned by a previous call to the cwbRC_StartSysEx function.
It identifies the iSeries™ system.
- const char *commandString - input
- Pointer to a string that contains the command to be issued on the iSeries system.
This is an ASCIIZ string.
- cwbSV_ErrHandle msgHandle - output
- Any messages returned from the iSeries server will be written to this
object. It is created with the cwbSV_CreateErrHandle API.
The messages may be retrieved through the cwbSV_GetErrTextIndexed 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_INVALID_POINTER
- Bad or NULL pointer.
- CWBRC_INVALID_SYSTEM_HANDLE
- Invalid system handle.
- CWBRC_REJECTED_USER_EXIT
- Command rejected by user exit program.
- CWBRC_USR_EXIT_ERROR
- Error in user exit program.
- CWBRC_COMMAND_FAILED
- Command failed.
- CWBRC_COMMAND_TOO_LONG
- Command string is too long.
- 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 codepage
being used.
- CWB_API_ERROR
- General API failure.