z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Add an exit routine to an exit

z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN
SA23-1372-00

Adding an exit routine to an exit means associating an exit routine with an exit that has already been defined or, in some cases, has not yet been defined. On the CSVDYNEX ADD request, you:
  • Name the exit that the exit routine is to be associated with (EXITNAME parameter)
  • Tell the system where to find the exit routine (MODNAME, DSNAME, and MODADDR parameters)
  • Request that the system send a message to the operator if the system encounters certain error conditions when processing the exit routine (MESSAGE parameter)
  • Define the initial state of the exit routine as active or inactive (STATE parameter)
  • Specify a condition under which the exit routine is to get control: a particular job must be running (JOBNAME parameter), or a particular address space must be the primary address space (STOKEN parameter)
  • Specify how many times an exit routine can abnormally end before it becomes inactive (ADDABENDNUM and ABENDCONSEC parameters)
  • Control the order in which the new exit routine is called (POS parameter)
  • Associate an exit routine with an existing system exit that is defined to the dynamic exits facility (see z/OS MVS Installation Exits for a list of the dynamic exits).

The CSVDYNEX DELETE request deletes an exit routine that was added to an exit by the CSVDYNEX ADD request.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: One of the following:
  • Supervisor state
  • PSW key 0-7
  • PKM allowing key 0-7
  • APF-authorized
  • SAF UPDATE authority to FACILITY class entity CSVDYNEX.exitname.modname.
Dispatchable unit mode: Task
Cross memory mode: PASN=HASN=SASN
AMODE: 24- or 31-bit
ASC mode: Primary or access register (AR)
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks may be held.
Control parameters: Control parameters and the area that contains the data set name (specified on DSNAME) must be in the primary address space or, for AR-mode callers, must be in an address space or data space that is addressable through a public entry on the caller's dispatchable unit access list (DU-AL).

Programming requirements

