Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Check the condition of two different steps

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Mon May 31, 2010 7:27 pm    Post subject: Check the condition of two different steps
Reply with quote

Is it possible to ceck the condition of two different steps using COND CODE option

Example, i need to execute step 6 only if step 2 and step 4 have a
RC of "04", if eitheir one returns 0 then the step should not execute.


i know it can acieved using IF - ENDIF optin , i want to know if its achivable through COND CODE option.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Mon May 31, 2010 7:46 pm    Post subject:
Reply with quote

What does the manual (link at the top of the page) tell you?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon May 31, 2010 7:54 pm    Post subject:
Reply with quote

answer to your question: yes


how?
untested
nor
verified


Code:

//STEP06   EXEC PGM=??
//              COND=(4,NE,STEP02),(4,NE,STEP04))
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Tue Jun 01, 2010 1:07 am    Post subject:
Reply with quote

dbzTHEdinosauer thanks for the reply , but i belive the code above

works like an OR condition , what i need is an AND condition. ie the step should execute only if both the prior steps gave a RC 04.


Robert Sample , yes i went through the manual , i saw only the code mentioned here , i couldnt find a reference where a logical AND could be implemented

Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Tue Jun 01, 2010 1:24 am    Post subject:
Reply with quote

You probably couldn't find any references to AND conditions in the manuals because condition code testing doesn't support AND conditions, only OR conditions. In other words, as the manual says, you can check conditions for multiple steps but only for an OR condition. Your original problem statement did NOT mention whether you wanted AND or OR logic.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jun 01, 2010 4:33 am    Post subject:
Reply with quote

Hi,

I see nothing wrong with Dick's answer,

my tests reveal when

STEP2 returns a 0 and STEP4 returns a 0, STEP6 will flush

STEP2 returns a 0 and STEP4 returns a 4, STEP6 will flush

STEP2 returns a 4 and STEP4 returns a 0, STEP6 will flush

STEP2 returns a 4 and STEP4 returns a 4, STEP6 will run.


Gerry
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 236
Location: Cincinnati OH USA

PostPosted: Tue Jun 01, 2010 5:09 am    Post subject:
Reply with quote

NERTS -- aNy(E) aRe True Skip this step

old programmers memory aid
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 01, 2010 5:21 am    Post subject:
Reply with quote

cvishu,
you make a habit of asking questions about basic concepts
and then when you receive a solution,
you make a stupid remark - which shows that you have made no attempt to understand COND on an EXEC statement.

DAVE, thx for the reminder of NERTS - that is the way I learned.

cvishu,
if you forget about all your silly logic and just remember
if anything is true, skip the step.
That is why i used the NE 4,
which obviously was not noticed.
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Tue Jun 01, 2010 11:44 am    Post subject:
Reply with quote

Robert , i had clearly put in my query tat i want to check an and condition
cvishu wrote:

execute step 6 only if step 2 and step 4 have a
RC of "04", if eitheir one returns 0 then the step should not execute.



dbzTHEdinosauer , i appreciate your efforts in helping out noobs , but a politer way of responding would be great , You may have 10-15 years of experience in mainframes and me just 2+ years , trust me when i have spent the same amount of years as u had i will definitely stop my STUPID remarks and questions.

i don't want to engage in an argument here, but stop being rude , and i sincerely thank the time and effort people put here in responding to queries .
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 01, 2010 4:23 pm    Post subject:
Reply with quote

cvishu,

and it is not the questions, it is the response to the solutions.
it is one thing to ask a question about basics,
it is another to say that the provided solution is incorrect
when you obviously don't know jack.

you showed no respect for my effort to provide a solution.
why should I show you any respect.

learn your skills,
and you know where you can stuff this
DON'T BE RUDE
BS.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 236
Location: Cincinnati OH USA

PostPosted: Wed Jun 02, 2010 4:54 am    Post subject:
Reply with quote

I like a good old fashioned NY style discussion!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jun 02, 2010 5:05 am    Post subject:
Reply with quote

Quote:
I like a good old fashioned NY style discussion!


I don't. That was one of the reasons I left New York (Brooklyn/Bronx) for California.

cvis,

I would suggest you try out posted solutions rather than assuming they won't work. That way, if they do work, you'll know it and if they don't work, you'll be on solid ground when you say so.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us