Restart the proc
- Get link
- X
- Other Apps
there are 4 step in proc in step 3 file is corrupted .so i want to use new dataset from jcl for 4 step and want to dummy out step 3 and how can you achieve this and from which step you will restart the job
To handle this scenario, you need to:
Dummy out step 3 (since it uses corrupted file)
Provide new dataset for step 4 from JCL
Restart from step 3 (but skip it) and continue with step 4
Solution:
Method 1: Using COND Parameter and Dataset Override
In your Calling JCL:
//JOBNAME JOB ...,RESTART=STEP3 //JCL EXEC PROC=MYPROC //PROC.STEP3.COND=(0,GT) ← Dummy out step 3 //PROC.STEP4.DDNAME DSN=NEW.DATASET.NAME, ← New dataset for step 4 // DISP=SHR
Method 2: Using Symbolic Parameters in PROC
If PROC has symbolic parameters:
//JOBNAME JOB ...,RESTART=STEP3 //JCL EXEC PROC=MYPROC, // STEP3FLG='(0,GT)', ← Skip step 3 // NEWDSN='NEW.DATASET.NAME' ← New dataset for step 4
Restart Strategy:
You should restart from STEP3: ← This is the key point
//JOBNAME JOB ...,RESTART=STEP3
Why restart from STEP3?
Steps 1 and 2 have already completed successfully
Step 3 needs to be bypassed (but the restart mechanism needs to process it)
Step 4 will use the new dataset
Complete Example:
Assuming this PROC structure:
//MYPROC PROC //STEP1 EXEC PGM=PGM1 //STEP2 EXEC PGM=PGM2 //STEP3 EXEC PGM=PGM3 // DD DSN=CORRUPTED.FILE,DISP=SHR //STEP4 EXEC PGM=PGM4 // DD DSN=ORIGINAL.FILE,DISP=SHR
Your JCL with restart:
//MYJOB JOB (123),'PROD JOB',CLASS=A, // MSGCLASS=H,RESTART=STEP3 ← RESTART FROM STEP3 //JCL EXEC PROC=MYPROC //PROC.STEP3.COND=(0,GT) ← SKIP STEP3 //PROC.STEP4.DD DSN=NEW.UNCORRUPTED.FILE, ← NEW DATASET FOR STEP4 // DISP=SHR
Step-by-Step Execution:
Job restarts from STEP3 (due to
- Get link
- X
- Other Apps
Comments
Post a Comment