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

monitor prod jobs and send mail if any job abends


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Oct 30, 2009 1:48 pm
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
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: 8796
Location: Welsh Wales

PostPosted: Fri Oct 30, 2009 2:13 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Oct 30, 2009 3:23 pm
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
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

Senior Member


Joined: 07 Feb 2009
Posts: 1314
Location: Vilnius, Lithuania

PostPosted: Fri Oct 30, 2009 4:10 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Oct 30, 2009 4:17 pm
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
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
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: 3
Location: Chennai

PostPosted: Mon Sep 27, 2010 5:36 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Mon Sep 27, 2010 5:41 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to turn off 'ACTION' SDSF output ... TSO/ISPF 2
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
Search our Forums:

Back to Top