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

Jim Franz <[email protected]> Wed, 15 Jul 2026 16:20:05 -0400
Newsgroups gmane.comp.hardware.ibm.midrange
Message-ID <CAEVZ15OtApFRpXL=T27ERQ5TJq6V_Q_-Yd0WaKzXS3b==ahhLQ@mail.gmail.com>
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: [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.