TRANTAB Function

Transcodes data by using the specified translation table.
Category: Character

Syntax

TRANTAB(string,trantab_name)

Required Arguments

string
input data that is transcoded.
trantab_name
translation table. Translation tables were introduced in SAS 6 to support the requirements of national languages. SAS 8.2 introduced the LOCALE= system option as an improvement on direct use of translation tables. SAS 9.2 supports the TRANTAB function for backward compatibility. However, using the LOCALE= system option is preferred in later SAS releases.

Details

The TRANTAB function transcodes a data string by using a translation table to remap the characters from one internal representation to another. The encoding of the data in the input string must match the encoding of table 1 in the translation table. The TRANTAB function remaps the data from the encoding using table 1.
CAUTION:
Only experienced SAS users should use the TRANTAB function.

Example

The following example uses a translation table that transcodes data that is encoded in Latin2 to an uppercase Latin2 encoding:
Statements
Result
teststrg=trantab('testing','lat2_ucs');
put teststrg;
TESTING

See Also

Procedures: