IBM i Global

 View Only

 Watch for event function STRWCH

Pino Mariotto's profile image
Pino Mariotto posted 11/27/24 04:41 AM

Following doc STRWCH - Watch Exit Programs Explained with CL Example I setup a watch function to be notified when something new appears into the PAL.

It works fine but from time to time, with no regularity, we get notified with etries that we do not find looking at the PAL via SST (STRSST,1,1,1).

With further investigation exploiting the registration ID I saw that those entries are pertaining to the past, even years.

Someone knows why ?

I tried to make use of the timestamp to discard the old ones but it is not readable, do you know why ?

Thank you

Rich Malloy's profile image
Rich Malloy IBM Champion

Hi Pino - I, too, like to use WATCHES....but generally speaking, I use them to monitor Jobs or QSYSOPR. While I have not used it for PAL or LIC etc, I do find it useful to (temporarily) include a DMPCLPGM near the end of my program so I can troubleshoot any issues that I may have.  My 'guess' on the message timestamp, without looking at your code or anything, is that perhaps you are 'off' on your placement for where the timestamp is located. 

Don't forget, if you change the program you need to end and restart the watch event....

Hope this helps you some..Rich