× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



An option we use quite often is to submit a second job using the scheduled
date and time to check on the first job.

You would need to know roughly how long the job will run for, then in the
CL that starts everything off retrieve the job details and submit a job
where the scheduled date and time are after the expected run time for the
job.

You will need to write a small program to receive the qualified job name
then you can check if that job is still active.

Something like;

RTVJOBA JOB(&JOB) USER(&USER) NBR(&NBR)
SBMJOB CMD(CALL PGM(CHKJOB) PARM(&JOB &USER &NBR)) SCDDATE(030915)
SCDTIME(110500NT)

Pgm ChkJob would do ...

pgm
CHGJOB JOB(&NBR/&USR/&JOB)
MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ENDPGM))
/* Job is still active - send some emails or whatever */
endpgm: endpgm




Don Brown




From: "Kevin Bucknum" <Kevin@xxxxxxxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Date: 03/09/2015 05:53 AM
Subject: RE: Send email on program halt
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



We do several things. We have a modified version of MONJOBMSGW running
that will send emails out for some jobs. We also have one off jobs that
get submitted from the jobs we want to monitor that use QUSRJOBI to
check the job every so often. JOBA submits JOBB and passes it the job
name, number, and user, and then JOBB loops around every so often
calling QUSRJOBI with JOBI0200 as the format. Check position 51 in the
returned data for *ACTIVE to make sure the job is still running. If it's
not, we end the monitor job. Check position 108 for MSGW (or whatever
other status you need to monitor for) and do what you need to do to
notify someone.

http://www.oocities.org/~alex_nubla/tips.htm



Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
James Rich
Sent: Wednesday, September 02, 2015 2:32 PM
To: midrange-l
Subject: Send email on program halt

We want to send an email if our nightly closing/backup stops on any kind
of error. I thought about monitoring for CPF0000 but I think that will
prevent the job from stopping with a MSGW. I still want the job to stop
with MSGW on the line where the error occurred, I just need some
facility to notice that a MSGW condition exists and send an email. Any
suggestions?

James Rich

if you want to understand why that is, there are many good books on the
design of operating systems. please pass them along to redmond when
you're done reading them :)
- Paul Davis on ardour-dev
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.