How to send auto notification when the job is completed



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: How to send auto notification when the job is completed

Postby enrico-sorichetti » Mon Mar 18, 2013 11:53 pm

it does, it does ...
just googling with ibm tws email alerts returned the links to the relevant manual pages
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: How to send auto notification when the job is completed

Postby Ed Goodman » Tue Mar 19, 2013 6:50 pm

To explain the return code checking...

The scheduler will watch the job to see when it finishes. It will then read through the output of the job and check all of the status/return codes. Based on the results of this scan, it can make decisions on what to do next. There are constantly running tasks that do all of this magic.

I don't know THAT scheduler exactly, but the three I've worked directly with all had the same basic set of capabilities in common.

You would add the condition checking and responses to the SCHEDULER's configuration. In my current shop, we run a prod version and a development version. We can set up our own schedules for test runs, but have to request changes to prod through official channels.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: How to send auto notification when the job is completed

Postby Ed Goodman » Tue Mar 19, 2013 7:02 pm

To expand just a little more, here's what I use now when I'm running test schedules:

I have about forty jobs in a given schedule. Each entry in the scheduler points to a single job to be submitted, so there forty entries.

Each entry has triggers that need to be set in order to start the job, these are called 'in-conditions'. Each entry can also SET triggers based on the outcome of the job. These are called 'out-conditions.' The normal process is to have a successful job completion set a trigger that says it completed ok. Then, for each entry, you add the triggers for any predecessor jobs that it should wait for.

So I have joba jobb and jobc, each one waiting for the prior job. the scheduler submits joba, waits for it to run, checks the output, and if it ended ok, sets the trigger for joba. That releases jobb to run, and so on.

In addition to that sequencing, I added another task to each entry. If the job completes, but the scheduler finds a problem suring its scan, I have the scheduler run an UNSCHEDULED job called badnews. Job badnews is a simple copy step that sends an email to my phone with the subject 'Something bad happened'.

The last job of the schedule is called goodnews, and it sends me the test 'Something good happened.' I added that after the test scheduler got taken off line one night, and I learned that no news is not always good news.

These users thanked the author Ed Goodman for the post (total 2):
jatin_compsci (Thu Aug 15, 2013 11:26 am) • Anuj Dhawan (Fri Mar 22, 2013 5:12 pm)
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post