You can specify a condition code value with which the CA 11 WA step - U11RMS terminates in order to conditionally execute a recovery step in a job. This might be useful in the event a restore of a database is needed upon a restart.
This procedure provides the steps necessary for conditionally executing a recovery step.
Step1 executes the U11RMS program. Notice that STEP4 is a VSAM update step. Therefore, if STEP4 ABENDS the recovery of the master file would be needed from STEP3. Also notice that STEP3 has a CONDITION that indicates do not executes unless STEP1 completes with a COND=03. Now, during the production run if STEP1 completes with a COND=0, STEP3 will be skipped and if STEP4 should ABEND, the job will be set to restart in STEP2. This is because the CMT reflects STEP3 as a NOEX step.
To restart the job, you have to override STEP2 and code STEP3 as the restart step. Also, you will need to pass a CC=03 from the RMS step, in this case to STEP3, so that CA 11 WA can force a restart in STEP3. This is normally done through a formatted screen from your respective Job Management or Workload Automation engine (CA 7 WA, CA Scheduler JM, and CA Jobtrac JM), but the example demonstrates what is actually executed in the JCL.
Note: the CA11NR DD Dummy statement prevents restarting in a non restartable step.
Production Run: //STEP1 EXEC U11RMS,TYPRUN='P' //STEP2 EXEC PGM=USERPGM1 //STEP3 EXEC PGM=RECOVER,COND=(03,NE,STEP1) //STEP4 EXEC PGM=UPDATE //CA11NR DD DUMMY //STEP5 EXEC PGM=USERPGM2 //STEP6 EXEC PGM=USERPGM3
Restart: //STEP1 EXEC U11RMS,TYPRUN='R,STEP3,CC=03' //STEP2 EXEC PGM=USERPGM1 //STEP3 EXEC PGM=RECOVER,COND=(03,NE,STEP1) //STEP4 EXEC PGM=UPDATE //STEP5 EXEC PGM=USERPGM2 //STEP6 EXEC PGM=USERPGM3