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


Define an exit

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

The CSVDYNEX DEFINE request provides the set of information known as the exit. To define an exit, you:
  • Give the exit a name (EXITNAME parameter)
  • Establish the persistence of the exit (PERSIST parameter)
  • Set defaults for how the system is to handle the abnormal ending of an exit routine (ABENDNUM and ABENDCONSEC parameters)
  • Establish how the system processes exit routines (FASTPATH, KEY, and ANYKEY parameters)
  • Specify how the system is to handle the return codes from exit routines (RCFROM, RCCOMPARE, RCTO, RCCVAL, and CALLSTOPRC parameters)
  • Establish some requirements for the exit routine or routines that the system invokes at the exit:
    • Addressing mode (AMODE parameter)
    • Reentrancy (REENTRANT parameter)

The CSVDYNEX UNDEFINE request removes the definition that is established by the DEFINE request.

Note: You define an exit implicitly when you:
  • Add exit routines to an exit before the exit has been defined
  • Set attributes for an exit using the ATTRIB parameter before the exit has been defined.

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.DEFINE.
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 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 DEFINE request.

Output register information

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

Syntax

The standard form of the DEFINE 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=DEFINE  
   
,EXITNAME=exitname exitname: RS-type address or address in register (2) - (12).
   
   ,AMODE=31 Default: AMODE=31
   ,AMODE=24  
   ,AMODE=DEFINED  
   
   ,REENTRANT=OPT Default: REENTRANT=OPT
   ,REENTRANT=REQ  
   
   ,PERSIST=TASK Default: PERSIST=TASK
   ,PERSIST=ADDRESSSPACE  
   ,PERSIST=IPL  
   
   ,ABENDNUM=abendnum abendnum: RS-type address or address in register (2) - (12).
   
   ,ABENDCONSEC=NO Default: ABENDCONSEC=NO
   ,ABENDCONSEC=YES  
   
   ,FASTPATH=NO,KEY=ZERO  
  Default: FASTPATH=NO,KEY=ZERO
   ,FASTPATH=NO,KEY=key key: RS-type address or address in register (2) - (12).
   ,FASTPATH=NO  
   ,FASTPATH=YES,KEY=key  
   ,FASTPATH=YES,ANYKEY=NO,KEY=key  
   ,FASTPATH=YES,ANYKEY=YES  
   
   ,LOADAPF=NO Default: LOADAPF=NO
   ,LOADAPF=Yes  
   
   ,RCFROM=rcfrom,RCCOMPARE=option,  
    RCTO=rcto  
   ,RCFROM=rcfrom,RCCOMPARE=VALUE,  
     RCCVAL=rccval,RCTO=rcto  
    rcfrom: RS-type address or address in register (2) - (12).
    option: See the RCCOMPARE parameter description.
    rcto: RS-type address or address in register (2) - (12).
    rccval: RS-type address or address in register (2) - (12).
   
   ,CALLSTOPRC=callstoprc callstoprc: RS-type address or address in register (2) - (12).
   
   EXITTYPE=UNSPECIFIED Default: EXITTYPE=UNSPECIFIED
   EXITTYPE=INSTALLATION  
   EXITTYPE=PROGRAM  
   
   ,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=DEFINE
Defines 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. Names of fewer than 16 characters must be left-justified in the 16-character field and padded with blanks.
Names must be unique within the system. To avoid the names the system uses, begin the name with the letters J through Z (but never with the character string “SYS”). Other rules are:
  • You can use alphanumerics, underscores, and periods.
  • Do not use imbedded blanks.
  • Do not begin with X'00' or a blank.

IBM® recommends that you specify exit names using upper case; the EXIT statement of the PROGxx parmlib member and the commands (SETPROG, SET PROG=, and DISPLAY PROG) used to control dynamic exits require upper case.

,AMODE=31
,AMODE=24
,AMODE=DEFINED
Specifies the addressing mode of exit routines that the exit point is to invoke. AMODE=31, the default, specifies that the exit routines must have an AMODE of 31-bit. AMODE=24 specifies that the AMODE must be 24-bit. AMODE=DEFINED indicates that the exit routine takes control in the AMODE that was defined for the exit routine's load module at the time of the linkedit (for example, by a LOAD action).

