IF-ELSE-ENDIF JCL top example you need

COND parameter is very important to control job steps in JCL.  The COND controls flow of  steps. You can control the steps execution in the JCL, in the in stream procedure, and in the cataloged procedure.

You can control execution of any step you want in JCL. This is advanced to COND by mixing of both if-else-endif.

Example:

//Myjob   JOB  (Acct),'me', CLASS=A,MSGCLASS=0, 
//                    MSGLEVEL=(1,1),NOTIFY=USERID
//Step1    EXEC    PROC1
//Cond1   IF  RC=0 THEN
//ESTEP1  EXEC   PROC2
//Cond2    ELSE
//ESTEP2  EXEC   PROC3
//               ENDIF
//*
Advertisements

Author: Srini

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