Re: Is there an easy way, in CL, to find out if there are other jobs with a known jobname active or scheduled?

Rob Berendt <[email protected]> Wed, 15 Jul 2026 15:17:16 -0400
Newsgroups gmane.comp.hardware.ibm.midrange
Message-ID <CAPJ+qQMjgzyK79Fc907r-yJ5NQZ91T0yAzyKaAM2tJcUAJyuww@mail.gmail.com>
<snip>
Enhanced with IBM i 7.6 SF99960 Level 1 & IBM i 7.5 SF99950 Level 9 & IBM i
7.4 SF99704 Level 30:
Add job name filter
</snip>
So in 7.3, or higher machines behind on PTF's, you would not use the
filter.  Instead you would use a WHERE clause, like either JOB_NAME LIKE
'%WTCPSERVER%' or if you have the PTFs for the short name column,
JOB_NAME_SHORT = 'WTCPSERVER'.  Knowing you, I'm guessing you'd go with the
LIKE so as to support a wider array of client base.
For what PTFs enhanced or added what services check out
https://www.ibm.com/support/pages/ibm-i-services-sql



On Wed, Jul 15, 2026 at 3:00 PM James H. H. Lampert via MIDRANGE-L <
[email protected]> wrote:

> On 7/15/26 10:57 AM, Daniel Gross wrote:
> > A small SQLRPGLE program (maybe wrapped into a CMD) might be your best
> bet.
> >
> > With the JOB_INFO table function you receive exactly what you need.
> >
> > -
> https://www.ibm.com/docs/en/i/7.6.0?topic=services-job-info-table-function
> >
> > With a receiver variable you can return the job count.
>
> Hmm.
>
> First, I've literally never used SQLRPGLE. But that's not exactly
> intsurmountable.
>
> Second, on our V7R5 cloud box,
>
> > select * from TABLE(QSYS2.JOB_INFO(JOB_NAME_FILTER => 'WTCPSERVER'))
>
> just comes back with an error message
>
> > Named argument JOB_NAME_FILTER for routine JOB_INFO not valid for reason
> code 1.
>
> in spite of the fact that the V7R5 docs for that function say the
> argument does exist.
>
> Third, on the V7R3 customer box where I need this, in spite of the fact
> that the V7R3 docs say the function exists (even though the argument
> doesn't), I get
>
> > JOB_INFO in QSYS2 type *N not found.
>
> So unless something else that's V7R3-friendly shows up, I may be stuck
> with having to call QUSLJOB.
>
> Hmm. But as it happens, I think I may have something already written
> that I can use.
>
> --
> JHHL
>
>
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/midrange-l
> or email: [email protected]
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/midrange-l.
>
> Please contact [email protected] for any subscription related
> questions.
>
>
-- 
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact [email protected] for any subscription related questions.