Syntax for Creating Translation Tables

Syntax:

TRANSLATION tablename

sourcevalue -> destinationvalue

Where

Is

tablename

The name of a table you create. The name must start with a letter followed by letters, numbers, or underscores.

This is the name you will enter for the TRANSLATE option in the FORMAT declaration.

sourcevalue

The value that you want to translate. This value can be in any of the following forms:

  • Decimal value of a character
  • Hexadecimal value of a character, 0xnn where n is 0–9 or A–F
  • Quoted character

->

The required characters between the source value and the destination value.

destinationvalue

The replacement value for the source. This value can be in any of the following forms:

  • Decimal value of a character
  • Hexadecimal value of a character, 0xnn where n is 0–9 or A–F
  • Quoted character

Example:

Translation CRToLF % Convert Carriage Return to Line Feed

013 -> 037 % ? -> ?

—or—

0x0D -> 0x25

The percent sign (%) designates a comment.