HLASM Programmer's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Preparing the translation table

HLASM Programmer's Guide
SC26-4941-06

The user-supplied translation table must be assembled and link-edited into a library in the standard load module search order. The full name of the translation table load module name must occupy bytes 257 to 264 of the module. The first byte of the module must be the first byte of the translation table.

A sample translation table to convert a subset of EBCDIC characters from code page 500 into ASCII characters from code page 367 is shown in Figure 1. Specify the TRANSLATE(U1) assembler option to use this translation table.
Figure 1. Sample Translation Table
* Translate from EBCDIC Code Page 500 to ASCII Code Page 368.
* Untranslated characters are set to X'00'.
&LT      SETC  'ASMALTU1'
&LT      CSECT
         DC    256X'00'
         ORG   &LT+64
         DC    X'20'            EBCDIC: X'40' space
         ORG   &LT+75
         DC    X'2E3C282B'      EBCDIC: .<(+
         ORG   &LT+80
         DC    X'26'            EBCDIC: &
         ORG   &LT+90
         DC    X'21242A293B'    EBCDIC: !$*);
         ORG   &LT+96
         DC    X'2D2F'          EBCDIC: -/
         ORG   &LT+106
         DC    X'7C2C255F3E3F'  EBCDIC: ¦,%_>?
         ORG   &LT+121
         DC    X'603A2340273D'  EBCDIC: `:#@'=
         ORG   &LT+127
         DC    X'22'            EBCDIC: "
         ORG   &LT+129
         DC    X'616263646566'  EBCDIC: abcdef
         ORG   &LT+135
         DC    X'676869'        EBCDIC: ghi
         ORG   &LT+145
         DC    X'6A6B6C6D6E6F'  EBCDIC: jklmno
         ORG   &LT+151
         DC    X'707172'        EBCDIC: pqr
         ORG   &LT+159
         DC    X'A4'            EBCDIC: X'A4' euro
         ORG   &LT+161
         DC    X'7E7374757677'  EBCDIC: ~stuvw
         ORG   &LT+167
         DC    X'78797A'        EBCDIC: xyz
         ORG   &LT+186
         DC    X'5B5D'          EBCDIC: []
         ORG   &LT+192
         DC    X'7B41424344'    EBCDIC: {ABCD
         ORG   &LT+197
         DC    X'4546474849'    EBCDIC: EFGHI
         ORG   &LT+208
         DC    X'7D4A4B4C4D'    EBCDIC: }JKLM
         ORG   &LT+213
         DC    X'4E4F505152'    EBCDIC: NOPQR
         ORG   &LT+224
         DC    X'5C'            EBCDIC: \
         ORG   &LT+226
         DC    X'53545556'      EBCDIC: STUV
         ORG   &LT+230
         DC    X'5758595A'      EBCDIC: WXYZ
         ORG   &LT+240
         DC    X'3031323334'    EBCDIC: 01234
         ORG   &LT+245
         DC    X'3536373839'    EBCDIC: 56789
         ORG   &LT+256
         DC    CL8'&LT'         Table name = Module name
         END

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014