The opening of members of a program library can be monitored by systems support with the aid of two exit points:
At the request exit systems support can reject the OPEN call before the OPEN operation is performed.
At the return exit the member has already been opened and the full identification of the member (type, name, version, variant) is known. At the request exit the member identification may still be incomplete due to the search level option, so the return exit offers another chance to reject the OPEN call. The member is then returned to its original state.
Request exit (005)
The following information is passed to the exit routines:
R1 = A(exit parameter area) R12 = A(TPR program manager) R13 = A(save area of calling component) R14 = A(indirect return) R15 = A(exit routine)
(cf. “System exits for program libraries”)
Return code in register 15:
R15 = X'000000RR' RR = Return code of exit routine 00 no error 04 OPEN member rejected
Return code in the exit parameter area:
In addition to the return code in register 15, the following fields are also provided: PMOPM (Open Modus), PMSLV (Search Level) and PMLVD (Search Default).
Return exit (006)
The return exit is identical to the request exit.
Notes
The search level (PMSLV) is the hierarchy level within the member identification. As only one variant is currently permitted, “NO LEVEL” and “VARIANT” are identical in meaning.
“SEARCH LEVEL = NO LEVEL” indicates that a member for which all entries have been made is expected.
“SEARCH DEFAULT” (PMLVD) specifies whether the first or the last member on the specified search level is to be opened.
DSECT
The DSECT for the parameter area can be generated by means of the EX005 macro:
name EX005 D[,[prefix],[ALL]] EX005 D IEX005 DSECT DS 0F ***************************************************** * OPEN PARAMETER LIST FOR RZ ROUTINES * ***************************************************** PMRC DC F'0' PLAM RETURN CODE PMRC1 DC F'0' PLAM SECONDARY RETURN CODE PMPLV DC CL8' ' VERSION OF PLAM: VZZ.ZBZZ PMLIB DC A(0) A(LIBRARY NAME): CL54 PMLINK DC A(0) A(LIBRARY NAME LINK): CL8 PMOPM DC CL1' ' OPEN MODUS: I: INPUT * W: WRITE * U: UPDATE PMSLV DC CL1' ' SEARCH LEVEL: L: LIBRARY * T: TYPE * N: NAME * V: VERSION * R: VARIANT * O: NO LEVEL PMLVD DC CL1' ' SEARCH DEFAULT: N: NO * H: HIGH * L: LOW DC CL1' ' PMTYP DC A(0) A(MEMBER TYPE): CL8 PMNAM DC A(0) A(MEMBER NAME): CL64 PMVER DC A(0) A(MEMBER VERSION): CL24 PMVAR DC A(0) A(MEMBER VARIANT): F PMDAT DC A(0) A(MODIFICATION DATE): CL14: DATE * ,CL8: TIME DC A(0) DC A(0) DC A(0) LEN EQU *-PMRC