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

HI,

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