Updating dynamic exits

Use the SETPROG EXIT command to:
You can use the SETPROG EXIT command to control exits that have been defined to the dynamic exits facility. Dynamic exits services are implemented by:

An installation can use any of these methods to control dynamic exits. An exit routine, for example, can be associated with an exit using the CSVDYNEX ADD request, the SETPROG EXIT,ADD operator command, or the EXIT statement of PROGxx.

The complete syntax for the SETPROG EXIT command is:
 
SETPROG EXIT,{ADD,EXITNAME=exitname,MODNAME=modname       }
                  [,STATE={ACTIVE|INACTIVE}]              
                     [,DSNAME=dsname]                     
                  [,JOBNAME={jobname|*}]                  
                     [,ABENDNUM=(n[,CONSEC])]             
                     [,FIRST|LAST]                        
                  [,PARAM=param]
             ,{REPLACE,EXITNAME=exitname,MODNAME=modname,}
                               [,STATE={ACTIVE|INACTIVE}]
                                    [,DSNAME=dsname]                                                        
                  
             {ATTRIB,EXITNAME=exitname,KEEPRC=(compare,kk)}
                                                         
             {DELETE,EXITNAME=exitname,MODNAME=modname    }
                  [,FORCE={YES|NO}]                       
                                                         
             {MODIFY,EXITNAME=exitname,MODNAME=modname    }
                  [,STATE={ACTIVE|INACTIVE}]              
                     [,JOBNAME={jobname|*}]               
                                                         
             {UNDEFINE,EXITNAME=exitname                  }
 
Note:
  1. This command requires a /* */ around comments. Refer to System command formats for further information.
  2. The EXITNAME parameter must be the first parameter following the ADD, ATTRIB, DELETE, MODIFY, or UNDEFINE keywords.
Note:
ADD
Adds an exit routine to an exit.
REPLACE
Replaces an exit routine for an exit.
PARAM=param
The 1 - 8 character parameter that is passed to the exit routine. If this parameter is less than 8 bytes, it is padded with blanks until it is 8 bytes. The first 4 bytes are passed to the exit routine in access register 0. The second 4 bytes are passed to the exit routine in access register 1. If you specify characters other than the following characters within the PARAM string you must enclose the parameter string within single quotes:
  • uppercase alphabetics A - Z
  • numerics 0 - 9
  • special characters @, $ , #
  • period, asterisk, question mark, underscore, hyphen
DELETE
Deletes an exit routine from an exit.
MODIFY
Changes the state of an exit routine.
UNDEFINE
Undefines an implicitly-defined exit. An exit is implicitly defined when:
  • You add exit routines to an exit before the exit is defined
  • You set attributes using the ATTRIB parameter before defining the exit.
ATTRIB
Changes the attributes of an exit.
EXITNAME= or EX= or EN=exitname
The 1-16 character name of the exit.
MODNAME= or MOD=modname
The 1-8 character name of the exit routine. If DSNAME is not specified, the system tries to locate the exit routine using the LPA, the LNKLST concatenation, and the nucleus.
DSNAME= or DSN= dsname
The 1-44 character data set name of a load library in which the named exit routine resides. The data set must be cataloged, but does not need to be APF-authorized.

If the data set has been migrated, processing of the SETPROG command is delayed until the data set has been retrieved.

JOBNAME={jobname or *}
The 1-8 character name of the job(s) for which this exit routine is to get control. If some other job calls the exit, this exit routine does not get control.

You can use the JOBNAME parameter to limit most exit routines to processing a particular job. However, you cannot use this parameter to restrict processing of the IEFUJV exit routine to a particular job.

To indicate more than one job name, use an asterisk as the last character. A matching jobname is one that matches all characters preceding the asterisk.

Specify JOBNAME=* to request that the system not check for the jobname. The default for the ADD parameter is *. The default for the MODIFY parameter is to leave the jobname unchanged.

Based on the characteristics of the particular exit, the JOBNAME parameter might not be effective if the exit is driven before the job name has been set in a batch initiator.

STATE
Indicates the state of the exit routine. ACTIVE indicates that the exit routine is to be given control when the exit is called. INACTIVE indicates that the exit routine is not to be given control when the exit is called.

The default for the ADD parameter is ACTIVE. The default for the MODIFY parameter is to leave the state unchanged.

ABENDNUM=n[,CONSEC]
Indicates when the system should stop giving control to the exit routine in case of abends. ABENDNUM=n indicates that the exit routine is not to be given control after the nth abend. ABENDNUM=n,CONSEC indicates that there must be n consecutive abends before the system stops giving control to the exit routine. CONSEC is not supported if this exit has FASTPATH processing in effect, and either a PSW key 8 to 15 or ANYKEY processing in effect.

The default is to use the ABENDNUM characteristics that were specified (or defaulted) when the exit was defined. The ABENDNUM value must not exceed 8 decimal digits.

FIRST
Specifies that the system is to call the exit routine before all other exit routines associated with this exit, unless another exit routine, added after it, also specifies FIRST.

If you specify neither the FIRST nor the LAST parameter, the system may call the exit routines associated with this exit in any order.

LAST
Specifies that the system is to call the exit routine after all other exit routines associated with this exit, unless other exit routines are added after it.

If you specify neither the FIRST nor the LAST parameter, the system may call the exit routines associated with this exit in any order.

FORCE=YES or NO
Indicates that the system is to delete the exit routine. The exit routine will no longer be given control. Specify FORCE=YES for an exit with FASTPATH processing in effect, and either a PSW key 8 to 15 or ANYKEY processing in effect. Assuming the exit has FASTPATH processing in effect, and the PSW key is 8 to 15, or ANYKEY processing is in effect:
  • FORCE=NO, the default, changes the state of the exit routine to inactive. The system does not free the storage.
  • FORCE=YES frees the storage of the exit routine immediately. Use FORCE=YES only if you are sure that no exit is running that exit routine.

For exits that are non-FASTPATH or whose PSW key is 0 to 7, and are not ANYKEY, the system frees the storage when it determines that no other exits are using the exit routine.

KEEPRC=(compare,kk)
Specifies a comparison and a return code which, if true, cause the information produced by this exit routine to be returned to the exit caller. The valid choices for compare are EQ, NE, GT, LT, GE, and LE. For example, with KEEPRC=(NE,4), if the exit routine produces a return code of 8, the compare for not-equal with 4 is true, and KEEPRC processing causes the information produced by this exit routine to be returned to the exit caller.

The default is not to perform KEEPRC processing. Do not enter more than 8 decimal digits when specifying a value for kk.

If return codes from more than one exit routine match the conditions specified, the system returns information from the exit routine that finished first.

Example:

Associate exit routine MYMOD with the SMF exit known as SYS.IEFUJI, defined through the SYS statement in a SMFPRMxx parmlib member. The load module is in data set MY.DSN.
SETPROG EXIT,ADD,EXITNAME=SYS.IEFUJI,MODNAME=MYMOD,DSNAME=MY.DSN,
        STATE=ACTIVE