Examples of TRANSLATETABLE Declarations

The following example translates the letters L to G, E to O, A to L, and D to D. All other characters are translated to the character whose binary representation has all bits equal to 0 (zero). Both the source and the destination characters are of the default character type.

TRANSLATETABLE ALCHEMY ("LEAD" TO "GOLD")

The following example translates all EBCDIC characters to themselves except for the lowercase letters, which it translates to uppercase letters.

TRANSLATETABLE UPCASE (EBCDIC TO EBCDIC,
                      "abcdefghijklmnopqrstuvwxyz" TO
                      "ABCDEFGHIJKLMNOPQRSTUVWXYZ")

The following example translates all EBCDIC characters to themselves except for the left parenthesis ((), which is translated to the left square bracket ([).

TRANSLATETABLE PAREN_TO_BRACKET (EBCDIC TO EBCDIC, 8"(" TO 8"[")

The following example translates all EBCDIC characters to themselves except for the digits, which it translates to periods (.).

TRANSLATETABLE NUMBERS_TO_PERIODS (EBCDIC TO EBCDIC,
                                   "0123456789" TO ".")