JCL: How to Skip Steps from Proc

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
//PROCLIB       JCLLIB ORDER=(Proc lib name)
//STEP1    Exec  TESTPROC,
//      COND.PS210(0,LE)

Related posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.