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



Joe,

Is this an RPG question, a Java question or an OS/400 question? :-)

Anyway, I have the following 'simple' situation:
- Java program on a PC (let's call it JP)
- RPG program, defined as stored procedure, on iSeries (SP)
- another RPG program (RP)

JP calls SP, which calls RP. RP reads informations from files, passes the information in some buffers, defined as data structures to SP. SP passes the buffers as varying length strings to JP. JP decodes the buffers. SP and RP run in a job with CCSID 500; files are also CCSID 500.

The 'special' characters (like é, ë, etc.) appear to be translated correctly. When I use a 5250 session with CCSID 1148 (500 with Euro sign instead of ¤) to put a Euro sign in a file, it comes through as ¤, which is to what you'd expect.

It is hard to tell where the translation from EBCDIC to Unicode is done; in this case I would expect the JDBC layer to handle it.

Joep Beckeringh


Joe Pluta wrote:
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 ...

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.