PL/I condition handling actions
Refer to Figure 1 throughout the following summary of the steps taken to process a condition when there are only PL/I routines on the stack.
Figure 1. PL/I condition
processing
- Assume a condition such as CONVERSION, which is severity 3, occurs in routine 4.
- Language Environment moves down the stack towards the earliest stack frame. If a PL/I ON-unit is established for the CONVERSION condition, it is given control.
- If all stack frames have been visited and no ON CONVERSION unit was found, a message is issued. The condition is promoted to the ERROR condition if it meets any of the qualifications listed in Promoting conditions to the PL/I ERROR condition. Otherwise, the PL/I implicit action occurs. A CONVERSION condition would be promoted to ERROR.
- The Language Environment condition manager makes another pass of the stack, beginning in Routine 4 where the original condition occurred. If a PL/I ERROR ON-unit is established, it is invoked.
- If either of the following occurs:
- An ERROR ON-unit is found, but it does not issue a GOTO out of block
- No ERROR ON-unit is found
- Language Environment makes yet another pass of the stack, beginning in Routine 4 where the original condition occurred. If a PL/I FINISH ON-unit is established, it is invoked.
- If all stack frames have been visited, and no FINISH ON-unit issued a GOTO out of block, then Language Environment begins thread termination activities in response to the unhandled condition. Since a message was issued for the CONVERSION condition before it was promoted to the ERROR condition, no message is issued at this time.