More than one condition in COND in JCL.

JES2/3, JCL, utilities.
Post Reply
Ashish Mahrishi
New Member
Posts: 6
Joined: Thu Jun 12, 2014 10:17 am

More than one condition in COND in JCL.

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: More than one condition in COND in JCL.

Post by enrico-sorichetti »

lots of examples in your installation...
look for example at the compilation procedures
almost all of them handle multiple cond checks
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Chandan Yadav
Website Team
Website Team
Posts: 70
Joined: Wed Jul 31, 2013 10:19 pm

Re: More than one condition in COND in JCL.

Post 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
Ashish Mahrishi
New Member
Posts: 6
Joined: Thu Jun 12, 2014 10:17 am

Re: More than one condition in COND in JCL.

Post by Ashish Mahrishi »

Thanks for the link, chandanyadav.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”