Steps in condition handling

Language Environment condition handling is performed in three distinct steps: the enablement, condition, and termination imminent steps.

During the condition and termination imminent steps, the stack is used to determine the order of condition handler processing. Condition handlers associated with the most recent stack frame added to the stack are given first chance to handle the condition. Condition handlers associated with the next stack frame are next given a chance, and so on until either the condition is handled or default Language Environment condition handling semantics take effect.

In a POSIX(OFF) environment, only routines that are currently active on the stack have an effect on condition handling. For example, in a COBOL — PL/I application, a COBOL main program calls a PL/I subroutine. The subroutine then returns control to COBOL. The PL/I routine is no longer on the stack and does not affect condition handling. See Language Environment and POSIX signal handling interactions for information about signal handling under z/OS UNIX.