Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide

Error and condition handling terminology

You should be familiar with several terms used in discussions of PL/I error and condition handling. The terms are listed below:

Established
An ON-unit becomes established when the ON statement is executed. It ceases to be established when an ON or REVERT statement referring to the same condition is executed, or when the associated block is terminated.
Enabled
A condition is enabled when the occurrence of the condition results in the execution of an ON-unit or standard action.
Interrupts and PL/I conditions
Certain PL/I conditions are detected by machine interrupts. Others have to be detected by special testing code either in the run-time library modules or in the compiled program.
Statically and dynamically descendant
Static and dynamic descendant are terms used to define the scope of error-handling features. ON-units are dynamically descendant; that is, they are inherited from the calling procedure in all circumstances. Condition enablement is statically descendant; that is, it is inherited from the containing block in the source program. Statically descendant procedures can be determined during compilation. Dynamically descendant procedures might not be known until run-time. Figure 7 shows an example of statically and dynamically descendant procedures.
Figure 7. Static and dynamic descendant procedures
               *--------------
               |(SIZE):B:PROC;
               |ON ERROR SNAP;
               |  .
               |  .
               |
               |CALL C;
               |     *--------
               |     |C:PROC;
               |     |
               |     |END C;
               |     *--------
               |CALL D;
               |END B;
               *---------------
                      *---------       *---------
                      |D:PROC;         |E:PROC;
                      |.               |
                      |.               |
                      |                |
                      |CALL E;         |
                      |END D;          |END E;
                      *---------       *----------
 
Statically descendant:
The enablement prefix SIZE in procedure B is inherited only by the
contained procedure C, regardless of which procedure calls which.

Dynamically descendant:
The ON-unit ON ERROR SNAP is inherited by any procedure called by B
and any subsequently called procedures.  Thus, if B calls D, which
calls E, the ON-unit is established in procedure E.
Normal return
A normal return is a return from a called block after reaching the END or RETURN statement, rather than reaching a GOTO statement out of a block. In an error-handling context, normal return is taken to mean normal return from the ON-unit. The action taken after normal return from an ON-unit is specified in the PL/I Language Reference.
Standard system action
Standard system action refers to the default PL/I-defined action taken when a condition occurs for which there is no established ON-unit.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)