Page 1 of 1

condition codes

Posted: Tue Mar 28, 2006 11:11 am
by love_vk1
Condition codes Refer :
http://www.mainframegurukul.com/srcsinc ... pter5.html

----------- Above added by Krishna

Hi,

There are 3 steps in my JCL
say
step1
step2
step3

what condition code should I use in step 3 to cater following requirements:

1. if step1 abends step3 should not execute
2. if step1 executes properly and step2 abends then step3 should execute.
3. if step1 and step2 both executes properly then step3 should also execute.

plz reply me asap

thanks

Condition code

Posted: Tue Mar 28, 2006 2:07 pm
by bharghava_vamsi
Hai,

Try this and see if this works. Inform if it doesn't.

//step1 exec....
//step2 exec...
//step3 exec pgm=...,cond=(0,NE,step1),even

The step3 will execute only if step1 is successfully executed. The step3 executes even if step2 is abended and we specify it using 'even'. Hope this answers your query.

Re: Condition code

Posted: Tue Mar 28, 2006 2:50 pm
by love_vk1
hi

cond=(0,NE,step1),even is not working

it doesnot satisfy condition 1 ie



1. if step1 abends step3 should not execute

Posted: Tue Mar 28, 2006 4:17 pm
by arrbee
1. if step1 abends step3 should not execute
2. if step1 executes properly and step2 abends then step3 should execute.
3. if step1 and step2 both executes properly then step3 should also execute.
I think the 2nd and 3rd points are contradicting with each other. Because you are looking for success and unsuccess on step2.

condition codes

Posted: Mon Apr 03, 2006 2:28 pm
by love_vk1
step 2 and step 3 are not contradictory........

ok let me rephrase my question:
It doesn't matters whether step2 runs or not, step3 should run if step1 had run successfully.

I hope this will create my question bit clear to u guys.

Thanks

Posted: Thu Apr 06, 2006 5:17 am
by Guest
Hi,

you can try coding "only" option instead of "even" on the cond condition.

Posted: Mon May 08, 2006 3:56 pm
by pradeepkumar
i think this is Sufficient.

//step3 .....,cond=(0,ne,step01)

Posted: Thu May 25, 2006 7:35 pm
by Jai
You didn't mention if step2 should execute when step1 abends.

if step2 shouldn't execute when step1 abends, its simple....

step1
step2 exec=pgm,cond=(0,ne)
step3 exec=pgm,cond=even

if step2 should execute when step1 abends,

step1
step2 exec=pgm,cond=even
step3 exec=pgm,cond=(0,ne,step1)

Posted: Wed Jun 30, 2010 10:22 pm
by white-shadow
may it works
step3 exec cond=((eq,16,step1),(gt,4,step1),even)
i m a beginer so i cant sure it. but i think it will work

Posted: Thu Jul 01, 2010 1:53 pm
by Anuj Dhawan
You've replied to a 4-years old post - I'd suggest, you'll rather enjoy the Forum if you participate in "current topics".

Good Luck :)