×
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.
David Wright wrote:
Can RPG use the signal() or raise() C functions directly to force a
procedure to jump to the ON-ERROR part of a MONITOR block? I have not had
any luck finding examples or documentation of using these from RPG.
You're confusing error handling with signals. Two very different things!
To trigger the ON-ERROR, I suggest sending a program message via the
QMHSNDPM API. Try searching for that, I think you'll have much more
luck finding examples.
signal() and raise() are for POSIX signal handling (signal() registers a
procedure that receives signals -- a better API for that is sigaction --
and raise() triggers that signal in the current job. There's also
kill() which sends a signal to another job...)
Really signal(), raise(), kill, sigaction(), etc are all Unix-type APIs
provided to make it easier to port stuff from Unix. There are places
that they're useful in RPG, such as when using the spawn(), sleep(), or
setitimer() APIs. But, they're not used in error hnadling in RPG.
That's what program messages are for.
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.