The initial message is trapped by an application that is continuously running
It sounds like this is the place to manage a variable that keeps track of last time the subroutine was called.
If you cannot update the parent exec, perhaps Netview has a way to save variables outside of the execution of an instance of a program.
| update: chapter 4 of 'Programming: REXX and the NetView Command List Language', SC31-8862-03, describes global variables. I am not familiar with it, but sounds like what you need.
Or you could save the status to a dataset. There may be performance implications to using a dataset.