On 2014-01-12, at 17:58, Gainsford, Allen wrote:
>
> Yes, but what you're seeing as "[]" in your listing above is the
> codepage-1047 [] characters (hex AD/BD). But the Assembler expects
> codepage-037 characters. AD and BD don't correspond to printable characters
> in codepage 037 (or at least not ones that HLASM seems to want to handle; it
> looks to me like they're a capital Y-acute and an umlaut), so it looks like
> it just leaves them alone.
>
> Cheers,
Not much cheer, really. A better test:
I generated a file on Linux with script:
#! /bin/sh
awk '
BEGIN {
printf( "UTF8 CSECT\012" )
for ( C = 0; C <256; ) {
printf( " DC CA\047" )
C0 = C
for ( I = 0; I < 8; I++ ) {
CC = C
if ( C==10 || C==0 ) CC = 63 # Suppress LF and NUL.
if ( C==38 || C==39 ) printf( "%c", CC ) # Double "&" and
apostrophe.
printf( "%c", CC )
C++ }
printf( "\047 %2x\012", C0 ) }
printf( " END\012" ) } ' # | iconv -f IBM819 -t IBM037
# #####
FTP to z/OS in BINARY
Convert with: "iconv -f ISO8859-1 -t IBM-037"
This leaves a few glitches at characters NUL, LF, and NL.
Otherwise, it should be CP819 translated to CP037.
Assemble.
In SYSPRINT, I see:
000000 00000 00100 1 UTF8 CSECT
000000 3F010203372D2E2F 2 DC CA'? ' 0
000008 16053F0B0C0D0E0F 3 DC CA' ? ' 8
000010 101112133C3D3226 4 DC CA' ' 10
000018 18193F271C1D1E1F 5 DC CA' ' 18
000020 2021222324252627 6 DC CA' !"#$%&&''' 20
000028 28292A2B2C2D2E2F 7 DC CA'()*+,-./' 28
000030 3031323334353637 8 DC CA'01234567' 30
000038 38393A3B3C3D3E3F 9 DC CA'89:;<=>?' 38
000040 4041424344454647 10 DC CA'@ABCDEFG' 40
000048 48494A4B4C4D4E4F 11 DC CA'HIJKLMNO' 48
000050 5051525354555657 12 DC CA'PQRSTUVW' 50
000058 58595A5B5C5D5E5F 13 DC CA'XYZ \ _' 58
000060 6061626364656667 14 DC CA'`abcdefg' 60
000068 68696A6B6C6D6E6F 15 DC CA'hijklmno' 68
000070 7071727374757677 16 DC CA'pqrstuvw' 70
000078 78797A7B7C7D7E07 17 DC CA'xyz{|}~ ' 78
000080 2021222324250617 18 DC CA' ' 80
000088 28292A2B2C090A1B 19 DC CA' ' 88
000090 30311A3334353608 20 DC CA' ' 90
000098 38393A3B04143EFF 21 DC CA' ' 98
0000A0 41AA4AB19FB26AB5 22 DC CA' ¢ | ' a0
0000A8 BDB49A8A5FCAAFBC 23 DC CA'] ¬ ' a8
0000B0 908FEAFABEA0B6B3 24 DC CA' Æ ' b0
0000B8 9DDA9B8BB7B8B9AB 25 DC CA' ' b8
0000C0 6465626663679E68 26 DC CA' ' c0
0000C8 7471727378757677 27 DC CA' ' c8
0000D0 AC69EDEEEBEFECBF 28 DC CA' ç ' d0
0000D8 80FDFEFBFCADAE59 29 DC CA' [ ' d8
0000E0 4445424643479C48 30 DC CA' ' e0
0000E8 5451525358555657 31 DC CA' ' e8
0000F0 8C49CDCECBCFCCE1 32 DC CA' �� É ' f0
0000F8 70DDDEDBDC8D8EDF 33 DC CA' ' f8
34 END
This is pretty much OK from X'20' to X'7E'. Outside that range
it's nonsensical. Have I done something wrong? What's happening
here? I see:
ASCII data in character constants
HLASM Language Reference
SC26-4940-06
For Character ASCII (CA) constants the character string is converted to ASCII
(code page 819), assuming that the characters in the nominal value are
represented in code page 37. Any paired occurrences of ampersands and
apostrophes are converted to a single occurrence of such a character prior to
conversion. The assembler then maps each EBCDIC character into its ASCII
equivalent. This constant is not modified by the TRANSLATE option.
That is unequivocal. CP037 and CP819 are both 256-character pages.
the translation between them should be straightforward.
*But* this is the z/OS 2.1 HLASM reference. The highest z/OS I have is
1.13. And the 1.13 HLASM Reference makes no mention of CP819; it simply
says ASCII. Has this changed in the interim? Damn! Where's the Summary
of Changes? Where are the revision bars?
But even if it's merely USASCII, it should be intact from x'00' to X'1F'.
-- gil