Note that if you use AMODE=24 or AMODE=DEFINED, you cannot specify GPR 2 in the register update block (RUB) on the CSVDYNEX CALL request.

,REENTRANT=OPT
,REENTRANT=REQ
Specifies whether exit routines to be added to the exit can optionally be reentrant or are required to be reentrant. The default is REENTRANT=OPT. If you specify REENTRANT=REQ, the CSVDYNEX service verifies that exit routines added with the CSVDYNEX ADD request have been linkedited with the RENT attribute.

If you specify REENTRANT=OPT, you cannot specify ANYKEY=YES.

,PERSIST=TASK
,PERSIST=ADDRESSSPACE
,PERSIST=IPL
Specifies the persistence of the exit in relationship to the issuer of the CSVDYNEX DEFINE request that defines the exit. PERSIST indicates the following:
  • PERSIST=TASK, the default, indicates that the exit exists only as long as the task of the issuer.
  • PERSIST=ADDRESSSPACE indicates that the exit exists only as long as the address space of the issuer.
  • PERSIST=IPL indicates that the exit exists for the duration of the IPL.
,ABENDNUM=abendnum
ABENDNUM specifies a fullword area (or a register containing the address of a fullword area) that contains the number of abnormal endings an exit routine can have before it becomes inactive. An inactive exit routine is one that is associated with an exit, but will not be called. For example, if you specify the value n, the exit routine becomes inactive when the nth abnormal ending occurs. The value you specify for ABENDNUM is interpreted as a signed, 31-bit number.

If you omit ABENDNUM or specify a value of 0 or 1, the exit routine becomes inactive the first time it abnormally ends. Use the ABENDCONSEC parameter to establish whether n means consecutive abnormal endings or cumulative abnormal endings.

The ADDABENDNUM parameter on the CSVDYNEX ADD request overrides ABENDNUM.

Use the CSVDYNEX MODIFY request to change the state of the exit routine from inactive to active.

,ABENDCONSEC=NO
,ABENDCONSEC=YES
Specifies whether the number of total abnormal endings you specify on ABENDNUM is to be cumulative or consecutive.
  • ABENDCONSEC=NO means that after the specified number of accumulated abnormal endings, the exit routine becomes inactive.
  • ABENDCONSEC=YES means that after the specified number of consecutive abnormal endings, the exit routine becomes inactive. An exit that is defined as FASTPATH=YES and ABENDCONSEC=YES cannot be defined with either PSW key 8 to 15, or with ANYKEY=YES.
,FASTPATH=NO,KEY=ZERO
,FASTPATH=NO,KEY=key
,FASTPATH=NO
,FASTPATH=YES,KEY=key
,FASTPATH=YES,ANYKEY=NO,KEY=key
,FASTPATH=YES,ANYKEY=YES
Specifies how the system is to process the CALL request. On the CSVDYNEX DEFINE request, the FASTPATH keyword enables the FASTPATH function. On the CSVDYNEX CALL request, it specifies whether or not to use the function. With FASTPATH=YES, processing is faster because:
  • The system does not provide normal recovery for the exit routine and does no SAF authorization checking.
  • The exit routine runs in the PSW key and with the authorization (problem state or supervisor state) of the caller.
  • In its processing of the CALL request, the system uses a work area obtained by the issuer of the CALL or RECOVER request, instead of obtaining and releasing one. (See the WORKAREA parameter on the CSVDYNEX CALL and RECOVER requests.)

FASTPATH=NO, the default, specifies that FASTPATH processing does not apply to the exit. If you specify FASTPATH=NO on the DEFINE request, all subsequent CALL requests must also specify FASTPATH=NO.

The KEY=ZERO or KEY=key parameter specifies the storage key in which the system is to place the exit routine. KEY=key specifies a fullword (or a register containing the address of a fullword). The KEY parameter with FASTPATH=NO applies to non-reentrant exit routines only. The system places reentrant routines in storage key zero.

