|
Bob, as long as it's MI related, even if it's followup on an original MI question, it can continue on MI400. MI touches alot of areas and I've allowed alot of gray space here in the past as this is a very responsible group and from an thread archives perspective, I would want anyone looking at this in the archives to see the whole thread for continuity... In short, this thread can continue on MI400... tks for the concerns...:) D.Rima MI400 Sysop On Tue, 18 May 2004, Bob Donovan wrote: > 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 > > _______________________________________________ > This is the MI Programming on the AS400 / iSeries (MI400) mailing list > To post a message email: MI400@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/mi400 > or email: MI400-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/mi400. >
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.