IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Cond Parameter COND=(4,LT)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Wed Jan 14, 2004 9:22 pm
Reply with quote

I had a doubt on cond parameter.I was totally confused on that.

1.If I code cond=(4,lt) whether it checks previous step's rc less than 4 or 4 less than rc.

My idea is it will check if 4 is less than previous step's rc condition is false.So it has to execute that particular step.Please clarify me which is correct.


2.My another doubt is if iam coding cond=(4,lt) in step4 and step2's rc is 8 and step3's rc is 0 whether step4 will execute r not.Please justify the reason.What exactly my doubt is whether cond parameter checks only just above step or it will consider all above step's rc's.

3.Also please explain me about cond=even and cond=only.

According to me if I code cond=even that particular step should be executed even any of the previous steps gets abended.People here are saying that it will check only previous step not all the previous steps rc's

So please anyone clarify all this doubts asap.Also tell me something about cond=even and how this cond parms differ in coding in job step and step statement.

So someone please clarify this and I want to get out of my confusion asap.


THANKS AND REGARDS
ANURADHA icon_confused.gif
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Jan 15, 2004 5:15 am
Reply with quote

Hi ANURADHA,

To understand the COND param you have to think backwards, not much of a stretch for me. icon_smile.gif

I find the best way to read a COND stmt is as follows:

COND=(4,LT) read it as follows:

If 4 is less than any condition code issued so far, DON'T execute this step.

If the COND stmt was COND=(8,GE,STEP2), read it as follows:

If 8 is greater than or equal to the condition code issued in STEP2, DON'T execute this step.

COND EVEN means execute this step EVEN if any previous step abends.
COND ONLY means execute this step ONLY if any previous step abends.

ONLY/EVEN has nothing to do with RCs only abends. However, they can be combined with RC tests in the same COND stmt. For example:

COND=((8,GE,STEP2),EVEN)

The difference between Job and Step COND is covered in the manual.

Regards, Jack.
Back to top
View user's profile Send private message
bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Thu Feb 05, 2004 11:31 pm
Reply with quote

or the if condition is mucho more direct and simpler (for single step condition !!)
// IF (yourstepname.RC = 0) THEN
//stepx exec pgm=whatever
//sysout dd sysout=*
//sysprint dd sysout=*
// endif


in this case stepx will execute noly if yourstepname has returned 0

easy for single step... but several steps included in nested ifs can cause confusion..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Writing the output file name from a p... JCL & VSAM 7
Search our Forums:

Back to Top