Page 1 of 1

TWS - trigger on job failed

PostPosted: Thu Sep 27, 2012 9:11 pm
by dlangmeyer
I would like to set up a second level job to run only if the first level job fails

If job A is successful - trigger job B, otherwise trigger job C

Re: TWS - trigger on job failed

PostPosted: Thu Sep 27, 2012 9:40 pm
by enrico-sorichetti
nice to hear about Your plans :geek:

but what looking Yourself at the tws manuals

Automatic Recovery and Restart

Tivoli Workload Scheduler for z/OS provides automatic restart facilities for your production work. You can specify the restart actions to be taken if work initiated by Tivoli Workload Scheduler for z/OS ends in error (see Figure 3.) You can use these functions to predefine automatic error-recovery and restart actions for jobs and started tasks. The scheduler's integration with the NetView program allows it to automatically pass alerts to the NetView program in error situations. Use of z/OS's cross-system coupling facility (XCF) enables Tivoli Workload Scheduler for z/OS to maintain production workload to maintain production workload processing when system failures occur.

Recovery of jobs and started tasks. Automatic recovery actions for failed jobs are specified in user-defined control statements. Parameters in these statements determine the recovery actions to be taken when a job or started task ends in error.


and ask again if something is not clear ?

Re: TWS - trigger on job failed

PostPosted: Thu Sep 27, 2012 9:54 pm
by dlangmeyer
I was trying to avoid the use of NetView - handling this within the scheduler itself.
I found your reference and a couple others where NetView captures the failure and takes action.

Thanks so much, looks like I go to plan B and get the application owner to code better JCL.

Re: TWS - trigger on job failed

PostPosted: Thu Sep 27, 2012 10:07 pm
by enrico-sorichetti
Automatic recovery actions for failed jobs are specified in user-defined control statements.

no need for Netview... everything is handled by TWS

see for example
http://publibz.boulder.ibm.com/cgi-bin/ ... 9#HDRREC10

but why not talk to Your operations support

to setup the operations <network> for success and <failure> is one of the first standards and practices usually implemented when using automation

JOB == OPERATION

the TWS automatically will handle the SUCCESSOR for <success> and the SUCCESSOR for <failure>
( if told with sweet words )

a <failure> can be defined as anything ( might not be a failure in strict sense )

just some event that TWS uses to determine the SUCCESSOR

for example
if <some step> ends with RC 0 then the successor should be JOBX
if <some step> ends with RC x then the successor should be JOBzzz
if <some step> ends with RC y then the successor should be JOBkkk

Re: TWS - trigger on job failed

PostPosted: Thu Sep 27, 2012 10:23 pm
by dlangmeyer
It is making sense now - This looks like exactly what I want.
I will meet with operation support -

Re: TWS - trigger on job failed

PostPosted: Fri Sep 28, 2012 2:52 am
by NicC
I will meet with operation support
with whom you should have met before ever posting or googling or whatever.

Re: TWS - trigger on job failed

PostPosted: Mon Oct 01, 2012 11:16 pm
by dlangmeyer
@NicC
This is a new product and I am trying to help the operation support.
They will have to work with IBM support, so after looking at manuals, I turned to google, then the forum.
I thought that was what these forums were for, anyway.

Sorry to have offended you, but as you were not involved in any of the actual solution, I guess I can do without your support in the future.

Re: TWS - trigger on job failed

PostPosted: Mon Oct 01, 2012 11:26 pm
by enrico-sorichetti
... as you were not involved in any of the actual solution, I guess I can do without your support in the future.

and, we do not even have the need to guess :geek: , we are sure that <we> can do without You asking for it either

Re: TWS - trigger on job failed

PostPosted: Tue Oct 02, 2012 1:57 am
by NicC
What is a new product? TWS new in your company? Fine - the ops support people should have been sent on training courses where such an 'alternative path' facility would surely have been discussed if only briefly.

Re: TWS - trigger on job failed

PostPosted: Tue Oct 02, 2012 7:34 pm
by dick scherrer
Hello,

I thought that was what these forums were for, anyway.
Yes, this is part of why we are here.

but as you were not involved in any of the actual solution, I guess I can do without your support in the future.

Probably no value added by posting this. You may have relieved a bit of frustration, but added no value to the topic.

Often (very often) when i read something that tightens my jaw, i type a reply (in notepad) and then later, if i believe it actually has merit, i Submit it. This (to me) lets me "say" what was on my mind without the need to stir the septic tank . . .