IBM® has defined the File
End installation exit to the dynamic exits facility. You can refer
to the dynamic exit by the name OCE_FILEEND. You can use the EXIT
statement of the PROGxx parmlib member, the SETPROG EXIT operator
command, or the CSVDYNEX macro to control this exit and the exit routines
of the exit.
The system attempts to add exit routine OCE_FILEEND, unless an
exit routine has been associated with OCE_FILEEND by PROGxx or SETPROG.
If you have associated exit routines with OCE_FILEEND the system
does not use the default exit routine. In this case, if you require
an exit routine of the default name, you must explicitly add the default
exit routine to PROGxx.
To limit the number of times the exit routine ends with an abend,
before the exit routine becomes inactive, you can use the ADDABENDNUM
and ABENDCONSEC parameters on the CSVDYNEX REQUEST=ADD macro, or the
ABENDNUM parameter of the SETPROG EXIT operator command or the ABENDNUM
parameter of the PROGxx EXIT statement. By default, the system disables
the exit routine if the exit routine ends with an abend on two successive
calls. An abend is counted when both of the following conditions exist:
- The exit routine does not provide recovery, or the exit routine
does provide recovery but percolates the error.
- The system allows a retry (the recovery routine is entered with
bit SDWACLUP off).
Return codes for multiple exit routines: If you have associated
multiple exit routines with the OCE_FILEEND exit, and those exit routines
return different valid return codes (as listed in the following section),
then the final return code is determined as follows:
- If at least one exit routine has a return code of 0, processing
continues.
If any exit routine returns a non-valid return code, an ABEND
is issued.