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



I would NOT use a record in a table to do this. If the job ends abnormally, the record is still there.

I used to do as Art first suggested which is to allocate a data area.
The lock will disappear if the job ends - regardless of how.

These days, SQL is a great alternative.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power



-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Art Tostaine, Jr.
Sent: Friday, October 27, 2023 3:46 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Is there a quick and easy way to check whether a job of a given name is active? Or whether a particular program is in use?

We create and ALCOBJ a *dtaara with the same name as the program. If it’s
locked program ends.

You can also use SQL to determine if a job is active. I think Simon showed
how to retrieve results from SQL select in clle.

You could also write the results of the SQL to a temporary table and see if
you have any records in there.


On Fri, Oct 27, 2023 at 5:46 PM James H. H. Lampert via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

I've got a periodic update job. It's set to start up in the morning from
a job schedule entry, then run every 5 minutes (by self-perpetuating up
to a specified hour) for a good chunk of the day.

Most of the time, it's waiting for its scheduled launch time (most
iterations run to completion in under a minute).

And I've got a program that could potentially get in a fight with the
periodic update. Is there a quick and easy way for, say, a CL program to
determine whether it's actually running?

--
JHHL
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


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.