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



Along the lines of what Colin has suggested, the way I have done it is put a
Monitor statement around any entry point from the outside world.  That way
you will always have controlled errors and you can return to the java
program what happened.

HTH,
Aaron Bartell

-----Original Message-----
From: java400-l-bounces+albartell=gmail.com@xxxxxxxxxxxx
[mailto:java400-l-bounces+albartell=gmail.com@xxxxxxxxxxxx] On Behalf Of
Colin Williams
Sent: Wednesday, April 20, 2005 9:09 AM
To: 'Java Programming on and around the iSeries / AS400'
Subject: RE: calling RPGLE program from Java

One way to do this is to change the error handling in your RPG program so
that if it gets an error, 
it passes back an error message as a parameter, rather than just falling
over with a message wait.

You could use the *PSSR subroutine to achieve this, but that doesn't really
help if your RPG program is calling other programs.

Another option, is rather than calling the program directly, you create a
batch process on the 400 that you communicate with via dataqueues. Then you
send your request on one dataqueue, and wait for a specified timeout period
for a response on another dataqueue. If you don't get your request within
the given time, you flag that as an error to the user.

But with threads you could achieve a similar result.

cheers
Colin.W
 
Extension   5800
Direct dial   0870 429 5800


-----Original Message-----
From: Ashish Kulkarni [mailto:kulkarni_ash1312@xxxxxxxxx] 
Sent: 20 April 2005 14:50
To: java400-l@xxxxxxxxxxxx
Subject: calling RPGLE program from Java


Hi
I have been working on a web project where we call
RPLGE programs from java, the problem we face is when
there is an error on AS400 and the AS400 job goes to
message wait, there is no way the web user can be
communicated, 
has anyone designed a way to tackle this issue, 
what i am planning to write a program using threads,
where one program will start a thread which will call
the RPG program and other thread will monitor this
program
Has anyone done this successfully before, or is there
any other better way of doing it


Ashish

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

This e-mail has been sent by a company of Bertram Group Ltd, whose
registered office is 1 Broadland Business Park, Norwich, NR7 0WF. 
This message, and any attachments, are intended solely for the addressee and
may contain privileged or confidential information.  If you are not the
intended recipient, any disclosure, copying, distribution or any action
taken or omitted to be taken in reliance on it, is prohibited and may be
unlawful.  If you believe that you have received this email in error, please
contact the sender immediately. Opinions, conclusions and statements of
intent in this e-mail are those of the sender and will not bind a Bertram
Group Ltd company unless confirmed in writing by a director independently of
this message. 
Although we have taken steps to ensure that this email and any attachments
are free from any virus, we advise that in keeping with good computing
practice the recipient should ensure they are actually virus free.

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


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.