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



--
[ Picked text/plain from multipart/alternative ]

 Hi,
Thanks for the reply, i knew you that base 64 had no problem with EBDIC (at 
least this :)), only the c source contanis many questions that are ascii 
dependent (something like  return(((cc >= 33) && (cc <= 60)) || ((cc >= 62) && 
(cc <= 126))) AND  something like this if ((dd == '\n') || (dd == '\r') || (dd 
== '\0')) {;) so we need to prot it carefully this is doable however i tried to 
make it shorter.
Thanks again for your reply
  Scott Klement <klemscot@klements.com> wrote:
I've written base64 encoders & decoders in RPG IV and Visual Basic.
Unfortunately, I'm not allowed to share this code as I do not own it, it's
owned by the company who paid me to write it.

However, open-source/public-domain base64 utilities (mostly written in C)
are widely available on the Internet. Here's a link to one such utility:
http://www.fourmilab.ch/webtools/base64/

FWIW, base64 works just great in EBCDIC. Unlike uuencode, base64 attempts
to only use invariant characters so that it'll work with any charset. Of
course, if you have an ASCII file that you base64 decode on an EBCDIC
machine, the result will be still be in ASCII -- that's the whole point of
base64, to maintain the exact same binary values when sending a file
through e-mail. If you need it to be EBCDIC, your next step might be
to call the QDCXLATE API. Or simply run it through an an existing tool
like CPYFRMSTMF to convert it.

Good luck!

On Mon, 25 Mar 2002, shahar mor wrote:
>
> Hi all,
>
> I need to encode text to base64 in order to send string to remote ascii
> system.
>
> I also need to decode base64 to text (origin is ascii 819)
>
> The input text will be in ccsid 819. I downloaded some sources from the
> net but all of the sources did not work well with the as400 ebcdic
> environment.
>
> Just wondered is someone from the group solved this and dont mind to
> share the code (mi,c or rpg are all welcomed)
>
> Thanks in advance
>

_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/mi400
or email: MI400-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.


Shahar mor
consultant


---------------------------------
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®


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.