Include the CSVEXRET mapping macro to define symbolic names and values for return and reason codes returned by CSVDYNEX. (See z/OS MVS Data Areas in z/OS Internet Library at http://www.ibm.com/systems/z/os/zos/bkserv/.)

Restrictions

The caller must not have functional recovery routines (FRRs) established.

Input register information

See Input register information for CSVDYNEX for input register information for the CSVDYNEX ADD request.

Output register information

See Output register information for CSVDYNEX for output register information for the CSVDYNEX ADD request.

Syntax

The standard form of the ADD request on the CSVDYNEX macro is written as follows:

Syntax Description
   
   name name: symbol. Begin name in column 1.
   
One or more blanks must precede CSVDYNEX.
   
CSVDYNEX  
   
One or more blanks must follow CSVDYNEX.
   
REQUEST=ADD  
   
,EXITNAME=exitname exitname: RS-type address or register (2) - (12).
   
,MODNAME=modname modname: RS-type address or register (2) - (12).
   
   ,STATE=ACTIVE Default: STATE=ACTIVE
   ,STATE=INACTIVE  
   
   ,MESSAGE=NO Default: MESSAGE=NO
   ,MESSAGE=ERROR  
   ,MESSAGE=FOUNDBUTERROR  
   
   ,DSNAME=dsname dsname: RS-type address or register (2) - (12).
   ,MODADDR=modaddr modaddr: RS-type address or register (2) - (12).
   
   ,JOBNAME=ANY Default: JOBNAME=ANY
   ,JOBNAME=jobname jobname: RS-type address or register (2) - (12).
   ,STOKEN=stoken stoken: RS-type address or register (2) - (12).
   
   ,ADDABENDNUM=UNCHANGED  
   ,ADDABENDNUM=addabendnum  
  Default: ADDABENDNUM=UNCHANGED
  addabendnum: RS-type address or register (2) - (12).
   
   ,ABENDCONSEC=NO Default: ABENDCONSEC=NO
   ,ABENDCONSEC=YES  
   
   ,POS=SYSTEM Default: POS=SYSTEM
   ,POS=FIRST  
   ,POS=LAST  
   
   PARAM=param param: RS-type address or register (2) - (12).
   PARAM=NO_PARAM Default: PARAM=NO_PARAM
   
   ,RETCODE=retcode retcode: RS-type address or register (2) - (12).
   
   ,RSNCODE=rsncode rsncode: RS-type address or register (2) - (12).
   
   ,MF=S  
   

Parameters

The parameters are explained as follows:

REQUEST=ADD
Adds an exit routine to an exit.
,EXITNAME=exitname
Specifies a 16-byte field (or a register containing the address of a 16-byte field) containing the 16-character name of an exit that has been defined to the dynamic exits facility. If the name has fewer than 16 characters, left-justify the name and pad the field with blanks.
,MODNAME=modname
Specifies an 8-byte field (or a register containing the address of an 8-byte field) containing the name of an exit routine to be added to the exit. The first character must not be X'00' or blank. (If you specify MODADDR, modname is the name of the exit routine. If you do not specify MODADDR, modname designates a load module or alias, whose entry point is the starting address of the exit routine.) Names of fewer than 8 characters must be left-justified in the 8-byte field and padded with blanks.
,STATE=ACTIVE
,STATE=INACTIVE
Specifies the state you want the exit routine to have. An active exit routine is associated with an exit and will be called if the exit is invoked. An inactive exit routine is associated with an exit, but will not be called. To change the state of an exit routine, use the CSVDYNEX MODIFY request. The default is STATE=ACTIVE.
,MESSAGE=NO
,MESSAGE=ERROR
,MESSAGE=FOUNDBUTERROR
Specifies whether the system is to send message CSV431I to the operator if the system encounters certain errors when processing the exit routine.
  • MESSAGE=NO, the default, requests that the system send the return and reason codes only.
  • MESSAGE=ERROR requests that the system send the message if it encounters any of the following:
    • The exit requires reentrancy; the exit routine is not reentrant.
    • The exit requires AMODE=31, but the exit routine is AMODE=24; or the exit requires AMODE=24, but the exit routine is AMODE=31.
    • The exit allows only one exit routine; one routine is already associated with this exit.
    • The exit routine could not be located.
    • A CSVDYNEX ADD request specified ABENDCONSEC=YES, but the exit is defined with FASTPATH=YES and KEY=key, where KEY is in the range 8 to 15, or with FASTPATH=YES and ANYKEY=YES.
    • A CSVDYNEX ADD request specified that the exit routine should be loaded from a particular data set, but that data set is not APF-authorized, and the caller is in problem state, with PSW key 8-15, and is not APF-authorized.
  • MESSAGE=FOUNDBUTERROR requests that the system send message CSV431I if it encounters any of the circumstances covered by MESSAGE=ERROR, except the following circumstance:
    • The exit routine could not be located.
,DSNAME=dsname
,MODADDR=modaddr
Tells the system how to locate the exit routine to be added. If you specify neither DSNAME nor MODADDR, the system will try to locate the module using LPA, the LNKLST concatenation, and the nucleus.
DSNAME specifies a field (or a register containing the address of a field) containing the 44-character name of a data set or library from which the module is to be obtained. Some rules for specifying DSNAME are:
  • You can allocate the data set as a PDS or a PDSE.
  • If the library name contains fewer than 44 characters, left-justify the name in a 44-character field and pad it with blanks.
  • If you specify a data set name that begins with a blank or X'00', the system responds as if you had specified no data set.
  • Specify DSNAME only if dynamic allocations are enabled within the caller's primary address space.
  • If the caller is in problem state with PSW key 8 to 15, and is not APF-authorized, the data set must be APF-authorized. Otherwise, the data set does not need to be APF-authorized.
  • The data set must be cataloged.

If the data set has been migrated, your program will have to wait for the system to retrieve it.

MODADDR specifies a fullword (or a register containing the address of a fullword) that contains the address of the exit routine to be added. If the exit routine is to get control in 31-bit mode, bit 0 should be on; if in 24-bit mode, bit 0 should be off. The system assumes that the designated exit routine is reentrant.

MODADDR cannot be used if the caller is in problem state with PSW key 8 to 15 and is not APF-authorized.

If you specify MODADDR, make sure the subpool and the key in which the exit routine resides are appropriate for the address spaces and keys in which the exit routine can get control. For example, if you specify STOKEN, the exit routine can reside in the private area of the address space designated by STOKEN. If you do not specify STOKEN, and the exit routine can be called from other address spaces, make sure the exit routine resides in the common area.

If the storage is fetch-protected, the storage key must not conflict with the PSW key on entry to the exit routine. To prevent accidental modification by unauthorized users, the storage for exit routines that get control in system key must not be PSW key 8-15.

,JOBNAME=ANY
,JOBNAME=jobname
,STOKEN=stoken
Specifies a condition under which the exit routine is to get control. You can require that the exit routine take control:
  • During the execution of a specific job, or jobs
  • While a specific address space is the primary address space.

JOBNAME specifies an area (or a register containing the address of an area) that contains the 8-character name of the job that must be running at the time the exit routine is to get control. If the name has fewer than 8 characters, left-justify the name and pad the field with blanks. To indicate the name of more than one job, use an asterisk for the last non-blank character. A matching jobname is one that matches all the characters preceding the asterisk. The default is JOBNAME=ANY.

To indicate that the exit routine is not to be restricted to a particular job, specify a jobname of C'*       '. To leave the jobname unchanged, specify a jobname with the first character X'00' or blank.

STOKEN specifies an area (or a register containing the address of an area) that contains the 8-character STOKEN of the address space that must be the primary address space at the time the exit routine receives control.

If you specify a jobname of C'*       ', a jobname with the first character X'00', or JOBNAME=ANY, you are requesting that the system not check for the jobname or the STOKEN value.

,ADDABENDNUM=UNCHANGED
,ADDABENDNUM=addabendnum
Specifies how many times an exit routine can abnormally end before it becomes inactive. ADDABENDNUM=UNCHANGED, the default, specifies that the system will use the value specified on the ABENDNUM parameter on the CSVDYNEX DEFINE request that defines the exit, or the default value.

ADDABENDNUM=addabendnum specifies an area (or a register containing the address of an area) that contains the number of times an exit routine can end abnormally before it becomes inactive. For example, if you specify the value n, the exit routine becomes inactive when the nth abnormal ending occurs.

If you omit ADDABENDNUM or specify a value of 0, the exit routine becomes inactive on the basis of the ABENDNUM value specified on the CSVDYNEX DEFINE request. Use the ABENDCONSEC parameter to establish whether n means consecutive abnormal endings or cumulative abnormal endings.

The value you specify for ADDABENDNUM is interpreted as a signed, 31-bit number.

,ABENDCONSEC=NO
,ABENDCONSEC=YES
Specifies whether the number of abnormal endings you specify on ADDABENDNUM is to be cumulative or consecutive. The ABENDCONSEC parameter can be specified only if ADDABENDNUM is specified on this request. It will be ignored if the value you specify for ADDABENDNUM is 0.
  • ABENDCONSEC=NO means that after the specified number of accumulated abnormal endings of the exit routine, the exit routine becomes inactive.
  • ABENDCONSEC=YES means that after the specified number of consecutive abnormal endings of the exit routine, the exit routine becomes inactive. You cannot specify ABENDCONSEC=YES when adding an exit routine to an exit that is defined with PSW key 8 to 15 or ANYKEY=YES.

Note that the default is ABENDCONSEC=NO, which will override what was specified for ABENDCONSEC on the DEFINE request for this exit.

You can only specify the ABENDCONSEC parameter if you specify the ADDABENDNUM parameter.

,POS=SYSTEM
,POS=FIRST
,POS=LAST
Specifies the order in which the system calls the exit routine.
  • POS=SYSTEM, the default, specifies that the exit routine may be called in any order relative to other routines associated with this exit.
  • POS=FIRST specifies that the system should call the exit routine before any other routines associated with this exit, unless another exit routine, added after it, also specifies FIRST.
  • POS=LAST specifies that the system should call the exit routine after any routines associated with this exit, unless other exit routines are added after it.
,PARAM=param
,PARAM=NO_PARAM
When REQUEST=ADD is specified, PARAM is an optional input parameter that specifies parameter information to be passed to the exit routine.

The first four bytes of the area are passed to the exit routine in access register 0. The second four bytes are passed to the exit routine in access register 1. If PARAM is not provided, zeroes are placed into the access registers.

The value is displayed using DISPLAY PROG,EXIT with the DIAG option. The display treats the 8 byte value as any other printable string so it is suggested that the 8 bytes be printable characters. If they are not, the only ramification is that they might not be visible via that display command.

The default is NO_PARAM.

To code: Specify the RS-type address, or register (2) - (12) of an 8-character field.

,RETCODE=retcode
Specifies a fullword (or a register) where the system is to store the CSVDYNEX return code. The return code is also in GPR 15.
,RSNCODE=rsncode
Specifies a fullword (or a register) where the system is to store the CSVDYNEX reason code. The reason code is also in GPR 0.
,MF=S
Specifies the standard form of the CSVDYNEX macro.

ABEND codes

None.

Return and reason codes

See Return and reason codes for the return and reason codes for the CSVDYNEX ADD request.

Example

For an example of how to associate an exit routine with an exit, see Example 2.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014