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



Hi Bob,

The problem here is that I'm not sure what I mean. I have not done anywork
with the datq or usrq before. The program is calling another progran that is
used to start the queue. I don't want to start the queue if it is already
there and active. How do I know if the queue is there and active?

Do you mean you have a ("never-ending") program in a batch job that sits and waits for entries on the queue? And you only want to start THAT JOB if it's not already running?

If so, I suggest that you use object locking. Create a data area. Have the background job do an ALCOBJ on that data area. As long as the job is running, it will hold the lock.

Then the program that needs to check if it's running will first try to ALCOBJ on that data area with a timeout of 1 second. If the allocation fails, you know the batch job is running, and you don't try to start another one...

Note that this question really has nothing to do with data queues or user queues. It's just a basic "how to see if a background job is already running" type of question.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.