Condition handlers are routines written to respond to conditions
in one of the following ways:
- Resume
- A resume occurs when a condition handler determines that the
condition was handled and normal application execution should resume.
A program resumes running usually at the instruction immediately following
the point where the condition occurred.
A resume cursor points
to the place where a routine should resume. The resume cursor can
be manipulated to be placed at a specific point by using the CEEMRCR
(move resume cursor) callable service (see z/OS Language Environment Programming Reference).
- Percolate
- A condition is percolated if a condition handler declines to
handle it. User-written condition handlers, for example, can be written
to act on a particular condition, but percolate all other conditions. Language Environment can
continue condition handling in one of the following places:
- With the next condition handler associated with the current stack
frame. This can be either the first condition handler in a queue of
user-established condition handlers, or the language-specific condition
semantics.
- With the most recently established condition handler associated
with the calling stack frame.
- Promote
- A condition is promoted when a condition handler converts the
condition into one with a different meaning. A condition handler can
promote a condition for a variety of reasons, including the condition
handler's knowledge or lack of knowledge about the cause of the original
condition. A condition can be promoted to simulate conditions that
would normally come from a different source.
- Fix-up and resume
- The qualifying data is modified and a resume occurs with a corrective
action. There are several possible responses that can be applied:
- resume with new input value
- A new input value is specified and the failing operation is
tried again. The condition token for this action has the condition
name CEE0CE.
- resume with new output value
- The program continues using a specified result in the place
of what the failing operation would have provided. The condition token
for this action has the condition name CEE0CF.
For more information about how these responses can be used in developing
user-written condition handlers, see User-written condition handler interface.