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



Thanks Alan, Rob. That's what I was looking for.

Gad




from: Rob Berendt <rob@xxxxxxxxx>
subject: RE: Is a certain PGM/JOB running?

The link Alan gave is ideal for many of the DB2 for i Services. That list
will also tell you at which release, or ptf, the service either arrived,
and/or was enhanced.

There are also numerous other system catalog entries available at
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/
db2/rbafzcatalog.htm

select count(*)
from table(active_job_info( JOB_NAME_FILTER => 'ADMIN')) x;

I have three jobs named ADMIN and several other ADMINx jobs in my QHTTPSVR
subsystem. This returned the number 3.
You could also code it as
select
case
when count(*) > 0 then '1'
else '0'
end as JobActive
from table(active_job_info( JOB_NAME_FILTER => 'ADMIN')) x;


This other service will NOT show a lock on a program just because it is in
a call stack.
select
system_object_schema, system_object_name,object_type, job_name
from qsys2.object_lock_info
where system_object_name = 'QZHBMAIN';




Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Alan Shore <ashore@xxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 04/26/2017 07:35 AM
Subject: RE: Is a certain PGM/JOB running?
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



Hi Gad
Have a look here
I was given this just recently and haven't had time to go through it much


http://ibm.biz/DB2foriServices


Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Gad
Miron
Sent: Wednesday, April 26, 2017 6:28 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Fwd: Is a certain PGM/JOB running?

Hello pundits

There are some jobs/pgms here that need to verify they are not already
executing.
(if they are, then please wait an try again or exit gracefully) Do the new
SQL Tables/Views introduced lately enable such a check?

TIA
Gad

PS
Back in the (very) old days of S/36 there was a IF-ACTIVE OCL (me think)

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.