Page 1 of 1

More than one condition in COND in JCL.

Posted: Mon Dec 22, 2014 4:37 pm
by Ashish Mahrishi
Hi

I need help in using the COND. One of the steps is coded like this :

Code: Select all

//STEP01  EXEC PGM=IKJEFT01,COND=(4,LT,FTP)
This statement in my JCL is used to execute the step STEP01 based on the return code of the previus step, FTP. If FTP returns less than 4 then I want to execute STEP01.

Now, I want to check for two conditions for the execution of step01. I would like to run STEP01 if the return code of the FTP step is either less than 4 OR equal to 1954 and changed the code like this, but it did not work:

Code: Select all

//STEP01 EXEC PGM=IKJEFT01,
//                        COND=((4,LT,FTP),(1954,EQ,FTP))
Can any body help me in handling this?

Re: More than one condition in COND in JCL.

Posted: Mon Dec 22, 2014 4:52 pm
by enrico-sorichetti
lots of examples in your installation...
look for example at the compilation procedures
almost all of them handle multiple cond checks

Re: More than one condition in COND in JCL.

Posted: Mon Dec 22, 2014 6:55 pm
by Chandan Yadav
Hi,

I would say to check with basics of COND parameter. Step will be bypassed if any of the conditions becomes true.

As per the manual
Use the COND parameter to test return codes from previous job steps and determine whether to bypass this job step. You can specify one or more tests on the COND parameter, and you can test return codes from particular job steps or from every job step that has completed processing. If any of the test conditions are satisfied, the system evaluates the COND parameter as true and bypasses the job step. If none of the test conditions specified on the COND parameter are satisfied, the system evaluates the COND parameter as false and executes the job step.
Please refer below link

http://publibz.boulder.ibm.com/cgi-bin/ ... 0713232151

Reagards,
Chandan

Re: More than one condition in COND in JCL.

Posted: Sun Dec 28, 2014 6:20 pm
by Ashish Mahrishi
Thanks for the link, chandanyadav.