TPX Session Management for z/OS

 View Only

How to transfer the EURO-sign between ASCII and EBCDIC

  • 1.  How to transfer the EURO-sign between ASCII and EBCDIC

    Posted Apr 29, 2016 10:08 AM

    A: Transfer from EBCDIC (z/OS) to ASCII (Windows, Unix)

     

    Let’s assume you transfer a file from z/OS to Windows. On z/OS you need to use Codepage
    1140 instead of 037 (or 1141 instead of 273 for german language). The EURO-sign
    € is represented by code x'9F'.

    On Windows the EURO-sign is represented by code x'80' (ISO 8859-1).

     

    Here is what you need to do:

    1. Specify INTERNAL_CONVERSION_TABLE=NO in the xcom.glb on your Windows XCOM.
    2. Restart the XCOM Server on Windows to let this change become effective.
    3. In XCOM subfolder /Convtab there are two files: atoe.tab (for translation from
      ASCII to EBCDIC) and etoa.tab (for translation from EBCDIC to ASCII).
      Create copies of each file and give them names which are identical but with the same
      three-character prefix, e.g. euretoa.tab and euratoe.tab. The prefix here is 'eur'; we need
      this prefix in a moment. Now open the euretoa.tab file. It contains 256 lines, each line
      contains a hexadecomal value. The value in the first line represents the
      character to which the EBCDIC value x'00' is translated to, this is 0x00. The
      value in the second line represents the character to which the EBCDIC value
      x'01' is translated to, this is 0x01 - and so on.
      And where is our EURO-sign? In EBCDIC the EURO-sign is represented by x'9F'. This
      is the 160th character in the list (as x'9F' is 159 in decimal and we need to
      add 1 as the list starts with x'00' - which is decimal 0 - in line 1). Now go
      to line 160 and you find the ASCII value to which x'9F' will be translated - this
      is 0x50. When you do a transfer with no special translation table you will see
      that x'9F' is translated to x'50'. But we need to translate x'9F' into x'80' on
      ASCII as x'80' is the representation of the EURO-sign on ASCII. So change the
      value 0x50 into 0x80 and save the change.
    4. On z/OS go into the XCOM Job and add CODETABL=EUR into SYSIN01. In parameter CODETABL
      you specify the prefix of the changed translation tables in Step 3. - I used
      EUR.
    5. When you now transfer data from EBCDIC to ASCII the EURO-sign is translated correct.

     

    B: Transfer from ASCII to EBCDIC

     

    Here is what you need to do:

    1. Specify INTERNAL_CONVERSION_TABLE=NO in the xcom.glb on your Windows XCOM.
    2. Restart the XCOM Server on Windows to let this change become effective.
    3. In XCOM subfolder /Convtab there are two files: atoe.tab (for translation from
      ASCII to EBCDIC) and etoa.tab (for translation from EBCDIC to ASCII). Create
      copies of each file and give them names which are identical but with the same
      three-character prefix, e.g. euretoa.tab and euratoe.tab. The prefix here is
      'eur'; we need this prefix in a moment.
      Now open the euratoe.tab file. It contains 256 lines, each line contains a hexadecomal
      value. The EURO-sign is represented by x'80'. So you need to go to line 129 of
      this file and change the value in that line to 0x9F; the EBCDIC code of the
      EURO-sign. Finally save the change.
    4. On z/OS go into the XCOM Job and add CODETABL=EUR into SYSIN01. In parameter CODETABL
      you specify the prefix of the changed translation tables in Step 3. - I used EUR.
    5. When you now transfer data from ASCII to EBCDIC the EURO-sign is translated correct.