JCL- How to use COND with IF-ELSE-ENDIF

Cond parameter is very important in JCL.  COND controls the flow of  steps. We can do it in the JCL, in the in stream procedure, and in the catalogued procedure.

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.