On-demand implementation

You can use a Formatting user exit to transmit fault entries that match certain criteria to another system for analysis. This process is initiated as required from within the interactive reanalysis report.

Figure 1 shows the sample Formatting REXX user exit, HFZXMIT. It is available in softcopy format as member HFZXMIT in data set HFZ.SHFZSAM1.

Figure 1. Sample Formatting user exit (HFZXMIT) to submit batch TSO XMIT job
nodeid   = 'MVSB'                        /* <--- verify/change */    ❶
userid   = 'HFZROBOT'                    /* <--- verify/change */    ❷
jobcard  = '//NOTIFY   JOB  MSGCLASS=Z'  /* <--- verify/change */    ❸
"MAKEBUF"
queue jobcard
queue '//**************************************************************'
queue '//* Export fault entry'
queue '//**************************************************************'
queue "//EXPORT   EXEC PGM=HFZUTIL"
queue "//DD1      DD DISP=(,PASS),"
queue "//            SPACE=(CYL,(10,100,5),RLSE),"
queue "//            DCB=(DSORG=PO,RECFM=VB,LRECL=10000)"
queue "//SYSPRINT DD SYSOUT=*"
queue "//SYSIN    DD *"
queue "  EXPORT("ENV.HFZHIST"("ENV.FAULT_ID"),DD1)"
queue "/*"
queue '//**************************************************************'
queue '//* Terse the export data set'
queue '//**************************************************************'
queue "//TERSE    EXEC PGM=AMATERSE,PARM='PACK'"
queue "//SYSPRINT DD SYSOUT=*"
queue "//SYSUT1   DD DISP=SHR,DSN=*.EXPORT.DD1"
queue "//SYSUT2   DD DISP=(,PASS),"
queue "//            SPACE=(CYL,(10,100),RLSE)"
queue "//SYSPRINT DD SYSOUT=*"
queue '//**************************************************************'
queue '//* Perform TSO XMIT of the tersed export data set'
queue '//**************************************************************'
queue "//XMIT     EXEC PGM=IKJEFT01"
queue "//DD1      DD DISP=SHR,DSN=*.TERSE.SYSUT2"
queue "//SYSTSPRT DD SYSOUT=*"
queue "//SYSTSIN  DD *"
q_rec("  XMIT" nodeid"."userid "DDNAME(DD1) -")
q_rec("  NONOTIFY")
queue '/*'

/* 'Submit' the stacked TSO batch job.                               */
n = queued()
"HFZALLOC DD(DD1) SYSOUT PGM(INTRDR)"
if rc = 0 then do /* if alloc worked */ 
   address mvs "EXECIO" n "DISKW DD1 (FINIS"
   "HFZFREE DD(DD1)"
end
else ,
   "HFZWTO ALLOCATION OF INTRDR FAILED"
 "DROPBUF"
address mvs "EXECIO" n "DISKW DD1 (FINIS"
"HFZFREE DD(DD1)"
/*********************************************************************/ ❹
/* #Optionally, update the user title field to show that the fault   */
/* has been sent.                                                    */
/* For example:                                                      */
/* ENV.USER_TITLE = "Sent to" nodeid "on" DATE()"."                  */
/*********************************************************************/
/*********************************************************************/ ❺
/* #Optionally, tell the user that the request has been processed    */
/* by uncommenting the following HFZWRITE calls:                     */
/*"HFZWRITE '<p>History file" ENV.HFZHIST "fault ID" ENV.FAULT_ID,   */
/*          "sent to" nodeid"."userid".'"                            */
/*"HFZWRITE '<p>Press PF3 to return to the interactive reanalysis",  */
/*          "report.'"                                               */
/*********************************************************************/
exit 0

/* Pad record with blanks to 80 bytes.                               */
q_rec: procedure
parse arg rec
if (length(rec) < 80) then rec = rec||copies(' ',80-length(rec))
queue rec
return 0
Notes:
'nodeid' specifies the target system to which the fault entry is sent.
'userid' specifies the user ID for which fault entries are received on the target system.
Ensure that the job card adheres to local standards.
Uncommenting this code provides an optional method for identifying the fault entry as having been sent by providing the date on which this sending occurred, and the system to which it was sent, in the user title field.
If you would like the user to see a display with information about what the issued command has performed, then uncomment the code here.

The receiving end of the manually transmitted fault entries might be the exec described in Automated implementation or it might be any user ID and node for which the receive, and subsequent import, is done manually.

Manual import should be performed using HFZUTIL IMPORT with the PACKAGE option. See IMPORT control statement.

Using the on-demand implementation

While analyzing a fault entry, enter the following primary command:
EXEC HFZXMIT

The HFZXMIT name can be any other name you have called your copy of the HFZXMIT sample exec.