Do all you can to take care of abnormal termination of this job. This could
leave the '1' in the data area. Then you could not start the job again,
unless you manually change the data area. This is why I try not to depend
on this method.

In C/C++, there are cancel handlers that can protect you here, quite a bit.
Any kind of termination calls this bit of code. Very neat. I don't remember
if this kind of thing exists in RPG. It certainly does NOT in CL.

At 12:03 PM 4/9/02 -0500, you wrote:
>Leif, What I am doing (forgot who suggested it) is to create a data area. If
>there is a '1' in the data area, it is running, if there is a '0', it isn't
>running.
>
>-----Original Message-----
>From: Leif Svalgaard [mailto:leif@attglobal.net]
>Sent: Tuesday, April 09, 2002 11:53 AM
>To: midrange-l@midrange.com
>Subject: Re: Monitor for existing job.
>
>
>From: Hall, Philip <phall@spss.com>
> > > what am I missing? jobs are UNIQUE on the system. The 26 character
> >
> > I think the poster was after a singleton job, i.e. there must be only one
>of
> > these jobs running on the system at anytime, like inetd on Unix, because
> > it's function (or resources) can not be shared or would cause a conflict.
> >
>
>How would you specify such a job? And how would you prevent another
>one with the same simple name but using completely different resources
>to run or maybe it would be ok to run this as there is no conflict.
>I guess I may be taking too broad a view of what a job is. Maybe
>people running a production system manage things by naming
>convention: they would never dream about submitting jobs with
>the same name doing different things...
>
>
>_______________________________________________
>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-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.