Previous Topic: Examples of ARF Condition DefinitionNext Topic: Defining a Late at Job End Notification (LE)


Defining a Job Completion Condition (JC)

Suppose that the PAYROLL job is known to suffer repeated x37 system abends. The response to an x37 abend for the PAYROLL job is to notify the operator that the REORG job is to be run. When the REORG job completes, the PAYROLL job should be restarted. The job can be restarted exactly one time.

This example illustrates how CA WA CA 7 Edition ARF can be used to automate this recovery procedure. The definition is coded as in the following figure:

---------------------------- ARF CONDITION EDIT ---------------------------- FUNCTION: ADD (ADD,DELETE,EXIT,FORMAT,LIST,REPL,SAVE,SR,SS) DEFCT: 00 TYPE: JC SYS EQ * SID EQ 0 RSTC EQ 0 EM EQ * DEFID: 1 FROM: 01011975 0001 TO: 12312074 2359 JC, SC TST: STEP EQ * PROC EQ * PGM EQ * CC/ABENDS : SYS EQ +37 __ ??? GE 0000 __ ??? GE 0000 __ ??? GE 0000 __ ??? GE 0000 __ ??? GE 0000 EC, EE, IS, LB, LE, LS TST: RO: GE DATE: TIME: AO: ? INT/ADJ: RESPONSES: 1: AM,CM=H,M=ATTENTION! &JOBNAME(&JOB#) HAS ABENDED! 2: AJ,JOB=REORG,DELAY=0000,RETRY=0000,ACTION=N 3: AM,CM=H,M=ATTENTION! &ARFSET ACTIONS COMPLETE FOR &JOBNAME(&JOB#) 4: 5: 6: 7: FINAL -- DISP : R CA-11?: N BYPGDG: N USAGE: PROCESS: CC: START : END : PROGRAM: AR32 MSG-INDX: 00 -- AR.3.1 -- yy.ddd / hh:mm:ss MESSAGE: ENTER FUNCTION, TRANSFER OR ENTER A COMMAND ON THE TOP LINE

In this example note that the definition is new and is being added. Thus, the value in the FUNCTION field is 'ADD'. TYPE is required. The value here is 'JC' to indicate that a job completion condition is being defined. The definition requires an index, the value here is '1'.

Most of the defaults for the filter criteria are acceptable. However, this definition will only apply to the first run of the job. If it is restarted, this definition will not be applicable because the RSTC test specifies 'EQ 0'.

The type specific test indicates that it is to apply to any step, proc, and program in the job. A system abend code test is indicated so that any 'x37' system abend is to be recognized as an ARF exception. ARF allows a wildcard specification as in '+37' to indicate that this definition is for any 'x37' abend.

Assume that a run of PAYROLL (CA WA CA 7 Edition job number: 0211) has abended with a S-D37 abend. Assume too, that the definition in this example is used for ARF monitoring and is contained in ARFSET: PAYMON. When the condition is detected, ARF will send the following highlighted message to the MVS console:

ATTENTION! PAYROLL(211) HAS ABENDED!

Note the use of ARF variables to refer to the job name and CA WA CA 7 Edition job number. After issuing this message, ARF will submit a job named REORG to run on behalf of PAYROLL. When the job completes, the following highlighted message will be sent to the MVS console:

ATTENTION! PAYMON ACTIONS COMPLETE FOR PAYROLL(211)

Because the condition defined is for job completion, the final disposition is processed when all other action statements for the definition have been handled. In this case, the job is to be restarted without CA-11.