Hi Carsten

I should have said a little more - your points are very well-taken, by the way.

I meant that performance is probably not affected much for normal processing that does not find a match in the watch "table". My assumption is, the check for entries is always done when a message is sent - if none found, no big deal. I also assume that there is a very efficient method of determining that there is no entry for a message.

Of course, we all know what "ass-u-me" means!

Vern

On 4/18/2013 5:43 AM, Flensburg, Carsten wrote:
Vern,

The performance impact very much depends on how the watch is defined,
here's an excerpt from an article I wrote on the watch topic:

"When testing the watch event exit programs included with this article,
I encountered a couple of issues in the watch implementation on the IBM
i. One problem caused a session ID of all nulls to be passed to the exit
program for the End watch event. Another, and potentially much more
critical, issue surfaced when I tested an exit program forwarding all
messages sent to the Critical system messages message queue QSYSMSG to
an email account. Starting a watch against the QSYSMSG message queue
specifying a watch message ID of *ALL caused a never-ending stream of
QSCWCHPS prestart jobs servicing the watch to be started and then
immediately ended, as long as the watch remained active.

As a result, this could lead to the system job tables filling up,
severely degrading the performance of your system, which ultimately
might require an IPL to recover. Preventing the prestart jobs from being
cycled by specifying MAXUSE(*NOMAX) for the QSCWCHPS prestart job entry
could, however, negatively impact your system's performance. IBM is
currently looking into providing an improvement to the current
implementation but has made no promises at this point."

So at this point, since IBM has not changed the implementation of
watches, I would be reluctant to start an *ALL message ID watch...

Cheers,
Carsten

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: 17. april 2013 23:01
To: Midrange Systems Technical Discussion
Subject: Re: Lock on QSYSOPR

++++1 on watches - these are amazing, and have almost no impact on
performance, as I understand them.

----- Original Message -----
Paul,

Use the message watch support documented at
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/apis/xwchevnt.htm

With watches there is no need to poll/interrogate the message queue.
Just write an exit program (named for example purposes SNDRPY) and, if
you want to watch for message XXX0123 (and/or others), use the command:

STRWCH SSNID(SNDEXIT) WCHPGM(SNDRPY) WCHMSG((XXX0123))

The system will call the SNDRPY program when ever message XXX0123 is
sent to QSYSOPR (which is the default message queue to watch on the
STRWCH command).

To end the watch: ENDWCH SSNID(SNDEXIT)

Here's a little CL starter (since you referenced SndRpy):

Pgm Parm(&Reason &Session &Error &WchDta)
Dcl Var(&Reason) Type(*Char) Len(10)
Dcl Var(&Session) Type(*Char) Len(10)
Dcl Var(&Error) Type(*Char) Len(10)

Dcl Var(&WchDta) Type(*Char) Len(512)
Dcl Var(&MsgID) Type(*Char) Stg(*Defined) +
Len(7) DefVar(&WchDta 5)
Dcl Var(&MsgQ) Type(*Char) Stg(*Defined) +
Len(10) DefVar(&WchDta 13)
Dcl Var(&MsgQL) Type(*Char) Stg(*Defined) +
Len(10) DefVar(&WchDta 23)
Dcl Var(&MsgKey) Type(*Char) Stg(*Defined) +
Len(4) DefVar(&WchDta 387)

Dcl Var(&Response) Type(*Char) Len(1) Value('I')

SndRpy MsgKey(&MsgKey) MsgQ(&MsgQL/&MsgQ) +
Rpy(&Response) Rmv(*No)
ChgVar Var(&Error) Value(' ')
EndPgm

You obviously did not attend my Working with Messages 101 at COMMON last
week :)

Bruce


On Wed, Apr 17, 2013 at 1:39 PM, Paul Fenstermacher <
PFenstermacher@xxxxxxxxxxxxx> wrote:

It's looking for specific messages and then using SNDRPY with a C or
an I.
V7R1.


Paul Fenstermacher | Sys/NW Admin,Sr | Corporate Systems - POWER
Systems Administration | Jack Henry & Associates, Inc.(r)
663 West Highway 60 | Monett, MO 65708 | Ph. 417.235.6652 | x177389 |
pfenstermacher@xxxxxxxxxxxxx



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:
midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Bruce Vining
Sent: Wednesday, April 17, 2013 1:22 PM
To: Midrange Systems Technical Discussion
Subject: Re: Lock on QSYSOPR

Is it looking for specific messages in QSYSOPR or just any old
message?
What release are you on?


On Wed, Apr 17, 2013 at 12:57 PM, Paul Fenstermacher <
PFenstermacher@xxxxxxxxxxxxx> wrote:

I'm using a third party application to monitor the QSYSOPR message
queue and have found a job that does a RCVMSG on QSYSOPR.
Unfortunately it fails because it can't lock the queue, is there any
alternative to RCVMSG or a
way to run it without a lock? Ultimately we're probably going to
have
to
change the application but I thought I would see if any of the
experts have a quicker answer.


Paul Fenstermacher | Sys/NW Admin,Sr | Corporate Systems - POWER
Systems Administration | Jack Henry & Associates, Inc.(r)
663 West Highway 60 | Monett, MO 65708 | Ph. 417.235.6652 | x177389
| pfenstermacher@xxxxxxxxxxxxx<mailto:pfenstermacher@xxxxxxxxxxxxx>


NOTICE: This electronic mail message and any files transmitted with
it are intended exclusively for the individual or entity to which it
is addressed. The message, together with any attachment, may contain
confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure
or distribution is strictly prohibited. If you have received this
message in error, please immediately advise the sender by reply
email and delete all copies.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please
take a moment to review the archives at
http://archive.midrange.com/midrange-l.



--
Regards,
Bruce
www.brucevining.com
www.powercl.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.
NOTICE: This electronic mail message and any files transmitted with it
are intended exclusively for the individual or entity to which it is
addressed. The message, together with any attachment, may contain
confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or
distribution is strictly prohibited. If you have received this message
in error, please immediately advise the sender by reply email and
delete all copies.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.



--
Regards,
Bruce
www.brucevining.com
www.powercl.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

This communication is intended only for use by the addressee.It may contain confidential or privilegedinformation.
If you receive this communication unintentionally, please inform us immediately and delete this e-mail and any attachments.
Warning: Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept
responsibility for any loss or damage arising from the use of this email or attachments.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.