Invocation of a procedure registered as a user handler
A PL/I parameter declared as a structure expects an extra PL/I descriptor; however, Language Environment passes argument lists by reference and has no knowledge of PL/I descriptors. Therefore for the parameter list to be received, declare the parameters with the OPTIONS(BYVALUE) option as shown in Figure 1.
Figure 1. Parameter
declarations in a PL/I user-written
condition handler
PLIHDLR: PROC(ptr1, ptr2, ptr3, ptr4) OPTIONS(BYVALUE);
DCL (ptr1, ptr2, ptr3, ptr4) POINTER;
DCL 1 Current_condition BASED(ptr1)
⋮
;
DCL Token FIXED BIN(31) BASED(ptr2);
DCL Result_code FIXED BIN(31) BASED(ptr3);
DCL 1 New_condition BASED(ptr4)
⋮
;