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



The CEETREC API will do that, but it does it by ending the activation group
in which the calling procedure is running. So if the C program and RPG are
in the same A/G then this will not work for you either.
-BOB


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of James H H Lampert
Sent: Tuesday, June 15, 2004 11:26 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Quick-out from several levels of procedure calls?

Would anybody happen to know how to quickly ABEND out of an arbitrary
number of levels of prototyped procedure calls in an ILE RPG program,
without also taking out the calling program?

The situation here is of a recursive descent parser in ILE RPG (which
makes bound calls to a scanner in ILE C), which is, in turn, going to be
called externally from C ("#pragma linkage(MYPARSER,OS,nowiden)"). In
simple cases, I can just return from the procedure calls with an indicator
set (I routinely use *IN13 for a failure indicator ["bad luck"]), and do
the final return in the main program with a halt indicator set, and that
will give the calling C program an "error" return, but I've got a place
where that would be rather difficult to do.

I tried sending an escape message, but that also propagated to, and
crashed, the calling C program, rather than simply telling it the parser
had abended.

--
JHHL



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.