Oh yeah! That's how I did it! Forgot about that.
2 years of retirement and things get a bit fuzzy....
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 Mark Waterbury
Sent: Friday, October 27, 2023 4:07 PM
To: James H. H. Lampert via MIDRANGE-L <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?
Hi, James,
You do NOT need a *DTAARA -- just issue the ALCOBJ ... *EXCL against the actual *PGM itself ... :-)
Just be sure to have error recovery logic to free the lock when the program ends, in case it ends abnormally ...
Hope that helps,
Mark S. Waterbury
On Friday, October 27, 2023 at 07:04:42 PM EDT, James H. H. Lampert via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:
On 10/27/23 4:00 PM, Roger Harman wrote:
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.
That's kind of what I was thinking, even before Art suggested it.
Thought there was another possibility I either didn't know about, or had
forgotten about in my old age.
--
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.