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



Hi James

You may use QSYS2.ACTIVE_JOB_INFO

I recently tested the following SQL to find if PGM NMFSLTCL2 is running -
worked fine.

Someone on this forum helped me with it, I'm ashamed to say I do not
remember who.

SELECT distinct aj.JOB_NAME,si.PROGRAM_NAME,si.PROGRAM_LIBRARY_NAME

FROM TABLE(QSYS2.SELECT distinct
aj.JOB_NAME,si.PROGRAM_NAME,si.PROGRAM_LIBRARY_NAME

FROM TABLE(QSYS2.ACTIVE_JOB_INFO(JOB_NAME_FILTER => '*ALL')) aj

JOIN TABLE(QSYS2.STACK_INFO(JOB_NAME => aj.JOB_NAME)) si

on si.PROGRAM_NAME = 'NMFSLTCL2'(JOB_NAME_FILTER => '*ALL')) aj

JOIN TABLE(QSYS2.STACK_INFO(JOB_NAME => aj.JOB_NAME)) si

on si.PROGRAM_NAME = 'NMFSLTCL2'



Gad






date: Fri, 27 Oct 2023 16:04:30 -0700
from: "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?

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





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.