× 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 Paul,

Made the changes and still no luck.  I'm running on 7.2.  The QUSRWRK prestart setting for QSCWCHPS is already set to *NOMAX.

When I look in the DSPLOG now, I am seeing a string of CPI3999 errors with reason code 06 which states "Watch for event job ended abnormally or ended by user action".  When I check the *PGM object for the called exit program, it is still showing 0 uses, so it looks like the call to the exit is not getting done.

Based on the messages now showing in QHST, it appears that the reset did do something.  I'll play with it some more tomorrow.  I have a music gig coming up in about 30 minutes that I have to get ready for.

Rich

------------------------------------------------------------------------




On 6/20/2019 3:15 PM, Steinmetz, Paul via MIDRANGE-L wrote:
Couple of things to check.

1) In QHST, around the time that you sent your test message, look for a QSCWCHPS job ending, and a new one starting.
The one ending should be the one calling your watch exit program, job 897168 in my example below.

Job 897269/QUSER/QSCWCHPS started on 06/20/19 at 09:58:59 in subsystem QUSRWR
Job 897270/QUSER/QSCWCHPS started on 06/20/19 at 09:58:59 in subsystem QUSRWR
Job 897168/QUSER/QSCWCHPS ended on 06/20/19 at 09:59:00; .010 seconds used; e

2) If a WRKWCH fails there are times where you need to reset the WRKWCH.
Steps below were given to me by IBM support.

when those QSCWCHPS were ended manually, please follow the steps below to cleanup the Watches internals spaces:


1) Use DSPSYSVAL to check the value of QSFWERRLOG. If the value is set to *LOG, then change the QSFWERRLOG system value to *NOLOG to shut down Service Monitor (CHGSYSVAL QSFWERRLOG *NOLOG)
2) Go to WRKWCH *ALL and end (Option 2) all watches not related with Service Monitor.

Verify all watches are shut down (WRKWCH *ALL - end those that don't shut down after a period of time - give it a couple of minutes to terminate normally)

3) Verify that the watches jobs are all gone. Do WRKACTJOB SBS(QUSRWRK) and manually end QSCLICEV job, QSCWCHMS job and any other job whose name belongs to a watch session id.

4) ENDPJ SBS(QUSRWRK) PGM(QSYS/QSCWCHPS) OPTION(*IMMED)

5) CALL QSYS/QSCWCLNP This will delete all watches internal objects.

6) STRPJ SBS(QUSRWRK) PGM(QSYS/QSCWCHPS)

7) Restart Service Monitor (CHGSYSVAL QSFWERRLOG *LOG) if it was active at step 1.

8) Retry your watches

This steps can be performed at any time but any Watches will not trigger while you are performing this steps. Option 5 only takes a few minutes.

Let me know if it solves the issue.

On a side note and after looking at the number of requests for the spawn jobs, I would recommend that you issue the following command after step 5 and before step 6: CHGPJE SBSD(QUSRWRK) PGM(QSYS/QSCWCHPS) MAXUSE(*NOMAX)

This is a recommended change for customers that plan to use several watches on the system or that have watches that run for a long time.
This is also the default value as shipped on R720.

Paul

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Rich Loeber
Sent: Thursday, June 20, 2019 2:58 PM
To: Midrange Systems Technical Discussion
Subject: STRWCH Issue

I've been using the STRWCH successfully for a long time to watch a
message queue for a specific message ID.  I run multiple watches on my
system most of the time.  I'm now trying to implement a more global
watch that can check all messages arriving at a message queue for a
specific text string in the detailed message.  I have it coded and the
STRWCH completes successfully, but the exit program never gets called.

Here's the command that I'm using to start the process:

STRWCH SSNID(MYTEST) WCHPGM(MYLIB/MYEXIT)
WCHMSG((*ALL *NONE *MSGDTA  *INFO *GE 00)) WCHMSGQ((QSYSOPR))

After I start the watch, I then send a simple SNDMSG to QSYSOPR with
some nonsense text.  The exit program never gets called.

What am I missing?

I know I could just read messages from the message queue using an API,
but for a number of structural reasons, I'd really like to do this using
the Watch function.

Rich Loeber - @richloeber
Kisco Information Systems
http://www.kisco.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.