Jorge,
I have found that the best way is to compile a very simple java class
that works just like a CL program you would write to trap exceptions in
an RPG app. Basically just a try block with an exception block that
traps an exception and possibly returns a message via a parameter. A
java wrapper can also avoid some of the complexities encountered when
attempting to figure how to implement a class in RPGLE, for example type
casting; a bit like the wrappers people write to hide they might
perceive as the complexities of system APIs.

All it requires is NotePad and the javac command via QShell.

Peter


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
jmoreno@xxxxxxxxxxxxxxxx
Sent: Friday, 7 August 2009 7:14 a.m.
To: RPG400-L@xxxxxxxxxxxx
Subject: RPG Handshake with java program and capture of "exception Java
error"

Hello everyone,

In our company we are using a java program that serves a external
function

A consultant put together an RPG wrapper that calls the java program
and returns the results to the RPG program ( A callable function)

The problem resides here:

When the RPG program invokes the procedure that describes the java
program, The java program returns java string and it works fine when all
conditions are fine

However, there is no provision for a Java exception error handling in
RPG other than the RPG MONITOR opcode

I have been told that in the case of an exception Java type we have to
manipulate the Java exception in a different way Is it possible to catch
that Java exception error in RPG and how would you recomend to do it?

How could you get that "Java exception error back in your RPG progarm
and manipulate that information?"

Regards

Jorge A Moreno
Military Car Sales, Inc


This email, including its attachments, may contain information that is
confidential and may be protected by federal and/or state laws and
regulations, or other confidentiality privileges. This email, including
its attachments, may contain non-public information, therefore it is
intended to be conveyed only to the designated recipient(s). If you are
not an intended recipient, please delete this email, including its
attachments, and notify the sender. The unauthorized use, dissemination,
distribution or reproduction of this email, including its attachments,
is prohibited and may be unlawful.
Visit our website www.vedaadvantage.com. It has a new design with improved navigation and search capabilities; and customer friendly interface with more relevant insights and solutions to help you make informed decisions.

#####################################################################################

This correspondence is for the named person's use only. It may contain confidential
or legally privileged information, or both. No confidentiality or privilege is waived
or lost by any mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not disclose,
copy or rely on any part of this correspondence if you are not the intended recipient.
Any views expressed in this message are those of the individual sender, except where
the sender expressly, and with authority, states them to be the views of Veda Advantage.
If you need assistance, please contact Veda Advantage on either :-
Australia 1300-921-621 or New Zealand +64 9 367 6200

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-2020 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].