Termination behavior for unhandled conditions

When there is an unhandled condition of severity 2 or greater, you can choose whether an enclave terminates with an abend or with a return code and a reason code. Language Environment will assign an abend code and return and reason code, as described in this topic, or you can assign values yourself, as described in Setting and altering user return codes.

See Table 1 for a discussion of conditions and how they are handled in Language Environment, and Language Environment and POSIX signal handling interactions for specific information pertaining to POSIX signal action defaults and unhandled conditions in a z/OS UNIX environment.

Some users, especially those using COBOL or running IMS™ applications, expect to receive an abend when an error is detected rather than a return code and a reason code. To get this behavior, they can use the ABTERMENC(ABEND) runtime option discussed in Abend codes generated by ABTERMENC(ABEND) runtime option. Other users, however, expect to receive a return code and a reason code when there is an error.

If you are running in a CICS® environment, the IBM-supplied default is to terminate the enclave with an abend for unhandled conditions of severity 2 or greater.

If you are running in a non-CICS environment and you expect the enclave to terminate with a return code and a reason code for unhandled conditions of severity 2 or greater, you can use the ABTERMENC(RETCODE) runtime option and the CEEBXITA assembler user exit. The default version of CEEBXITA for non-CICS environments requests that the enclave terminate with a return code and a reason code.

Table 1 shows the various types of enclave termination that occur based on the ABTERMENC runtime option settings and the CEEAUE_ABND flag settings of CEEBXITA. See CEEBXITA assembler user exit interface for an explanation of the CEEAUE_ABND flag.

Table 1. Termination behavior for unhandled conditions of severity 2 or greater
ABTERMENC suboption Value of CEEAUE_ABND flag enclave termination Enclave termination type
RETCODE 0 Return to caller with return code and reason code
RETCODE 1 Abend using CEEAUE_RETC and CEEAUE_RSNC
ABEND 0 Abend using the abend codes listed in Table 1
ABEND 1 Abend using CEEAUE_RETC and CEEAUE_RSNC