If you're on UniVerse and on release 10.x (UD 6.x may have the same
functionality, check the IBM reference manuals, for UV it's in the
"Basic Extensions" manual) then you should be able to use the ENCODE()
function.  Your code might look a bit like this:


      E.DLOC   = '1'         ; * data passed directly
      E.RLOC   = '1'         ; * result in a string
      E.ALG    = 'Base64'
      E.DATA   = ''
      E.RESULT = ''

      * Note that E.DATA needs to be delimited by a CHAR(10) at the end
for some reason
      E.DATA = My.Base64.Encoded.string:CHAR(10)

      E.RESULT = ''
      E.ACTION = '2'       ; * Base64 decode
      E.STATUS = ENCODE(E.ALG, E.ACTION, E.DATA, E.DLOC, E.RESULT,
E.RLOC)
        IF E.STATUS EQ '0' THEN
         CRT ' Plain Text ':QUOTE(E.RESULT)
      END ELSE
         GOSUB DISPLAY.ENCODE.STATUS
      END


HTH


Mike

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> David Tod Sigafoos
> Sent: Tuesday, 19 April 2005 05:32
> To: [email protected]
> Subject: [U2] Decoding 64Base string
> 
> I am looking for information on decoding a base64 string.  We 
> will be receiving this back with an xml stream from a client. 
>  The base64 string is a image which we must decode and write out.
> 
> Anyone having done this?  Would love to talk to you about it 
> or possibly get snippets to get us on our way.
> 
> I have searched the u2ug site but found nothing
> 
> thanks ..
>   
> 
> --
> DSig
> David Tod Sigafoos
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
> 
The information contained in this Internet Email message is intended
for the addressee only and may contain privileged information, but not
necessarily the official views or opinions of the New Zealand Defence Force.
If you are not the intended recipient you must not use, disclose, copy or 
distribute this message or the information in it.

If you have received this message in error, please Email or telephone
the sender immediately.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to