Invoking Z Abend Investigator using an ISPF 3.4 line command

There is an alternative to the typical invocation of the Z Abend Investigator ISPF interface, which uses an option from an ISPF selection menu. Sometimes it is more convenient to invoke the Z Abend Investigator ISPF interface directly as a line command against an MVS dump data set, a history file, or a CICS® auxiliary trace data set on the ISPF option 3.4 Data Set List Utility panel. This invocation has the advantage of being able to perform interactive dump analysis, or display fault entries, or CICS® trace information using the selected data set immediately. You do not have to initiate the appropriate action by using the File pull-down menu for a dump data set, or by typing the data set name for a history file.

To facilitate this, a REXX exec (named FA for fault analysis, for example) is required in one of the data sets that is allocated to the SYSEXEC concatenation of the ISPF user. This exec name can then be entered next to a dump data set, history file data set name, or a CICS® auxiliary trace data set name in an ISPF option 3.4 data set list. The exec invokes Z Abend Investigator using the correct ISPF NEWAPPL ID, and passes the name of the data set as a parameter. The exec determines the data set type from its allocation attributes.

The FA exec:

Parse Arg dsn .

If dsn = '' Then
  Do
    Say 'Data set name required.'
    Exit(4)
  End

/* Determine if dsn is a history file or a MVS DUMP.                 */
outl. =
x = Outtrap('OUTL.',,"NOCONCAT")
Address TSO "LISTDS " || dsn
x = Outtrap(OFF)

svcdump = 0
auxtrac = 0
If outl.0 > 2 Then
  Do
    lrecl = Word(outl.3,2)
    If lrecl = 4160 Then
      svcdump = 1
    Else
      If lrecl = 4096 Then
        auxtrac = 1
  End

/* Invoke the Z Abend Investigator ISPF interface passing the appropriate  */
/* PARM string.                                                            */
/* NOTE: The HEAPZONES(0,ABEND) parameter is only required if this         */
/* is not the default Language Environment option in effect.               */
/* However, this parameter can be left as is regardless, without any       */
/* adverse side effects.                                                   */
Address ISPEXEC
If svcdump = 1 Then
  'SELECT PGM(HFZPDDIR) NEWAPPL(HFZ) '!!,
  'PARM(HEAPZONES(0,ABEND)/DSN('dsn'))'
Else If auxtrac = 1 Then
  'SELECT PGM(HFZPDDIR) NEWAPPL(HFZ) '!!,
  'PARM(HEAPZONES(0,ABEND)/AUXTRACEDSN('dsn'))'
Else
  'SELECT PGM(HFZPDDIR) NEWAPPL(HFZ) '!!,
  'PARM(HEAPZONES(0,ABEND)/ISPFHISTDSN('dsn'))'
Exit

This example is included in data set HFZ.SHFZEXEC as member HFZSFA.

While HFZSFA works as a line command against ISPF 3.4 data sets, as long as HFZ.SHFZEXEC is included in the SYSEXEC concatenation, it might be more convenient to copy this exec to another data set in the SYSEXEC concatenation with a shorter name, such as FA.