Previous Page | Next Page

Options for Commands, Statements, and Procedures for NLS

TRANTAB Statement



Specifies the translation table to use when you transcode character data in order to export or transfer a SAS file.
Valid in: CPORT Procedure, UPLOAD procedure, DOWNLOAD procedure
PROC CPORT: Used when you export a SAS file across a network
PROC UPLOAD and PROC DOWNLOAD: Used when you transfer a SAS file across a network
Requirements for UPLOAD and DOWNLOAD: To use the TRANTAB statement, you must specify the INCAT= and OUTCAT= options in the PROC UPLOAD or PROC DOWNLOAD statement.
Restrictions: You can specify only one translation table per TRANTAB statement. To specify additional translation tables, use additional TRANTAB statements.
Interaction: The TRANTAB statement specifies a customized translation table (for example, to map an EBCDIC character to an ASCII character) to apply to the character set in the SAS file that is being exported or transferred. The TRANTAB= system option specifies a translation table to use for the SAS session, including file transfers.

Syntax
Arguments
Options
Examples
Example 1: Program
Example 2: SAS Log
See Also

Syntax

TRANTAB NAME=translation-table-name <TYPE=(etype-list) <OPT=DISP | SRC | (DISP SRC)>>;

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 statement for backward compatibility. However, using the LOCALE= system option is preferred in later SAS releases.

For more information, see TS-639, Data Conversion Issues in V6-V8. This technical support note provides information for customers using non-English languages http://support.sas.com/techsup/technote/ts639.pdf.  [cautionend]


Arguments

NAME=translation-table-name

specifies the name of the translation table to apply to the SAS catalog that you want to export (PROC CPORT) or transfer (PROC UPLOAD or PROC DOWNLOAD). The translation-table-name that you specify as the name of a catalog entry in either your SASUSER.PROFILE catalog or the SASHELP.HOST catalog. The SASUSER.PROFILE catalog is searched first, and then the SASHELP.HOST catalog is searched.

In most cases, the default translation table is the correct one to use, but you might need to apply additional translation tables if, for example, your application requires different national language characters.

You can specify a translation table other than the default in two ways:

  • To specify a translation table for an invocation of the procedure, use the TRANTAB statement in the procedure, as appropriate.

  • To specify a translation table for your entire SAS session or job (including all file exports or transfers), use the TRANTAB= system option.


Options

TYPE=(etype-list)

applies the translation table only to the entries with the type or types that you specify. The etype-list can be one or more entry types. Examples of catalog entry types include DATA and FORMAT. If etype-list is a simple entry type, omit the parentheses.

By default, the UPLOAD, DOWNLOAD, and CPORT procedures apply the translation table to all specified catalog entries.

OPT=DISP | SRC | (DISP SRC)

OPT=DISP

applies the translation table only to the specified catalog entries, which produce window displays.

OPT=SRC

applies the translation table only to the specified catalog entries that are of the type SOURCE.

OPT=(DISP SRC)

applies the translation table only to the specified catalog entries that either produce window displays or are of type SOURCE.

If you do not specify the OPT= option, the UPLOAD or DOWNLOAD procedure applies the translation table to all of the entries in the catalog that you specify.

Default: PROC CPORT, PROC UPLOAD, and PROC DOWNLOAD apply the translation table to all entries and data sets in the specified catalog.

Examples

Procedure features:

PROC CPORT statement option: FILE=

TRANTAB statement option: TYPE=


This example shows how to apply a customized translation table to the transport file before PROC CPORT exports it. For this example, assume that you have already created a customized translation table called TTABLE1.


Example 1: Program

 Note about code
libname source 'SAS data-library';
filename tranfile 'transport-file'
                   host-option(s)-for-file-characteristics;
 Note about code
proc cport catalog=source.formats file=tranfile;
   trantab name=ttable1 type=(format);
run;

Example 2: SAS Log

NOTE: Proc CPORT begins to transport catalog SOURCE.FORMATS
NOTE: The catalog has 2 entries and its maximum logical record length is 104.
NOTE: Entry REVENUE.FORMAT has been transported.
NOTE: Entry DEPT.FORMATC has been transported.

See Also

Conceptual Information:

Transcoding for NLS

System Options:

TRANTAB= System Option

Procedures:

The TRANTAB Procedure

CPORT in Base SAS Procedures Guide

UPLOAD in SAS/CONNECT User's Guide

DOWNLOAD in SAS/CONNECT User's Guide

Previous Page | Next Page | Top of Page