Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

monitor prod jobs and send mail if any job abends

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Anu Vijayaraghavan

New User


Joined: 13 Feb 2008
Posts: 16
Location: Chennai

PostPosted: Fri Oct 30, 2009 1:34 pm    Post subject: monitor prod jobs and send mail if any job abends
Reply with quote

Hi,
I have a requirement as follows:
In production once a job gets executed it is removed from the spool and placed in a single repository (SAR - CA-View 11.0 ).
Users can view teh job log using SAR by giving the job name.
Now i need to monitor the SAR and send out a mail if any job gives a non-zero return code.

is there a way i can access the data in SAR through REXX

I already have a REXX code to send emails. But I'm not able to fetch the data from SAR
Code:
CA-View SARO -------------- Sysout Selection List ------------- ALREADY ON DISK
Command ===>                                                  Scroll ===> CSR 
                                                                               
Sel  Sysout ID    Jobname  Jobid    Arch Date  Time  Loc    Lines  Pages Xcode
==>  FxxxDX       *        *        *          *     *    *       *      *     
     FxxxDX       FxxxDX   JOB06886 10/28/2009 23:49 PERM    3159     26       
     FxxxDX       FxxxDX   JOB17753 10/28/2009 01:30 PERM    2465     20       
     FxxxDX       FxxxDX   JOB17246 10/28/2009 00:05 PERM    1603     10 U0046
     FxxxDX       FxxxDX   JOB09403 10/27/2009 00:03 PERM    3590     29       
     FxxxDX       FxxxDX   JOB11973 10/24/2009 01:00 PERM    3159     26       
     FxxxDX       FxxxDX   JOB03071 10/23/2009 00:15 PERM    3160     26       
     
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Oct 30, 2009 1:48 pm    Post subject: Reply to: monitor prod jobs and send mail if any job abends
Reply with quote

Quote:
Now i need to monitor the SAR and send out a mail if any job gives a non-zero return code.


the proper way to do it is to let the scheduler do it( it would manage also the abends)
ask Your support about it
or insert as last step a step to send the email if the preceding steps give an unwanted return code
Back to top
View user's profile Send private message
Anu Vijayaraghavan

New User


Joined: 13 Feb 2008
Posts: 16
Location: Chennai

PostPosted: Fri Oct 30, 2009 2:00 pm    Post subject: Reply to: monitor prod jobs and send mail if any job abends
Reply with quote

as you said the scheduler can manage it. But we in the support team dont have the luxury to make any such requests. If we want to monitor and email we need to write own REXX codes icon_sad.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Oct 30, 2009 2:13 pm    Post subject:
Reply with quote

Then I suggest that you speak to your manager and ask why you must spend a whole load of hours reinventing the wheel when the capability to do as you want already exists.

If your manager has any brains he will get the said request actioned fast.
Back to top
View user's profile Send private message
Anu Vijayaraghavan

New User


Joined: 13 Feb 2008
Posts: 16
Location: Chennai

PostPosted: Fri Oct 30, 2009 2:22 pm    Post subject:
Reply with quote

the situations is simple. We are supporting a system of another company and they were not ready to give us access to modify the scheduler. So we need to write a REXX code to do it
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Oct 30, 2009 3:23 pm    Post subject: Reply to: monitor prod jobs and send mail if any job abends
Reply with quote

it' s amazing how much time is lost in solving issues due to poor understanding of the most common IT basics

the easiest solution is
insert as last step a step to send the email if the preceding steps give an unwanted return code

Quote:
We are supporting a system of another company


and I suppose You company is getting money out of it
why should we give free consultancy to a company
making it to earn money out of solutions it got at no cost ??

even possibly a competitor for our own services


I made a post some times ago about supporting inside people VS supporting contactors and similar
Back to top
View user's profile Send private message
Anu Vijayaraghavan

New User


Joined: 13 Feb 2008
Posts: 16
Location: Chennai

PostPosted: Fri Oct 30, 2009 3:46 pm    Post subject: Reply to: monitor prod jobs and send mail if any job abends
Reply with quote

what we felt is instead of keeping on asking them and getting a "NO" from them, we can instead write a REXX procedure.. any help in doing that will be really appreciated..
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Fri Oct 30, 2009 4:10 pm    Post subject:
Reply with quote

expat wrote:
If your manager has any brains he will get the said request actioned fast.


Managers do not have brains, especially here in Belgium, and more specific if they work for the NVSM/UNMS.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Oct 30, 2009 4:17 pm    Post subject: Reply to: monitor prod jobs and send mail if any job abends
Reply with quote

Quote:
any help in doing that will be really appreciated..


did You read my previous post ???

normally when asking for help the assumption is that somebody will reply
based on sound experience and best practices...

insisting on getting thing done the way You want ( for any reason )
and pretending to have people spend time designing something specific for Your way of doing things...
is a bit too much of a pretence !

you want to write something in REXX... go ahead, but do not expect ad hoc help
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 9:31 am    Post subject:
Reply with quote

Anu, I have implemented the test job to extract abended job from the sar that have return code other than 0 and 1 and a report is created of the details of the job like jobname,jobid,date,time,abend code and finally the report is sent to the recipients in a single job submit.

The jobs are selected on the basis of batch trial like GENERATION 0 for current trial GENERATION -1 for previous trial etc...


Thanks,
Mukesh.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Nov 05, 2009 11:23 am    Post subject:
Reply with quote

typo error : jobs with return code greater than 4 are populated in the report.
Back to top
View user's profile Send private message
srloui

New User


Joined: 06 Jan 2009
Posts: 2
Location: Chennai

PostPosted: Mon Sep 27, 2010 5:36 pm    Post subject: Reply to: monitor prod jobs and send mail if any job abends
Reply with quote

Mukesh, please give the test extract JCL/Job you have did.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Sep 27, 2010 5:41 pm    Post subject: Reply to: monitor prod jobs and send mail if any job abends
Reply with quote

it is inappropriate to ask for code..
in general employment contracts enforce that any work produced on the employer time and equipment belong to the employer
that' s why Your previous post was deleted
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm
No new posts Don't allow CICS to submit batch jobs prino JCL & VSAM 5 Mon Jul 25, 2016 3:26 pm
No new posts Send parameter for macro STIMERM from... Daniel Teolotitla PL/I & Assembler 13 Tue Jul 05, 2016 9:23 pm
No new posts Predicting jobs which are about to re... kpanchabhai85 DFSORT/ICETOOL 4 Thu Jun 30, 2016 7:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us