Have you tried the Active_Job_Info IBM Service:
The following SQL Statement will return all active jobs in all sub-systems
with the specified Job name:
Select *
from Table(QSYS2.Active_Job_Info(Job_Name_Filter => 'YOURJOB'));
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
Modernization ? Education ? Consulting on IBM i
IBM Champion since 2020
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
"Train people well enough so they can leave, treat them well enough so they
don't want to. " (Richard Branson)
"Learning is experience ? everything else is only information!" (Albert
Einstein)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of James
H. H. Lampert via MIDRANGE-L
Sent: Friday, 27 October 2023 23:46
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: James H. H. Lampert <jamesl@xxxxxxxxxxxxxxxxx>
Subject: 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?
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.
As an Amazon Associate we earn from qualifying purchases.