On Thu, 16 Sep 2021 14:58:17 -0400, Eric D Rossman wrote:
>CSNBXEA uses a default translation table that probably doesn't match the
>code page that your REXX exec is encoded in.
>
>If you SAY "ASCII in hex: "||C2D(text_ASCII), I suspect you will not see
>the same values as I pasted.
>
You might make your code more robust (and easier to review) by coding"
Const.ASCII =XRANGE( '20'X, '7E'X')XRANGE( 'A0'X, 'FE'X')
and using CSNBXEA to compute Const.EBCDIC. (I added the top half
of ISO-Latin.) What about control characters, particularly newlines?
>... For my testing, I used something like:
>
>Const.ASCII =,
>'202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F'X||,
>'404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F'X||,
>'606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E'X;
>Const.EBCDIC =,
>' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^'||,
>'_`abcdefghijklmnopqrstuvwxyz{|}~'
>
>text_EBCDIC = 'ABCabcABCabcABC12345678901234567' ;
>text_ASCII = TRANSLATE(text_EBCDIC,Const.ASCII,Const.EBCDIC);
>
>CSNBXEA is very limited. z/OS provides real conversion APIs where you
>provide the source and destination code pages.
>
E.g. iconv.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN