z/OS MVS Installation Exits
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


IEF_VOLUME_ENQ — Volume ENQ Installation Exit

z/OS MVS Installation Exits
SA23-1381-00

When a job must wait to enqueue on a volume or a series of volumes, MVS™ issues a WTOR that requests the system operator to cancel the job or let the job wait. You can automate your installation's responses to volume ENQ WTORs and reduce the need for operator intervention by:
  • Defining an installation default policy for handling a majority of the volume ENQ allocation requests that are likely to occur. Specify the default policy on the VOL_ENQ statement in the ALLOCxx member of SYS1.PARMLIB.
  • Coding the volume ENQ exit routine to make exceptions, if any, to the installation default policy for certain jobs and/or volumes. You can specify the exit in the EXITxx or PROGxx member of SYS1.PARMLIB; however, IBM® recommends that you use PROGxx.
Using the information it receives about the job, the volume ENQ exit routine determines whether to:
  • Cancel the job and suppress the WTOR
  • Allow the job to wait
  • Allow the WTOR to be issued so that the system operator must decide whether to cancel the job or let the job wait
  • Allow the installation default policy to determine whether to cancel the job or issue the WTOR.
For a list of the allocation messages you can automate or suppress, see Programming Considerations.

For more information on the ALLOCxx, EXITxx, and PROGxx parmlib members, see z/OS MVS Initialization and Tuning Reference.

Controlling the Exit Routine Through the Dynamic Exits Facility

IBM has defined the volume ENQ installation exit to the dynamic exits facility. 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 its exit routines.

You can use the ADDABENDNUM and ABENDCONSEC parameters on the CSVDYNEX REQUEST=ADD macro or the ABENDNUM parameter of the SETPROG EXIT operator command to limit the number of times the exit routine abnormally ends before it becomes inactive. 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; that is, the recovery routine is entered with bit SDWACLUP off.
By default, the system does not disable the exit routine.

Replacing the Exit Routine

For information about replacing a dynamic exit routine, see Replacing a Dynamic Exit Routine.

Exit Routine Environment

The exit routine receives control in the following environment:
  • Enabled for interrupts.
  • In supervisor state with PSW key 1.
  • In AMODE 31 and RMODE ANY.
  • With no locks held. (However, it may hold an exclusive ENQ on major name SYSZTIOT for the address space in which the allocation occurs.)

Exit Recovery

The exit routine should provide its own recovery. If the exit routine abnormally terminates, its recovery routine will get control.

If the exit routine abnormally terminates, and the exit routine does not provide its own recovery, or the error percolates beyond the exit's recovery routine, a system recovery routine will get control. The system will fail the allocation request.

Whether or not the exit routine continues to be invoked depends on the abend processing of the dynamic exits facility.

Exit Routine Processing

MVS invokes the volume ENQ exit routine or routines every time a job must wait to enqueue on a volume. Before issuing messages (listed in Programming Considerations) that identify the volume(s) and request operator action, MVS invokes the volume ENQ exit routine or routines, if any are specified to the dynamic exits facility, and passes a list of parameters that contains the following information about the allocation request:
  • Job name
  • Step name
  • A table containing the serial numbers of the volumes that the job requires
  • Action to be taken in response to WTOR (this field, ACTION, is filled in by the exit routine).
Using the information in the parameter list, the exit routine indicates to the system (in the ACTION field of the parameter list) whether the system should:
  • Cancel the job and suppress the WTORs
  • Allow the job to wait for the volume(s)
  • Allow the WTORs to be issued so that the system operator must make the decision
  • Allow the installation's default policy to make the decision.

See Return Specifications for the specific values the exit routine can return.

Using the Exit with Your Installation's Default Policy: If you code the exit, use it in conjunction with your installation default policy for jobs that must wait to enqueue on volumes. Determine your installation's default policy by specifying one of the following parameters on the POLICY parameter of the VOLUME_ENQ statement:
Parameter
Action
CANCEL
Cancel jobs that must wait for a volume to be released
WTOR
Allow the volume ENQ messages to be issued so that the system operator must decide whether to cancel the job or let the job wait.
WAIT
Allow jobs to wait for volumes to be released.
Attention: When WAIT is used as the default, deadlocks with other jobs in the system might arise for tape volumes.

When you have chosen a default policy to handle the majority of volume ENQ WTORs that can occur, use the volume ENQ exit routine to make exceptions, if any, for certain jobs and/or volumes. The exit routine's decisions will override the installation's default policy.

If you do not code the volume ENQ exit routine, MVS will use your installation's default policy (specified in the ALLOCxx member) to determine how to respond to all volume ENQ allocation requests. If your installation does not define a default policy, the system will always issue the volume ENQ WTORs.

Programming Considerations

Observe the following conventions when coding the volume ENQ exit routine:
  • Code the exit routine so that it is reentrant.
  • Do not code the exit routine to issue dynamic allocation calls.
  • Do not code the exit routine if its decision will always be the same regardless of which jobs are waiting or which volumes are needed. Instead, allow your installation's default policy to make the decision.
  • The exit is called every time a job requires a volume to be released. Therefore, when coding the exit routine, you should be aware that an increased path length will increase processor utilization and may degrade performance.
Message Processing: Use the exit routine, in conjunction with the installation default policy, to suppress and automate your installation's responses to the following messages:
  • IEF690I - The following volumes are unavailable to <jobname>...
  • IEF235D - <jobname> is waiting for volumes. To cancel wait, reply no.
In addition, you might avoid getting message IEF369D (invalid reply), which the system issues in response to an invalid reply to IEF235D.

Macro Instructions and Restrictions: Do not code the exit routine to issue the WAIT macro or call a service that issues a WAIT, such as WTOR.

Entry Specifications

The system passes the address of the exit parameter list to the exit routine.

Registers at Entry: The contents of the registers on entry to the exit are as follows.

Register
Contents
0
Not applicable
1
Address of a pointer to the exit parameter list
2-12
Not applicable
13
Register save area
14
Return address
15
Entry point address of the exit routine

Parameter Descriptions: Register 1 contains the address of a pointer to the exit parameter list, the UXPARMA, which is mapped by macro IEFZB478 (data area UXPARMA). For a mapping of the UXPARMA data area, see z/OS MVS Data Areas in z/OS Internet Library at http://www.ibm.com/systems/z/os/zos/bkserv/.

Return Specifications

The volume ENQ exit indicates its decision to the system by placing one of the following values in the 1-byte ACTION field of the exit parameter list (the UXPARMA):
Value
Explanation
X'80'
Cancel the job and suppress the WTOR
X'40'
Issue the WTOR so that the system operator can make the decision
X'08'
Let the job wait for the volume(s)
X'00'
Let the installation default policy make the decision

If the exit routine does not return a valid value in the ACTION field, the system will ignore the exit and use the installation default policy to make the decision.

Registers at Exit: Upon return from the exit processing, the register contents must be as follows.

Register
Contents
0-14
Restored to contents at entry
15
0

Coded Example of the Exit Routine

For your reference, IBM provides a coded example of this exit routine in SYS1.SAMPLIB. The routine is named IEFVENQS.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014