Use of the following commands can be monitored at two exit points with the aid of an exit routine:
CREATE-FILE
MODIFY-FILE-ATTRIBUTES
CREATE-FILE-GENERATION
MODIFY-FILE-GENERATION-SUPPORT
ADD-FILE-LINK
CREATE-TAPE-SET
IMPORT-FILE (for tape files)
Furthermore, it is also possible to monitor the FILE macro.
The request exit routine can reject or modify a FILE request.
The return exit routine can initiate the appropriate logging or recording actions after the execution of a FILE request.
Return exit (050)
The following information is passed to the exit routine:
R1 = A(EX050 parameter area) R12 = A(TPR program manager) R13 = A(save area of calling component) R14 = A(indirect return) R15 = A(exit routine)
The exit routine cannot send a return code to the system module. The return from the return exit routine is followed by the return from FILE processing. The exit routine must set the value X'0000' or X'0004' for the maincode in the standard header of the parameter area. If the maincode contains any other value, the following message appears on the console:
% DMS06B9 CALLING SYSTEM EXIT (&00) RESULTS IN ERROR CODE (&01)
Request exit (051)
The register settings are the same as for the return exit.
The return code for the calling system module is sent in the maincode of the standard header of the exit parameter area. The following values are possible:
X'0000' | FILE processing is performed with the FILE parameter area, which may have been modified by the exit routine. |
X'0004' | The FILE request is rejected with error code X'0515'. DMS0515 USE OF SPECIFIED COMMAND OR 'FILE' MACRO RESTRICTED BY SYSTEM ADMINISTRATOR. COMMAND OR MACRO REJECTED. |
other | Same as for X'0004'; in addition the following message is displayed on the console:
|
Note
Registers 12, 13 and 14 must not be destroyed by the exit routine.
DSECT
EX050 MF=D MFTST MF=D,PREFIX=D,MACID=MAX,ALIGN=F, C DMACID=MAX,SUPPORT=(D,C,L),DNAME=MAXMDL DMAXMDL DSECT , *,##### PREFIX=D, MACID=MAX ##### * Parameterarea DMAXHDR FHDR MF=(C,DMAX),EQUATES=NO Standard-Header DMAXHDR DS 0A DMAXFHE DS 0XL8 0 GENERAL PARAMETER AREA HEADER * DMAXIFID DS 0A 0 INTERFACE IDENTIFIER DMAXFCTU DS AL2 0 FUNCTION UNIT NUMBER * BIT 15 HEADER FLAG BIT, * MUST BE RESET UNTIL FURTHER NOTICE * BIT 14-12 UNUSED, MUST BE RESET * BIT 11-0 REAL FUNCTION UNIT NUMBER DMAXFCT DS AL1 2 FUNCTION NUMBER DMAXFCTV DS AL1 3 FUNCTION INTERFACE VERSION NUMBER * DMAXRET DS 0A 4 GENERAL RETURN CODE DMAXSRET DS 0AL2 4 SUB RETURN CODE DMAXSR2 DS AL1 4 SUB RETURN CODE 2 DMAXSR1 DS AL1 5 SUB RETURN CODE 1 DMAXMRET DS 0AL2 6 MAIN RETURN CODE DMAXMR2 DS AL1 6 MAIN RETURN CODE 2 DMAXMR1 DS AL1 7 MAIN RETURN CODE 1 DMAXFHL EQU 8 8 GENERAL OPERAND LIST HEADER LENGTH * DMAXFRC DS F FILE-Returncode DMAXFPL DS A Addr der FILE-PL DMAX# EQU *-DMAXHDR
In the case of the return exit, the MAXFRC field contains the return code of FILE processing.
FILE parameter list
A DSECT for the FILE parameter area is generated by means of the FILE macro: [name] FILE MF=D[,PREFIX=prefix/*],VERSION=3
The file parameter area must be generated with the format valid as of BS2000/OSD-BC V3.0.
The MAXFPL field of the EX050 DSECT contains the address of the file parameter area.