Recently, my friend got a project to skip steps in a proc. There are 250 steps in the proc (JCL procedure). He requires to skip the PS210 step from the proc.
Here is the solution that you need to give COND in JCL. No need to make any change to the Proc.
Also You May Like: The Key Differences Between In-stream and Cataloged Procedures
Use COND.PS210(0,LE) at STEP1. The COND validates with the previous proc step’s (PS209) return code. If the RC from PS209 is ‘0’. Then, the comparison is “0 LE 0 “, which means the condition becomes true. So the step bypasses.
JCL Example That Skips Execution of Procedure’s Steps
//Jobname job (acct info), msglevel=(1,1),Notify=ABCDEF //* //JOBLIB DD DSN=MY.LIBRARY,DISP=SHR //PROCLIB JCLLIB ORDER=(Proc lib name) //* //STEP1 Exec TESTPROC, // COND.PS210(0,LE) //STEPLIB DD DSN=MY.LIBRARY,DISP=SHR //