|
Mike,
Create a data area for the job someplace. For example's sake, call it
ISJOBRUNNING
Then, in the job, allocate that data area exclusively.
ALCOBJ ISJOBRUNNING *DTAARA *EXCL WAIT(0)
MONMSG CPFxxxx EXEC(DO) /* Whatever the escape msg for "unable to allocate"
is */
/* What to do if the job is ALREADY running??? */
ENDDO
Then, in the monitor job a loop:
Again:
ALCOBJ ISJOBRUNNING *DTAARA *EXCL WAIT(0)
MONMSG CPFxxxx EXEC(DO) /* Whatever the escape msg for "unable to allocate"
is */
GOTO Again
ENDDO
DLCOBJ ISJOBRUNNING *DTAARA *EXCL
/* Now do what ever you need to do when the job is NOT running */
GOTO Again /* Start watching all over again */
Since I don't have access to a /400 at the moment, there are probably syntax
errors and stuff, but you should get the idea.
Bob
-----Original Message-----
From: midrange-l-admin@midrange.com [mailto:midrange-l-admin@midrange.com]On
Behalf Of Wills, Mike N. (TC)
Sent: Friday, October 25, 2002 5:41 PM
To: Midrange - Midrange-L (E-mail)
Subject: Making sure a job is running
I was wondering if there is a way to make sure a job is running on the
system? We have a monitor job that we don't want to shut down and to notify
if it does.
Mike Wills
IT Corporate Support
Taylor Corporation
mnwills@taylorcorp.com
Phone: (507) 386-3187
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
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 mailing list archive is Copyright 1997-2025 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.