|
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 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.