Ending an ILE COBOL Program

When an ILE COBOL program ends normally, the system returns control to the caller. The caller could be a workstation user, a CL program (such as the menu-handling program), or another HLL program.

If an ILE COBOL program ends abnormally during run time, the escape message CEE9901

Application error. message-id unmonitored by program-name
at statement statement-number, instruction instuction-number.

is issued to the caller of the run unit. A CL program can monitor for this exception by using the Monitor Message (MONMSG) command. For more information about control language commands, see the CL and APIs section of the Programming category in the iSeries Information Center at this Web site -http://www.ibm.com/eserver/iseries/infocenter.

If a program ends for any reason other than by:

the RTNCDE job attribute is set to 2.

See the RTVJOBA and DSPJOB commands in the CL Programming book for more information about return codes.