ASCII to EBCDIC Conversion Table Example

Each ASCII or EBCDIC character is represented by 2 hexadecimal digits. For example, ASCII character "E" is hexadecimal 45 or X'45'. The following table is the ASCII to EBCDIC translation table. The first hexadecimal digit of ASCII character "E" is 4 , so you can go down the table to the row marked 4x. The second hexadecimal digit is 5, so you can move across to the x5 column and in that box is X'C5'

An ASCII character "P" is X'50'. Go down the table to row 5x and move across to column x0 and in the box is X'D7'. Therefore, X'50' is translated to X'D7'.

EBCDIC to ASCII translation works the same way, but uses the lower 16 lines of the comtblg.dat file.

EBCDIC character "Z" is X’E9’. Go down the table to row Ex and move across to column x9 and in the box is X’5A’. Therefore, X’E9’ is translated to X’5A’.

EBCDIC character ")" is X’5D’. Go down the table to row 5x and move across to column xD and in the box is X’29’. Therefore, X’5D’ is translated to X’29’.