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

Gad Miron <[email protected]> Sat, 1 Aug 2026 16:39:25 +0300
Newsgroups gmane.comp.hardware.ibm.midrange
Message-ID <CAFj_=c2jvB8NWvtHY323BKiiwNuWFc779Oo9m0wyUftNiZxhQA@mail.gmail.com>
Somewhat late but...

see QSYS2.JOB_INFO and/or  QSYS2.ACTIVE_JOB_INFO

Gad


>
> date: Wed, 15 Jul 2026 16:20:05 -0400
> from: Jim Franz <[email protected]>
> subject: Re: Is there an easy way, in CL, to find out if there are
>         other jobs with a known jobname active or scheduled?
>
> to do this without a release issue - allocate a file, and if already
> allocated , then pgm is already active... its kind of old school...
>
> create a file  - CRTFIL WTCPLOCK
> inside the clp (assuming WTCPSERVER is a clp/clle or is driven by a
> clp/clle...) at beginning of pgm,
>
> $ALC:        ALCOBJ     OBJ((WTCPLOCK *FILE *EXCL)) WAIT(5)
>              MONMSG     MSGID(CPF1000) EXEC(DO)  /* another job has an
> exclusive lock */
>              GOTO       CMDLBL($END)
>              ENDDO
> /* at the end of the program WTCPSERVER - need a tag called $END
> /* ending the clp will deallocate the lock or you can do an explicit
> DLCOBJ
>
> $END:        ENDPGM
>
> Jim Franz
>
> On Wed, Jul 15, 2026 at 3:24?PM James H. H. Lampert via MIDRANGE-L <
> [email protected]> wrote:
>
> > On 7/15/26 12:17 PM, Rob Berendt wrote:
> > > Knowing you, I'm guessing you'd go with the
> > > LIKE so as to support a wider array of client base.
> >
> > . . . except that this is a very specific program for a very specific
> > customer.
> >
> > --
> > 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: MIDRANGE-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
> > Before posting, please take a moment to review the archives
> > at https://archive.midrange.com/midrange-l.
> >
> > Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org 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: MIDRANGE-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related questions.

You can help support midrange.com by visiting https://donate.midrange.com and making a contribution.