View previous topic :: View next topic |
Author |
Message |
djf Beginner
Joined: 06 Feb 2007 Posts: 68 Topics: 27
|
Posted: Thu Dec 06, 2007 11:03 am Post subject: JCL cond |
|
|
Hello.
What is the COND parm to execute a step if ANY of the previous steps did not get an RC0?
I googled it and the more hits I look at, the more confused I get. In this case, I really am a beginner! (Sysprog since MVS SP 1.3!!!) |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
djf Beginner
Joined: 06 Feb 2007 Posts: 68 Topics: 27
|
Posted: Thu Dec 06, 2007 11:47 am Post subject: |
|
|
Greetings.
I am not sure that reading anymore on the subject will help me at all, I am totally confused, it is bass ackwards.
I meant exactly what I said - a simple cond that will cause the step to be executed IF ANY PREVIOUS STEP DID NOT GET A ZERO RC.
(Don't take this personal, but I am still unhappy that IBM forced us to use DFSORT with DB2V8. They should have just made it a Co-req FMID. It caused me alot of grief!!)
It is time IBM replaces (or adds) to the COND idea a simple idea of instead of the COND keyword, a keyword of DO or DONTDO.
Something that makes sense. |
|
Back to top |
|
 |
djf Beginner
Joined: 06 Feb 2007 Posts: 68 Topics: 27
|
Posted: Thu Dec 06, 2007 11:58 am Post subject: |
|
|
Allright, I looked at the second reference and now am more confused, because I thought a COND was a COND and always a COND. But now it seems that sometimes a COND is not really a COND if there is or is not an ABEND.....
ARRRRRGHHHH!!!!
So rather than try to figure it out from the doc, here is the situation.
I have multiple jobs that each have multiple steps in them doing DFD/SS pack backups.
I just want to run a single step at the end of each job if anything failed. (RC>4)
Simple problem, and I shouldn't have to have a PHD in COND to do it. |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Thu Dec 06, 2007 12:13 pm Post subject: |
|
|
There have been changes. See IF/THEN/ELSE conditional JCL statements.
The key is that when the COND is TRUE, the step is NOT RUN (bass ackwards? YES!).
So, COND=(4,GT) on the final step means that any earlier step with COND CODE 4 would make the test false so the step runs. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Dec 06, 2007 12:25 pm Post subject: |
|
|
Bill Dennis wrote: | There have been changes. See IF/THEN/ELSE conditional JCL statements.
The key is that when the COND is TRUE, the step is NOT RUN (bass ackwards? YES!).
So, COND=(4,GT) on the final step means that any earlier step with COND CODE 4 would make the test false so the step runs. |
Biil,
Correct me if I am wrong , but AFAIK When the COND parameter does not name a previous step, the system tests ALL previous steps. If any test is satisfied, the system bypasses the current step. so if the first step had RC0 and the second step had RC8, the final step would NOT execute as one of the step satisfied the condition.
Djf, I guess you have to use IFTHEN ELSE construct instead of COND parm _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
djf Beginner
Joined: 06 Feb 2007 Posts: 68 Topics: 27
|
Posted: Thu Dec 06, 2007 12:42 pm Post subject: |
|
|
Guys,
My brain is rapidly turning into something resembling cottage cheese, I don't know if I even dare the depths of IF-THEN-ELSE.
Something is wrong with the constructs and facilities when it would be easier to write an IEFACTRT exit to do what you need, btw, been there, done that.
Guess I'll reboot and think about it later. Got a week to get the stuff in place. (this is part of an automation project I am working on and will be used to alert a remote site about failures at the main site)
Thanks. |
|
Back to top |
|
 |
djf Beginner
Joined: 06 Feb 2007 Posts: 68 Topics: 27
|
Posted: Thu Dec 06, 2007 1:26 pm Post subject: |
|
|
Yay!
Easily done with IF/THEN/ELSE
Code: |
//TEST IF RC > 4 THEN
//ALERT EXEC WARNPROC
// ENDIF |
|
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Fri Dec 07, 2007 3:12 pm Post subject: |
|
|
You're correct kolusu. Any step with with COND CODE 0 makes my solution fail.
A COND=(0,LT) could be added to the JOB card and the job would flush at the first non-zero step but dtf wants a step to execute. His chosen IF/THEN solution works best. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
|
|