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



mi400-bounces@xxxxxxxxxxxx wrote on 05/18/2004 07:46:36 AM:

> I am basically doing an "IF Object Exists" test in an RPG IV program by
> calling a C function that evokes rslvsp.
> When the object does not exist, a signal handler is evoked and I return 
a
> *NULL value to the caller. When it does exist, I return the system 
pointer.
> Where I'm lost is how to filter/remove the MCH3401 message so that the 
user
> doesn't see it in their joblog. I want to do this because they may be
> calling this procedure 1000's of times and that would just clutter 
things
> up.
> Is there a way to filter out messages without doing a dynamic call to 
one of
> the QMHxxxxx message APIs?
> -Bob Cozzi

If you choose to use a signal handler, you'll need to use the message 
handler APIs (in particular, QMHCHGEM).

>From C, a simpler and more efficient option, especially if the exception 
path is take with some regularity, is to replace the signal handler with a 
branch-point exception handler that removes messages from the job log. For 
example:

    #include <stddef.h>
    #include <except.h>
    #include <pointer.h>
    #include <mih/rslvsp.h>

    _SYSPTR checkObj( ... ) 
    {
      _SYSPTR obj = NULL;

      obj = NULL;
      _VBDY();
      #pragma exception_handler (EH_LBL,   \
                 0,  _C1_ALL, _C2_ALL, _CTLA_HANDLE_NO_MSG )
      obj = rslvsp( ... );
      #pragma disable_handler

     EH_LBL:
      return obj;
    }

Any follow-up questions should probably go to the C400-L.

Bob Donovan, rjd@xxxxxxxxxx


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.