IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Write a rexx tool which will monitor the job and email


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
praba_jas

New User


Joined: 01 Apr 2005
Posts: 11

PostPosted: Thu Jul 06, 2006 7:19 pm
Reply with quote

Hi All,

We have a set of around 50 jobs running daily. We are planning to automate the job monitoring job by writing a rexx tool which will monitor the job and if a job abends it will trigger a mail.

Can any one of you help me on this regard. Please send me if any sample code available

Regards,
Jasmine
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jul 06, 2006 7:22 pm
Reply with quote

Monitor the job how? By reading the job start (IEF403I), end (IEF404I) and abend (IEF450I) messages off the SSI?
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Jul 06, 2006 8:02 pm
Reply with quote

How about adding a step to each of the 50 jobs to send an e-mail in the event of an abend. The step could have a COND=ONLY parameter that would only execute should the preceeding step abnormally terminate.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jul 06, 2006 8:05 pm
Reply with quote

cpuhawg, that's the exact same question I ask our development folks whenever they ask for something like this. So far, their standard answer is that "they don't want to". Sigh.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Jul 06, 2006 8:50 pm
Reply with quote

I totally understand. A REXX program to monitor the start and ending of batch jobs would be extremely complex to write and would probably burn up more CPU than a more simplistic approach. In my experience, I tend to avoid using SMF because of the volume of records to scan through and the occasional loss of SMF data. Also, historical SMF is always migrated and requires recalling and live SMF (for the novice) is difficult to get to unless offloaded.

All we can do is provide various options based on our years of experience (having come from the days of using punched cards for JCL).
Back to top
View user's profile Send private message
praba_jas

New User


Joined: 01 Apr 2005
Posts: 11

PostPosted: Fri Jul 07, 2006 11:04 am
Reply with quote

Hi cpuhawg,

The idea for Adding a step to trigger mail in the job itself is not accepted
in our environment too.(donno the reason!!!!!)

Please let me know if there are any other alternate ways of doing it.

Thanks all of you for sparing your time.

Regards,
Jasmine
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jul 07, 2006 4:41 pm
Reply with quote

Getting back to my first question, how do you intend to monitor the jobs (with what tool or process or function)?
Back to top
View user's profile Send private message
praba_jas

New User


Joined: 01 Apr 2005
Posts: 11

PostPosted: Tue Jul 11, 2006 11:32 am
Reply with quote

Hi superk,

We monitor the job using SAR tool currently.

Thanks&Regards,
Jasmine
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jul 11, 2006 10:41 pm
Reply with quote

Does this SAR tool provide you with utilities that allow you to use REXX to interact with it?
Back to top
View user's profile Send private message
praba_jas

New User


Joined: 01 Apr 2005
Posts: 11

PostPosted: Mon Jul 17, 2006 6:29 pm
Reply with quote

NO. It doesnt provide any.

Regards,
Jasmine
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Jul 17, 2006 8:12 pm
Reply with quote

Well, normally I would think that you would want to use your console automation tools (Netview, AutoOperator, OPS/MVS, etc.) to handle the monitoring and alerting for you.

The only alternative I can think of is to use the two TSO commands, STATUS and OUTPUT, to track the status of known jobs and to retrieve the job messages from the spool.

TSO STATUS Command.

TSO OUTPUT Command.
Back to top
View user's profile Send private message
baidyanath_biswas

New User


Joined: 04 Sep 2006
Posts: 11

PostPosted: Mon Sep 04, 2006 3:34 pm
Reply with quote

we r also using SAR for getting job-run details,and need to send the end time of 13 sets of jobs. actually SAR is similar to spool,except that it stores the details of the job run for next 3 months. So we need to interact REXX with SAR. But the problem is after 1-2 days,the details go into tape storage from disk. so we ve to recall it again,that's a big problem..
So we want it to interact with CA7 where all job run details would be stored. Is there any database for job run in CA7 and can it be accessed using queries or REXX?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top