Associating an exit routine with an exit
You associate an exit routine with an exit using the CSVDYNEX ADD request. If the exit routine is not in the LPA list or in the nucleus, and you did not use the MODADDR keyword, the system loads the exit routine into common storage.
It is important that the exit associator know the exit criteria established by the exit definer. To find out the exit criteria, check the requirements imposed by the exit definer (the system, for SMF and allocation exits; or a vendor or customer application).
- Do you want the exit routine to be
called only if a certain address space is primary (STOKEN parameter),
or if a certain job (JOBNAME parameter) is running?
You can change the STOKEN or JOBNAME specification through the MODIFY request.
- Do you want the exit routine to be
called even if on previous calls it has abnormally ended?
The ADDABENDNUM and ABENDCONSEC parameters on the ADD request are similar to the ABENDNUM and ABENDCONSEC parameters on the DEFINE request. On the ADD request, you can override the settings that were defined on the DEFINE request.
exit associator code
__________
__________
CSVDYNEX REQUEST=ADD,MODNAME==CL8'RTN1',
EXITNAME==CL16'EX1'...
__________
You can associate an exit routine with an exit that does not exist (perhaps because it has not been defined yet). In this case, the system maintains the association; however, the exit routine does not get control until the exit is defined and the CALL is issued.
- Change the state of an exit routine from active to inactive, or vice versa
- Change the requirement that the exit routine runs while a specific job runs or while a certain address space is the primary address space.
CSVDYNEX REQUEST=ADD,EXITNAME=LEX,
MODNAME=LMOD,STATE=ACTIVE,DSNAME=LDSN,
RETCODE=LRETCODE,RSNCODE=LRSNCODE,MF=(E,DYNEXL)
*
* Place code to check return/reason codes here
⋮
⋮
* Data Declarations
LEX DC CL16'SYS.IEFUJI'
LMOD DC CL8'MYMOD'
LDSN DC CL44'MY.DSN'
CSVEXRET Return code information
DYNAREA DSECT
LRETCODE DS F
LRSNCODE DS F
CSVDYNEX MF=(L,DYNEXL)