MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JCL cond

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
djf
Beginner


Joined: 06 Feb 2007
Posts: 68
Topics: 27

PostPosted: Thu Dec 06, 2007 11:03 am    Post subject: JCL cond Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 06, 2007 11:22 am    Post subject: Reply with quote

djf,

Not equal to RC0, does that mean abend ? If you mean abend then you can use EVEN or ONLY depending on how you want to execute the Step.

Check this link for an explanation of EVEN and ONLY parms.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/16.5.2

Check this link for a summary of COND parameters

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/16.5.7

Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
djf
Beginner


Joined: 06 Feb 2007
Posts: 68
Topics: 27

PostPosted: Thu Dec 06, 2007 11:47 am    Post subject: Reply with quote

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
View user's profile Send private message
djf
Beginner


Joined: 06 Feb 2007
Posts: 68
Topics: 27

PostPosted: Thu Dec 06, 2007 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Thu Dec 06, 2007 12:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 06, 2007 12:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
djf
Beginner


Joined: 06 Feb 2007
Posts: 68
Topics: 27

PostPosted: Thu Dec 06, 2007 12:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
djf
Beginner


Joined: 06 Feb 2007
Posts: 68
Topics: 27

PostPosted: Thu Dec 06, 2007 1:26 pm    Post subject: Reply with quote

Yay!

Easily done with IF/THEN/ELSE
Code:

//TEST IF RC > 4 THEN
//ALERT  EXEC WARNPROC
//  ENDIF
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Fri Dec 07, 2007 3:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group