Message transliteration

Transliterating is the process of replacing all instances of characters in one class with corresponding characters in another class. A common example is to convert a message from the EBCDIC character set into ASCII. In this case, every instance of the EBCDIC 'A' character (0xc1) becomes ASCII 'A' (0x41); EBCDIC 'B' (0xc2) becomes ASCII 'B' (0x42), and so on.

A character map table describes a transliteration from one character set to another. It is represented by a list of 256 values. The input character value serves as the index into the list. The value at that position is the transliterated value. In the preceding example, the (0xc1)th (193) entry would be 0x41 and the 0xc2th (194) would be 0x42.

Each character-map table:

  • Describes a one-way mapping. Any number of input characters (indices) can map to the same value.
  • Has a unique name. The adddatamap command associates a name with a new table.

For readability, the elements are in lines of eight hex characters. The lines are arranged in pairs to make 16 sets of 16 characters. To find the 0xc1-th element, count down c pairs, starting with 0. Then, count over 1 element, starting with 0.