Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lckw

56 views
Skip to first unread message

Truffle

unread,
Jun 18, 2004, 7:13:38 PM6/18/04
to
Hi

I am not a programmer, but can cobble simple cl programs together. I have a
couple of batch jobs that sometimes go into a lckw status, which holds
everything else up (its unavoidable). Is there some simple program I can
write in CL to monitor for this, and in the event of, send a message to
qsysopr msgq (i could then pick this up and use an application we have to
send me a text message)? I'm running v4r4.

Many thanks in advance


Ken

unread,
Jun 18, 2004, 11:42:26 PM6/18/04
to
Hi -

On Sat, 19 Jun 2004 00:13:38 +0100, "Truffle" <tru...@nospam.com>
wrote:

You could use the QUSLJOB API to get a list of jobs that you want to
monitor. Use format JOBL0200 and request key 0101 (active job
status). Loop through the user space looking for jobs with an active
job status of LCKW. SNDPGMMSG your message to QSYSOPR for each one
found (or collect a count and send one message to QSYSOPR or whatever
suits your need).

Repeat this process using a DLYJOB to wait between checks.

--
Ken
http://www.ke9nr.net/
Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind.

QMAGIC

unread,
Jun 22, 2004, 6:39:39 PM6/22/04
to
Ken <ng3122@ke9nr.#nospam#.net> wrote in message news:<g7d7d0h22uret32sa...@4ax.com>...

> Hi -
>
> On Sat, 19 Jun 2004 00:13:38 +0100, "Truffle" <tru...@nospam.com>
> wrote:
>
> >I am not a programmer, but can cobble simple cl programs together. I have a
> >couple of batch jobs that sometimes go into a lckw status, which holds
> >everything else up (its unavoidable). Is there some simple program I can
> >write in CL to monitor for this, and in the event of, send a message to
> >qsysopr msgq (i could then pick this up and use an application we have to
> >send me a text message)? I'm running v4r4.
>
> You could use the QUSLJOB API to get a list of jobs that you want to
> monitor. Use format JOBL0200 and request key 0101 (active job
> status). Loop through the user space looking for jobs with an active
> job status of LCKW. SNDPGMMSG your message to QSYSOPR for each one
> found (or collect a count and send one message to QSYSOPR or whatever
> suits your need).
>
> Repeat this process using a DLYJOB to wait between checks.

I suggest you do a little research on monitoring a message queue. The
CLP could watch for the record lock message and then call a program to
send the message on.

Try seraching www.seach400.com in addition to this group.

Hope it helps.
Dan

Ken

unread,
Jun 22, 2004, 10:49:59 PM6/22/04
to
Hi Dan -

On 22 Jun 2004 15:39:39 -0700, dann...@cox.net (QMAGIC) wrote:

>I suggest you do a little research on monitoring a message queue. The
>CLP could watch for the record lock message and then call a program to
>send the message on.

Two problems with your suggestion:

1. You replied to me rather than to the original poster.

2. There will be no message to a message queue until the LCKW ends,
which could be seconds, minutes, hours, or even never [a record lock
with WAITRCD(*NOMAX)].

Truffle

unread,
Jul 1, 2004, 4:01:58 PM7/1/04
to
Thanks Dan, I'll read up on API's, though search400 seems to be down at the
moment.

"QMAGIC" <dann...@cox.net> wrote in message
news:b2431aa9.04062...@posting.google.com...

Brian

unread,
Jul 1, 2004, 5:25:37 PM7/1/04
to
First, find out which object is locked, the object your job is waiting for.
Then you can allocated it with ALCOBJ command. Specify a reasonable value
for the WAIT parameter. Monitor for message CPF1002, and if received, send
your notification message to QSYSOPR. If ALCOBJ is successful, release your
lock on the object with DLCOBJ command.

"Truffle" <tru...@nospam.com> wrote in message
news:40e46dbb$0$28265$cc9e...@news-text.dial.pipex.com...

0 new messages