The KEY parameter is required with FASTPATH=YES, unless ANYKEY=YES is specified. The value must be 0 through 15. On a CSVDYNEX CALL request that specifies FASTPATH=YES and the KEY parameter, the PSW key of the caller must be the same as the value specified on the KEY parameter or must be 0.

ANYKEY=YES specifies that the exit routine may be called in any PSW key. The following restrictions apply when using ANYKEY=YES:
  • You must specify REENTRANT=REQ
  • You cannot specify ABENDCONSEC=YES
  • You must specify FORCE=YES to delete an exit routine associated with an exit that has been defined with ANYKEY=YES.
LOADAPF=NO
LOADAPF=YES
This optional keyword specifies if every routine for the exit needs to come from an APF-authorized library when the routine is not found in LPA or IEANUC01.
Note: This keyword is only for users who issue CSVDYNEX REQUEST=DEFINE or CSVDYNEX REQUEST=ADD with either supervisor state and system key, or with APF-authorization. For other callers, the routine must come from an APF-authorized library.
  • LOADAPF=NO means that the module can come from a non-APF-authorized library if the module is not found in LPA or IEANUC01.
  • LOADAPF=YES means that the module must come from an APF-authorized library if the module is not found in LPA or IEANUC01.
The default is LOADAPF=NO.
,RCFROM=rcfrom,RCCOMPARE=option,RCTO=rcto
,RCFROM=rcfrom,RCCOMPARE=VALUE,RCCVAL=rccval,RCTO=rcto
Specifies how the system is to process return codes from the exit routines that are associated with the exit.

RCFROM=rcfrom specifies a fullword (or a register containing the address of a fullword) that contains the value known as the RCFROM return code. The system compares the return code from each module called for this exit to the RCFROM return code, using the comparison designated by RCCOMPARE.

RCCOMPARE=option indicates the type of comparison the system is to make. The options on RCCOMPARE are:
  • EQ - equal
  • NE - not equal
  • GT - greater than
  • LT - less than
  • GE - greater than or equal to
  • LE - less than or equal to
  • VALUE - the type of comparison is specified on the RCCVAL parameter.

RCTO=rcto specifies a fullword (or a register containing the address of a fullword) that contains a value that the system will substitute for the actual return code if the comparison is favorable.

RCCVAL specifies a one-byte field (or a register containing the address of a one-byte field) that contains the value that indicates the type of comparison the system is to do when comparing the actual return code with the value provided in RCFROM. The constants produced by the list form of the macro can be used. For example, CSVDYNEX MF=(L,MYLIST) would produce such equate symbols as MYLIST_XRCCOMPARE_EQ and MYLIST_XRCCOMPARE_GT.

RCCVAL applies only to RCCOMPARE=VALUE, and is required with that parameter.

The default for the RCFROM parameter and related parameters is that the system does no matching or substituting of the return code.

,CALLSTOPRC=callstoprc
Specifies a fullword (or a register containing the address of a fullword) that contains a value that the system is to compare with an exit routine's return code. If the exit routine's return code matches the value you specify on CALLSTOPRC, no more exit routines will be called at that exit for the life of this CALL request.

The default for CALLSTOPRC is that the system does no return code comparison.

,EXITTYPE=UNSPECIFIED
,EXITTYPE=INSTALLATION
,EXITTYPE=PROGRAM
When REQUEST=DEFINE is specified, EXITTYPE is an optional parameter that indicates the type of exit.

No enforcement is made with respect to the specified exit type, but the DISPLAY PROG,EXIT command allows you to request to limit the display to exits of a particular type.

The default is EXITTYPE=UNSPECIFIED

EXITTYPE=UNSPECIFIED indicates that the exit type is unspecified.

EXITTYPE=INSTALLATION indicates that this is an installation exit to be managed in part by the SETPROG or PROGxx parmlib member.

EXITTYPE=PROGRAM indicates that this is a program exit to be managed by the CSVDYNEX macro.

,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 DEFINE request.

Example

For an example of how to define an exit, see Example 1.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014