× 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.



Since I already have a data area locked, I guess this would work great.
Thanks

-----Original Message-----
From: Bob Crothers [mailto:bob2@CStoneIndy.com]
Sent: Friday, October 25, 2002 6:54 PM
To: midrange-l@midrange.com
Subject: RE: Making sure a job is running


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.

_______________________________________________
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 thread ...


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.