Influencing condition handling with the ERRCOUNT runtime option

The ERRCOUNT option allows you to specify the number of errors that are tolerated during the execution of a thread. Each condition of severity 2 or above, regardless of its origin, increments the error count by one. POSIX conditions are not counted. If the error count exceeds the limit, Language Environment terminates the enclave with abend code 4091 and reason code 11.

See z/OS Language Environment Programming Reference for syntax and more information about using ERRCOUNT.

Table 1. Default responses to unhandled conditions. The default responses to unhandled conditions fall into one of two types, depending on whether the condition was signaled using CEESGL and an fc parameter, or the condition came from any other source.
Severity of condition Condition signaled by user in a call to CEESGL with an fc Condition came from any other source
0 (informative message) Return CEE069 condition token, and resume processing at the next sequential instruction.

See the fc table for CEESGL (z/OS Language Environment Programming Reference) for a description of the CEE069 condition token.

Resume without issuing message.
1 (warning message) Return CEE069 condition token, and resume processing at the next sequential instruction. If the condition occurred in a stack frame associated with a COBOL program, resume and issue the message.

If the condition occurred in a stack frame associated with a non-COBOL routine, resume without issuing message.

2 (program terminated in error) Return CEE069 condition token, and resume processing at the next sequential instruction. Promote condition to T_I_U, redrive the stack, then terminate the thread if the condition remains unhandled. Message issued if TERMTHDACT(MSG) is specified.

See Processing the T_I_U condition for more information about T_I_U.

3 (Program terminated in severe error) Return CEE069 condition token, and resume processing at the next sequential instruction. Promote condition to T_I_U, redrive the stack, then terminate the thread if the condition remains unhandled. Message issued if TERMTHDACT(MSG) is specified.
4 (program terminated in critical error) Promote condition to T_I_U, redrive the stack, then terminate the thread if the condition remains unhandled. Message issued if TERMTHDACT(MSG) is specified. Promote condition to T_I_U, redrive the stack, then terminate the thread if the condition remains unhandled. Message issued if TERMTHDACT(MSG) is specified.