|
I'd recommend using the APIs. The method here is OK, but can fail when things go awry, like abnormal shutdowns, etc. Sith the API you can specify the job name only and see if there is an entry returned for it. If so, there you are. If not, submit it. Very clean, very easy, works even in CL. At 09:59 AM 4/9/02 -0500, you wrote: >Thanks, I think this is what I was looking for. > >-----Original Message----- >From: Westdorp, Tom [mailto:Tom.Westdorp@StationCasinos.com] >Sent: Monday, April 08, 2002 6:30 PM >To: midrange-l@midrange.com >Subject: RE: Monitor for existing job. > > >This message is in MIME format. Since your mail reader does not understand >this format, some or all of this message may not be legible. >-- >[ Picked text/plain from multipart/alternative ] >Does your job hold an exclusive lock on anything? Display file, disk file, >ICF file, data area, etc? If so, test for the ability to get the lock on >start up, if you can't it's already running so go to eoj. > >If I don't have a file I can test, I use a data area. If it doesn't exist: >I create it. If it exists I alcobj and run the job, if it exists and I >cannot allocate it the job is already running so return. > >If the job abends the system releases the lock automatically and you're >clear for a restart with no other interaction necessary. > >-----Original Message----- >From: Wills, Mike N. (TC) [mailto:MNWills@taylorcorp.com] >Sent: Monday, April 08, 2002 4:00 PM >To: Midrange - Midrange-L (E-mail) >Subject: Monitor for existing job. > > >I have a job that is always running. However, I want to make sure that there >is only one instance of this job running. How do I monitor for this? > >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. >_______________________________________________ >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-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.