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:
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.
Condition_name condition was raised at offset xxx in procedure xxx.