HFZUTIL Delete user exit

The following describes the HFZUTIL Delete user exit.

Purpose

This exit can control the deletion of a fault entry during history file management using the HFZUTIL batch utility with the DELETE control statement (for details, see DELETE control statement). This control is provided by setting the data area field UTL.PERFORM_ACTION to 'Y' if the entry should be deleted, or to 'N' if not. The field UTL.PERFORM_ACTION is set to 'Y' before invoking the exit, except when a fault entry is locked. In this case, when ENV.LOCK_FLAG is not blank, the UTL.PERFORM_ACTION flag is set to 'N'. See UTL - HFZUTIL Batch Utility user exit parameter list for details about the UTL data area.

The fault entries for which the user exit is invoked are those that match the specified DELETE control statement criteria.

When invoked

This exit is invoked once for each fault entry in a history file whenever the HFZUTIL batch utility is executed using the DELETE control statement.

Parameters

How parameters are passed to the exit depends on the exit type, REXX or load module.

Z Abend Investigator initializes the parameter lists using current values for the particular fault and processing options in effect before invoking the Notification user exit.

REXX

Two stems are available to the exit:

The defined variable names are identical to the field names. For example, to access the field VERSION in the ENV data area, use the REXX variable ENV.VERSION.

Load module

At entry to this exit, R1 contains the 31-bit address of a parameter list comprising two fullwords:

Example

The following is an example of an HFZUTIL Delete user exit that is written in REXX.
Figure 1. Sample REXX HFZUTIL Delete user exit
/* REXX */
if ENV.VERSION <> 5 then
  say 'Note: ENV data area version change - field usage review required!'
if UTL.VERSION <> 1 then
  say 'Note: UTL data area version change - field usage review required!'
UTL.PERFORM_ACTION = 'Y'  /* Delete current entry */
If the above sample exit existed as member ABC in data set X.Y.Z, then providing the JCL DD statement
//HFZEXEC DD DISP=SHR,DSN=X.Y.Z
and the HFZUTIL batch utility control statement
Exits(DELETE(REXX(ABC)))
in your HFZUTIL batch utility history file management job would cause the exit to be invoked.