222 IBM Application Development Tools for z/OS and OS/390
Example 6-7 is a REXX exec that uses FA Analysis Control user exit to
determine where a fault entry will be directed.
Example 6-7 Analysis control user exit: REXX exec
/* Rexx */
/**********************************************************************/
/* Exec: SendIt2 */
/* Function: Send an abend to the appropriate FA fault history file...*/
/* History: 06/15/2001 - LMK - Created */
/**********************************************************************/
/* */
/* This exit can optionally be used with IBM Fault Analyzer for */
/* OS/390 to direct the output of batch abends to an appropriate */
/* fault history file. */
/* */
/* On entry, two stems are provided: */
/* - ENV */
/* - CTL */
/* Both of these data areas are described in the User’s Guide. */
/* */
/* To use this exit, the name of the EXEC (in this example, */
/* SENDIT2 is used, but this can be any name) must be specified */
/* in an EXITS option as follows: */
/* */
/* EXITS(CONTROL(REXX((SENDIT2))) */
/* */
/* For the exit to be invoked by Fault Analyzer, it must be made */
/* available via the IDIEXEC DDname: */
/* */
/* IDIEXEC(IDI.REXX) */
/* */
/**********************************************************************/
If Env.Job_Type <> ‘B’ Then
Exit /* Only process batch jobs this way */
file_llq = ‘IDI.HIST’ /* Change to match site standards */
ASysUser = Strip(Env.User_ID)
Select
When ASysUser = ‘PRODOPC’ Then /* Production OPC ID */
Ctl.IDIHist = ‘PROD.SYSTEM.’file_llq
When ASysUser = ‘TST1OPC’ Then /* Test OPC ID */
Ctl.IDIHist = ‘TST1.DEVSYS.’file_llq
When ASysUser = ‘UAT1OPC’ Then Do /* UAT OPC ID */
Select
When Env.Job_Class = ‘S’ Then
Ctl.IDIHist = ‘TST1.UATJOBS.’file_llq
When Env.Job_Class = ‘T’ Then
Ctl.IDIHist = ‘TST1.UATJOBT.’file_llq
Otherwise