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



it is there - i was confused by trying a simple query as opposed to
something more structured.
This works (sample from IBM doc - executed in STRSQL green screen...

SELECT JOB_NAME, AUTHORIZATION_NAME, TEMPORARY_STORAGE,
SQL_STATEMENT_TEXT
FROM TABLE (QSYS2.ACTIVE_JOB_INFO(DETAILED_INFO => 'ALL')) X
WHERE JOB_TYPE <> 'SYS'
ORDER BY TEMPORARY_STORAGE DESC

but this does not
Select * from Table(QSYS2.Active_Job_Info)
error: Token ) was not valid. Valid tokens: (.
or
Select * from QSYS2.Active_Job_Info error: ACTIVE_JOB_INFO in
QSYS2 type *FILE not found.

The Services_Info helped..

Jim



On Sat, Oct 28, 2023 at 1:20 PM Birgitta Hauser <Hauser@xxxxxxxxxxxxxxx>
wrote:

Hi Jim,

The Service ACTIVE_JOB_INFO should be available since Release 7.1

Try to run the following query to get a list of available services (incl.
the earliest possible release):
Select * from QSYS2.Services_Info;

If you cannot find the service on your system you are missing something or
you do not have access authority

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 Jim
Franz
Sent: Saturday, 28 October 2023 18:36
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?

your wrote - 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'));

Maybe i missed something about the Active_Job_Info service. At V7R5 i have
no tables in QSYS2 that start with "Active".

an old alternative before the systables was to execute WRKACTJOB to *Print
and then read the spooled file for what you are looking for .

Jim Franz

On Sat, Oct 28, 2023 at 3:24 AM Birgitta Hauser <Hauser@xxxxxxxxxxxxxxx>
wrote:

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.


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


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