condition codes

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
love_vk1

condition codes

Post by love_vk1 » Tue Mar 28, 2006 11:11 am

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

User avatar
bharghava_vamsi
Member
Posts: 2
Joined: Tue Mar 28, 2006 12:31 pm

Condition code

Post by bharghava_vamsi » Tue Mar 28, 2006 2:07 pm

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.

love_vk1

Re: Condition code

Post by love_vk1 » Tue Mar 28, 2006 2:50 pm

hi

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

it doesnot satisfy condition 1 ie



1. if step1 abends step3 should not execute

User avatar
arrbee
Active Member
Posts: 144
Joined: Fri Feb 24, 2006 11:33 am

Post by arrbee » Tue Mar 28, 2006 4:17 pm

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.
Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)

love_vk1

condition codes

Post by love_vk1 » Mon Apr 03, 2006 2:28 pm

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

Guest

Post by Guest » Thu Apr 06, 2006 5:17 am

Hi,

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

pradeepkumar
Member
Posts: 1
Joined: Mon May 08, 2006 3:23 pm

Post by pradeepkumar » Mon May 08, 2006 3:56 pm

i think this is Sufficient.

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

Jai

Post by Jai » Thu May 25, 2006 7:35 pm

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)

white-shadow
Member
Posts: 7
Joined: Wed Jun 30, 2010 10:14 pm

Post by white-shadow » Wed Jun 30, 2010 10:22 pm

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

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Thu Jul 01, 2010 1:53 pm

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 :)
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others