Purpose
Calls the program identified by the handle.
The return code will indicate the success or failure of the program. Additional
messages can be returned by using the message handle that is returned.
Syntax
unsigned int CWB_ENTRY cwbRC_CallPgm(
cwbRC_SysHandle system,
cwbRC_PgmHandle program,
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.
- cwbRC_PgmHandle program - input
- Handle that was returned by a previous call to the cwbRC_CreatePgm API.
It identifies the program object. object.
- cwbSV_ErrHandle msgHandle - 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_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_COMMUNICATIONS_ERROR
- A communications error occurred.
- CWBRC_INVALID_SYSTEM_HANDLE
- Invalid system handle.
- CWBRC_INVALID_PROGRAM
- Invalid program handle.
- CWBRC_REJECTED_USER_EXIT
- Command rejected by user exit program.
- CWBRC_USER_EXIT_ERROR
- Error in user exit program.
- CWBRC_PROGRAM_NOT_FOUND
- Program not found.
- CWBRC_PROGRAM_ERROR
- Error when calling program.