Using the HANDLE ABEND command

The HANDLE ABEND command activates or reactivates a program-level abend exit in your application program. You can also use this command to cancel a previously activated exit.

For certain programming languages, you can use the HANDLE ABEND command to supply your own code to be executed when an abend is processed. This means that your application can cope with the abnormal situation in an orderly manner and continue to run. You provide the user exit programs and rely on CICS to call those programs when required.

The flow of control during abend processing is shown in Figure 1.

Restrictions

  • The HANDLE ABEND command does not apply to Java™ programs.
  • Because exception conditions in C and C++ programs do not cause abends, you cannot use the HANDLE ABEND command in this way with these programs. However, the HANDLE ABEND command is supported in C and C++ when used with the PROGRAM option.
  • You cannot use HANDLE ABEND LABEL in Assembler programs that do not use DFHEIENT and DFHEIRET. Assembler programs that use the Language Environment® stub CEESTART should either use HANDLE ABEND PROGRAM or a Language Environment service such as CEEHDLR.
  • You cannot use HANDLE ABEND LABEL in AMODE(64) programs.