Page 1 of 1

Generate an email in JCL automatically.

Posted: Fri Mar 24, 2017 2:58 pm
by Prakash Jha
Hi,

Can someone please tell me how can we send an email using a JCL automatically, in case job is not completed on time and it has missed the SLA. In doing so I need to fetch the job completion time? I was not sure about the answer, how can we do it, please help on this.

Re: Generate an email in JCL automatically.

Posted: Fri Mar 24, 2017 3:09 pm
by nicc
I am sure the answer is already in the forum - did you search?

Re: Generate an email in JCL automatically.

Posted: Fri Mar 24, 2017 3:16 pm
by enrico-sorichetti
and Your operations support should know how to have Your scheduler do it

Re: Generate an email in JCL automatically.

Posted: Fri Mar 24, 2017 3:54 pm
by nicc
Enrico, interview question. He may not have an Ops Support group to speak to.

Re: Generate an email in JCL automatically.

Posted: Fri Mar 24, 2017 4:11 pm
by enrico-sorichetti
:oops:

still

the forum will tell how to write a step to send an email

but
in case job is not completed on time and it has missed the SLA.
it will be difficult to find out with a simple jcl step

if I were the interviewer
the answer
" I would speak to operations support to find the capabilities of the job scheduler"
would have got many many more quality points

Re: Generate an email in JCL automatically.

Posted: Mon Mar 27, 2017 2:52 pm
by Prakash Jha
Yes I also told about using IEBGENER steo to send the email but I was not sure how to capture the completion time of the job. Thanks for the answer that the scheduler should be able to help in this.

Re: Generate an email in JCL automatically.

Posted: Mon Mar 27, 2017 3:56 pm
by Robert Sample
Available starting in z/OS 2.3 will be the // NOTIFY JCL statement which will send job status to an email address. It won't help with SLA, of course, since an SLA is not fixed but depends upon the contract.