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

Language facilities

The PL/I language and its execution environment extend the error-handling facilities offered by the operating system. Numerous situations can cause interrupts for PL/I, and some situations (such as ENDFILE) can be used to control normal program flow rather than to handle errors. ON-units allow you to obtain control after most interrupts.

If you do not write ON-units to obtain control after interrupts, you can:

The majority of PL/I conditions occur because of errors in program logic or the data supplied. Some, however, are not connected with errors. These are conditions such as ENDFILE, which are difficult to anticipate because they can occur at any time during program execution.

PL/I has both system messages and snap messages:

System messages
If an ON-unit contains both SNAP and SYSTEM, the resulting PL/I message is essentially the PL/I SYSTEM message followed by any (or a combination) of the following three lines:
  From offset xxx in a BEGIN block

  From offset xxx in procedure xxx

  From offset xxx in a condition_name ON-unit

These messages are repeated as often as necessary to trace back to the main procedure.

SNAP messages
If an ON-unit contains only SNAP, the resulting PL/I message begins as follows. The messages then continue as for SNAP SYSTEM messages.
  Condition_name condition was raised at offset xxx in procedure xxx.
Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide