Page 1 of 1

Triggering of emails on below scenarios

PostPosted: Thu Aug 15, 2013 11:31 am
by jatin_compsci
Hi All,

I need to trigger the automatic notifications emails on the below scenarios to the users -

1. When the job not started in time
2. When the job running for long time than the usual completion time
3. When the job abend


It would be great if you guys could please help me in achieving the same.

Re: Triggering of emails on below scenarios

PostPosted: Thu Aug 15, 2013 1:20 pm
by Blackthorn
What scheduler do you have?

Re: Triggering of emails on below scenarios

PostPosted: Thu Aug 15, 2013 2:19 pm
by jatin_compsci
Hi,

There is a seperate scheduling team using OPC scheduler.

Re: Triggering of emails on below scenarios

PostPosted: Thu Aug 15, 2013 2:43 pm
by Blackthorn
TWS does not have any inbuilt ability to send e-mails, but you can use your automation software to trap the messages that are issued.

For your first requirement (late starting), message EQQE037I is issued if a job has not started by it’s Latest Start Time. This can then be used to trigger an e-mail to your users. Obviously both durations and deadlines need to be accurate for this to be meaningful.

For your second requirement (job running longer than normal), message EQQE038I is issued. Obviously in order for this to be meaningful an accurate duration has to be in defined in TWS. Check the Missed Feedback Report from the daily planning process and review the Limit for Feedback and Smoothing Factor parameters. Bear in mind that the Feedback Limit will also influence when the message is issued in relation to the planned duration.

For the third requirement, message EQQE036I is issued whenever a job fails.

Alternatively use a third party product such as TWSemon from APS Enterprise. If you already have this or something similar, then this is the obvious way to go. It will do all of this easily and send the e-mail for you.

Re: Triggering of emails on below scenarios

PostPosted: Thu Aug 15, 2013 4:41 pm
by jatin_compsci
Hi Blackthorn,

Thanks for the quick reply, but how these messages EQQE037I ,EQQE038I will get issued. Are you talking in terms of Scheduler only?

Is there any method via JCL we can code the same functionality.

Re: Triggering of emails on below scenarios

PostPosted: Thu Aug 15, 2013 4:46 pm
by NicC
Is there any method via JCL we can code the same functionality

Yes - you can do almost anything via JCL - all you need are the programs and control data for those programs. But JCL will not do it for you direcgtly as it only telss the OS what programs you want run and what resources those programs require.

The EQQ messages come from OPC/TWS. Speak to your OPC/TWS people as to how to take advantage of them.

Re: Triggering of emails on below scenarios

PostPosted: Thu Aug 15, 2013 4:49 pm
by Blackthorn
Well, I guess for a job failure you could have a COND=ONLY step coded to send the e-mail, but I don't see what you could do with the other two requirements.

How can some JCL be used to send an e-mail if the job is late starting? You'd have to schedule another job to run at the "late" time to check if your job had started/completed.

The only practial way I can see of doing it it to interface with your scheduler in some way. Why are you averse to this idea?

Re: Triggering of emails on below scenarios

PostPosted: Thu Aug 15, 2013 5:02 pm
by Robert Sample
What you want to do REQUIRES some form of job scheduler -- period. What you want to do CANNOT be done using just JCL. There is no facility, for example, in z/OS or JES to determine that a job did not start in time (your first requirement) -- this can only be determined by a job scheduler. You need to work with your site scheduling people to achieve what you want. Or, you can accept that what you want to do is not possible under the conditions you are imposing, and go on to some other work.

Topic locked to prevent further waste of time.