Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : programming pearls - The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@mainframegurukul.com


condition codes

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> JCL
  View previous topic :: View next topic  
Author Message
love_vk1
Guest





PostPosted: Tue Mar 28, 2006 11:11 am    Post subject: condition codes Reply with quote

Condition codes Refer :
http://www.mainframegurukul.com/srcsinc/drona/programming/languages/jcl/jcl.chapter5.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
Back to top

bharghava_vamsi
Member


Joined: 28 Mar 2006
Posts: 2

PostPosted: Tue Mar 28, 2006 2:07 pm    Post subject: Condition code Reply with quote

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.
Back to top
View user's profile Send private message
love_vk1
Guest





PostPosted: Tue Mar 28, 2006 2:50 pm    Post subject: Re: Condition code Reply with quote

hi

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

it doesnot satisfy condition 1 ie



1. if step1 abends step3 should not execute
Back to top
arrbee
Active Member


Joined: 24 Feb 2006
Posts: 147

PostPosted: Tue Mar 28, 2006 4:17 pm    Post subject: Reply with quote

Quote:

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)
Back to top
View user's profile Send private message Send e-mail
love_vk1
Guest





PostPosted: Mon Apr 03, 2006 2:28 pm    Post subject: condition codes Reply with quote

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
Back to top
Guest






PostPosted: Thu Apr 06, 2006 5:17 am    Post subject: Reply with quote

Hi,

you can try coding "only" option instead of "even" on the cond condition.
Back to top
pradeepkumar
Member


Joined: 08 May 2006
Posts: 1

PostPosted: Mon May 08, 2006 3:56 pm    Post subject: Reply with quote

i think this is Sufficient.

//step3 .....,cond=(0,ne,step01)
Back to top
View user's profile Send private message
Jai
Guest





PostPosted: Thu May 25, 2006 7:35 pm    Post subject: Reply with quote

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)
Back to top
white-shadow
Member


Joined: 30 Jun 2010
Posts: 7

PostPosted: Wed Jun 30, 2010 10:22 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 901
Location: Mumbai, India

PostPosted: Thu Jul 01, 2010 1:53 pm    Post subject: Reply with quote

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 Smile
_________________
Anuj


//MYWALLET EXEC PGM=SPOUSE
//SYSIN DD DSN=MYWALLET.ALL,DISP=SHR
//SYSOUT DD DUMMY
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> JCL All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts two reports to compare , both different format - URGENT 1 ar3 1493 Wed Jul 15, 2009 7:57 pm
Frank Yaeger View latest post
No new posts If both the JOBCAT & STEPCAT statements are coded in a s 1 Krishna 2095 Tue May 12, 2009 6:43 pm
Krishna View latest post
No new posts Commit both in DB2 and MQ 3 jackie 2824 Fri Jul 27, 2007 3:52 pm
dbzTHEdinosauer View latest post
No new posts How to use both lower and upper case letters in cobol? 1 Divya 4885 Fri Mar 09, 2007 10:27 pm
Veera View latest post
No new posts Stop Run in both called and calling programs !!! 2 arrbee 4480 Fri Mar 10, 2006 12:13 pm
jaydeeppal View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB