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



On 7/11/2011 8:14 AM, john e wrote:
And... i know it will never, ever, be fixed, because nobody will complain.
Maybe you, me, a couple others on this thread, but the "audience"is just
tooo very small for IBM.
We just have to be thankful that there is something like RPG/Java
integration.


On Mon, Jul 11, 2011 at 3:10 PM, john e<whattssonn@xxxxxxxxx> wrote:

Joe,

I have one problem with RPG and Java integration however, a bit off-topic,
but anyway. An alphanumeric field in RPG seems to be always translated to a
byte-array, instead of a String. Then, RPG to Java support always assumes
the field contains text, and thus always translates the contents to UTF-16.
This is not correct. When just want to pass a field with bytes i can't do
that, because it gets translated. The other way around would be better,
never translate it automatically, and when it contains text i can (manually
by invoking a routine) translate ebcdic to utf-16 and pass that. This is one
example of integration, which is ok, but still causing headaches because of
the "different" (i.e. ecbdic etc) nature of it. This always translating
alpha fields to byte-arrays (not Strings but byte-arrays) is not correct. It
seems like it wasn't well thought out.

This simply isn't true. If you want to pass untranslated data, pass it as an array of 3u0. I do it all the time and it works perfectly. But regardless, a character field is most definitely NOT a string! It is an array of character data. You pass the data to Java, and then create a string from those bytes, and that's Java's job. You can also do it in your RPG program by calling the appropriate String method.

Personally, I think the integration of String and RPG CCSID is actually very good.


Developing on the AS/400 and integrating with the rest of the world always
seems problematic. With or without first-class support for JNI (which RPG
has and is rather unique but.... doesn't work without hassles, again!)

And from my standpoint, the IBM i is the most open platform available and talks to just about everybody. You can access it via web service or ODBC or even direct calls to ILE through the Java toolbox. Few platforms provide anything like the connectivity of the i.

Joe

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.