At 09:17 -0500 on 08/08/2014, Paul Gilmartin wrote about Re: Convert
to base64 help:
<x-charset UTF-8>On Fri, 8 Aug 2014 04:29:20 -0400, Robert A. Rosenberg wrote:
To do this you need to so the following:
1) Use a TRT of the EBCDIC input string to verify that all the
characters have valid ASCII codes. The table would have x'00' if the
code can be mapped to ASCII and x'ff' if not. Hitting any of the
x'ff' entries means problems.
2) MVC the string to a workarea and use TR to convert to ASCII (use a
EBCDIC->ASCII Table).
3) Pass the workarea to the routine.
4) The result while EBCDIC should be the same display TEXT as that
put out by the Internet routine. If you need the ASCII version (as
opposed to just displaying it) you need to use the same EBCDIC->ASCII
table as was used in Step 2 above to get the ASCII version of the
Base64 string - IOW: Redo Step 2 moving the Base64 output to the
workarea.
I recommend omitting step (1) because it has no effect on the output.
I include it as a sanity check since you need to know if you are
attempting to submit a codepoint that will not map to ASCII. If the
TRT puts a x'ff' into R2 you have a string that can not be converted
to ASCII.
Does the assembler routine product EBCDIC codes or ASCII? If the
latter, omit step (4). (Your presumption of EBCDIC may be unjustified.)
I would assume that the output would be EBCDIC since the output would
map to whatever the Base64 character is. You may be correct that the
routine would map the Base64 x'00'-x'3f" to ASCII as opposed to
EBCDIC (it depends on the assembled TR table).
For longer inputs, does the assembler routine block with records
separated by <LF>, by <CR><LF>, or by RDWs?
FTP, SMTP, and HTTP servers with suitable options will perform many
of the needed conversions.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
</x-charset>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN