|
Scott, Thanks for taking the time to explain it. I would be very interested in your RPG Base64 decoding routine. Just for your information, the 'decode' class accepts and returns a Byte array. Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com Scott Klement <rpg400-l@scottkl ement.com> To Sent by: RPG programming on the AS400 / rpg400-l-bounces@ iSeries <rpg400-l@xxxxxxxxxxxx> midrange.com cc Subject 03/02/2005 12:15 Re: Java and Base64 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> > > No. What you said is the getBytes method of the String class translates > ASCII to EBCDIC. I'm not using that. Thanks for clarifying it for me. > Okay, I'll clarify it further. Anytime RPG receives an alphanumeric field (RPG data type "A") from a Java class, it translates it from ASCII to EBCDIC. You might consider having an array of 3U 0 fields (1-byte integers) that overlays an alphanumeric string (using a data structure to make it overlay.) It will not translate 3U 0 fields! You'll have to change your prototypes so that they accept arrays of 3U 0 instead of alphanumeric strings. You'll need to do that on output only since you'll want the input to be in ASCII so that the ASCII-based Java runtime will view it as valid base64 data, and decode it properly. I'm not familiar with the particular Java classes that you're calling, so I can't give you specifics unless I want to do more research. But please keep in mind that if the output of the decode routine is a Java String object, you won't be able to directly use the result in RPG -- you'll have have to call the getBytes() method of the String class. Likewise, if the input is a Java String object, you'll have to use a String constructor to convert the RPG data to a String object. This is what I mean by convoluted. I've already spent more time & effort trying to explain these Java classes than it would've taken me to send you my pure RPG solution, which I've already written and am familiar with how it works. And the RPG solution would run faster. I'm not saying this to be a jerk. I'm trying to offer you both help and advice. Just say the word, and I'll send you the RPG solution. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.