IDIUTIL ListHF user exit
The following describes the IDIUTIL ListHF user exit.
Purpose
This exit can be used to control the listing of a fault entry during history file management using the IDIUTIL batch utility with the LISTHF control statement (for details, see LISTHF control statement). This control is provided by setting the data area field UTL.PERFORM_ACTION to 'Y' if the entry should be listed, or to 'N' if not. The field UTL.PERFORM_ACTION is set to 'Y' before invoking the exit. See UTL - IDIUTIL 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 LISTHF control statement criteria.
When invoked
This exit is invoked once for each fault entry in a history file whenever the IDIUTIL batch utility is executed using the LISTHF control statement.
Parameters
How parameters are passed to the exit depends on the exit type, REXX or load module.
Fault Analyzer initializes the parameter lists using current values for the particular fault and processing options in effect before invoking the IDIUTIL ListHF user exit.
REXX
- ENV.
Contains defined symbols for all fields in the ENV data area (see ENV - Common exit environment information).
- UTL.
Contains defined symbols for all fields in the UTL data area (see UTL - IDIUTIL Batch Utility user exit parameter list).
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
- 31-bit ENV address in word 1.
Address of an ENV data area (see ENV - Common exit environment information).
- 31-bit UTL address in word 2.
Address of a UTL data area (see UTL - IDIUTIL Batch Utility user exit parameter list).
Note: The high-order bit is on to indicate that this parameter is the last parameter passed.
Example 1: Invoking the IDIUTIL ListHF user exit
//IDIEXEC DD DISP=SHR,DSN=X.Y.Z
and the IDIUTIL batch utility control statement
Exits(LISTHF(REXX(ABC)))
in your IDIUTIL batch utility history file management job would
cause the exit to be invoked.Example 2: Creating a custom report and CSV file of fault entries with the IDIUTIL ListHF user exit
The following is an example of an IDIUTIL ListHF user exit that is written in REXX.
This sample exit shows how one might write a customized report, as well as a comma-delimited file that can be used as input to a spreadsheet application.
In addition to the fields used, any other fields that are available from the ENV or UTL data areas can be included.
- Fault ID
- Date
- Time
- Lock
- Username
- User Title
- CPU Sec
//MYREP DD SYSOUT=*
//COMMA DD SYSOUT=*
The persistent user field, ENV.USER_1, is used to record the fact that the report header has been written.
The above sample exit is provided as member IDISUTL1 in the IDI.SIDISAM1 data set.
//IDIUTIL JOB parms
//RUNUTIL EXEC PGM=IDIUTIL
//SYSPRINT DD SYSOUT=*
//MYREP DD SYSOUT=*
//COMMA DD SYSOUT=*
//IDITRACE DD SYSOUT=* (Optional)
//IDIEXEC DD DISP=SHR,DSN=IDI.SIDISAM1
//SYSIN DD *
Exits(LISTHF(REXX(IDISUTL1)))
FILES(my.histfile)
LISTHF
/*
Example 3: Collecting abend data for later statistical analysis with the IDIUTIL user exit
History files are dynamic. A fault entry can be deleted from a history file explicitly or by automatic space management. If you want to use fault entry data as input to an analytics application, you might need to collect and preserve the fault entry data outside of the history file. The IDISUTL2 member of the IDI.SIDISAM1 data set is a sample REXX program that you can run regularly for this purpose.
- The RUNUTIL step runs IDISUTL2 as an IDIUTIL LISTHF user exit to generate a CSV-format file of the fault entries from one or more history file data sets. (This step is described in Example 2.)
- The MERGE step appends the CSV data collected in the RUNUTIL step to the cumulative file specified by the ALLDATA DD statement.