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



On 14-Jun-2017 13:32 -0600, John Yeung wrote:
Surely there is an accepted idiom (or a small number of generally
used idioms) to handle the case where you want to "monitor" a
specific diagnostic message.

What is done, is firstly dependent on the implementation of the called feature that may have sent the Diagnostic message. Secondly, the feature issuing the diagnostic probably best would be invoked with a separate procedure/program message queue, to allow for a /clean/ Call Stack Entry Message Queue (PGMQ).

Dealing with a specific example would prove more effective than presuming /convention/ is followed; if [what I recall as] the convention were followed, then a prior diagnostic would appear only when an exception was raised, for which a Monitor Message (MONMSG) would have been the trigger for the purposeful review of the prior logged diagnostic message(s).


I know you can't use MONMSG directly on the diagnostic message.

The typical diagnostic followed by Escape enables the monitoring of the exception, then in response, review the preceding diagnostics.

So I guess you use RCVMSG. How do you set this up so that if the
diagnostic message you were looking for isn't there, everything
proceeds as though you had never looked for the message in the first
place? (Meaning execution continues normally if there are no errors,
but if there is an error, it shows up exactly as it would have had
you not tried to handle the diagnostic message.)

Presuming the diagnostic is sent *to* the CLP [rather than another PGMQ], then:

1> clear the program message queue
2> Receive Message (RCVMSG) for Message Type (MSGTYPE) of *DIAG
using the Remove Message (RMV) of *NO
** Note: these are processed in FIFO
3> If no message, then Leave [as if nothing was done]
4> If desired Diag is found then do_stuff_re_diag_transpired
5> Else Goto 2


[...]



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.