|
-- [ Picked text/plain from multipart/alternative ] Avoiding the duplication of a 10 digit job name is quite a common situation and there are two ways I know of to deal with it. 1. Use an exclusive lock on some object. Any attempt to start the program again will fail when can't get the lock. This method requires that the use attempts to start the program to find out if it is already running. Several other contributos have suggested this approach which is simple, yet effective. 2. Use the system APIs QUSLJOB and QUSRJOBI. These APIs provide lists of active jobs and detailed information about each job enquired upon. Using these APIs, a program can determine if a specific job name is active, and take appropriate action. More sophisticated than option 1, but also more flexible. Syd Nicholson Leif Svalgaard wrote: >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. > --
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.