From: Ewout N Boter

On 28 Sep 2007, Marshal Dunbar wrote:

My guess is you've got CCSID conversion issues.

According to the javadocs, the constructor AS400Text(int) is deprecated.

You should use AS400Text(int, AS400). That constructor will use the
CCSID of the AS/400 system you are connected to.

When I examine the entries in the byte array one by one, with parameter
value SHP78E, the result is as follows:

Position 0: -30
Position 1: -56
Position 2: -41
Position 3: -9
Position 4: -8
Position 5: -59
Position 6: 64
Position 7: 64
Position 8: 64
Position 9: 64

I wonder what the output should look like, if everything would be fine.
What should be the byte value for - for example - a character S converted
to a format that is understandable by the AS400?

The EBCDIC data in the array is just fine, Ewout.

For example, -30 is X'E2', while -9 is X'F7'. If I figure it correctly, you
have X'E2 C8 D7 F7 F8 C5 40 40 40 40', which is exactly what you should

Also, I believe that with the more recent versions of JTOpen that we went
back to not requiring the system anymore. The "most likely" encoding for
the locale is used instead. Otherwise you can specify either the CCSID or
the system or both. But in this case, the converted EBCDIC looks just fine,
so I am a little bit confused. It might be time to turn on a Service Entry
Point to see what's really being passed into the service program.


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.