When a program ends normally, the system returns control to the caller. The caller might be a workstation user or another program.
If a program ends abnormally during run time, and the program had been running in a different activation group from its caller, the escape message CEE9901 is issued and control is returned to the caller:
+--------------------------------------------------------------------------------+ |Application error <msgid> unmonitored by <pgm> at | | statement <stmtid>, instruction <instruction> | | | +--------------------------------------------------------------------------------+
A CL program can monitor for this exception by using the Monitor Message (MONMSG) command.
If the program and its caller are running in the same activation group and the program ends abnormally, the message that is issued depends on how the program ends. If it ends with a function check, CPF9999 is issued.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.