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



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 =
System.getProperty("runtime.stdio.encoding.override");
if (overrideEncoding != null && overrideEncoding.trim().length() > 0) {
str = bao.toString(overrideEncoding);
}
else
{
str = bao.toString();
}

"Gary L Peskin" <garyp@xxxxxxxxxxxx> wrote in message
news:<mailman.2304.1257525936.8694.java400-l@xxxxxxxxxxxx>...
Lim --

If this data is coming from stdout (I assume you mean that instead of
stdin)
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.

Gary

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

Barbara,
In my case, this StreamGobbler class is threaded out from another
class
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
would
think, should be sent as it. I would think it should always be
ascii.




"Barbara Morris" <bmorris@xxxxxxxxxx> wrote in message
news:<mailman.2148.1257465449.8694.java400-l@xxxxxxxxxxxx>...
Gary L Peskin wrote:
In that case, I would look at the stuff going into your
InputStream
"is".
How is it getting in there? It's possible that RPG uses an
EBCDIC
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
is
using RPG's EXTPROC(*JAVA) support, the RPG runtime would be
handling
any necessary conversions between the RPG EBCDIC and the Java
ASCII
for
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-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.