PL/I considerations
User condition handlers can now be written in PL/I; that is, you can register a PL/I external procedure as a user-written condition handler using the Language Environment callable service CEEHDLR, and unregister it using CEEHDLU.
Restrictions on PL/I user-written
condition handlers are:
- If a user handler is registered in the PL/I main routine, it must be unregistered using CEEHDLU before the main returns via a RETURN statement or by reaching the END statement. One implication is that a user handler registered in the main routine does not gain control for the PL/I FINISH condition raised due to normal termination of the main routine.
- You cannot collapse multiple BEGIN blocks using a RETURN statement when CEEHDLR has been invoked within a nested block.
- The following condition handling pseudovariables and built-in
functions are still restricted to PL/I ON-units
and are not available in user handlers:
- DATAFIELD
- ONCHAR
- ONCODE
- ONCOUNT
- ONFILE
- ONKEY
- ONLOC
- ONSOURCE
- User-written condition handlers are not supported in PL/I multitasking applications.