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



Let's take a simple situation where you wish to pass an array of binary
data from an RPG program to a Java method.  The easiest way to do this
is to pass the value as an array of bytes.  However, there is a
potential gotcha in the definition of the array.

If you specify the array as an array of binary values (3I 0), then there
is no issue.  No translation is done, and the data is received in the
Java method exactly as it appears in the calling RPG module.  However,
if you specify the array as character data (1A), then the data is
translated from EBCDIC to ASCII, which can cause some interesting things
to occur.

So, when passing binary data, always specify (3I 0) or (3U 0) for your
array.

However, let's say you DID want to pass character data, and you DID want
the compiler to automatically translate the data from EBCDIC to ASCII,
and so you defined your array as character data.  Here's the question:
what translation method is used???

Is it indeed one of the many TRNTBL objects on the iSeries?  Or is it a
CCSID-to-CCSID translation a la the iconv API?  And whatever the case,
how does one find out exactly what translation (either TRNTBL or CCSIDs)
is being used?

JOe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.