Transcodes data by using the specified translation table.
TRANTAB(string,trantab_name)
|
Note: 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. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
- string
-
input data that is transcoded.
- trantab_name
-
translation table.
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.
![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
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 |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.