Thaks Gary. I end up using System properties to tell me if I need to
convert. Not very elegant, but that is what I got at the moment.

// set the encoding, in case of it running from RPG program
String overrideEncoding =
if (overrideEncoding != null && overrideEncoding.trim().length() > 0) {
str = bao.toString(overrideEncoding);
str = bao.toString();

"Gary L Peskin" <garyp@xxxxxxxxxxxx> wrote in message
Lim --

If this data is coming from stdout (I assume you mean that instead of
and stderr, please check the values of os400.stdio.convert and
os400.child.stdio.convert in each environment (RPG versus J2EE).
Also, I'm
assuming that you mean Runtime.exec instead of Runtime.process.


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai
Sent: Friday, November 06, 2009 6:35 AM
To: java400-l@xxxxxxxxxxxx
Subject: Re: Running in EBCDIC or ASCII

In my case, this StreamGobbler class is threaded out from another
that does a remote ssh command call thru the Runtime.process. This
StreamGobbler's job is to consume the stdin and stderr of the
Runtime.process, which in this case would be whatever the ssh server
sent back.

Since ssh is basically running socket under the cover, the data, I
think, should be sent as it. I would think it should always be

"Barbara Morris" <bmorris@xxxxxxxxxx> wrote in message
Gary L Peskin wrote:
In that case, I would look at the stuff going into your
How is it getting in there? It's possible that RPG uses an
JVM and
your J2EE server uses an ASCII JVM. ...

I don't think there is such a thing as an EBCDIC JVM. If the RPG
using RPG's EXTPROC(*JAVA) support, the RPG runtime would be
any necessary conversions between the RPG EBCDIC and the Java
any character parameters or return values.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by 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.