CPORT Procedure

Example 4: Applying a Translation Table

Features:

PROC CPORT statement option:: FILE=

TRANTAB statement option:: TYPE=

Details

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.

Program

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

Program Description

Assign library references. The LIBNAME and FILENAME statements assign a libref for the source library and a fileref for the transport file, respectively.
libname source 'SAS-data-library';
filename tranfile 'transport-file'
                  
host-option(s)-for-file-characteristics;
Apply the translation specifics. The TRANTAB statement applies the translation that you specify with the customized translation table TTABLE1. TYPE= limits the translation to FORMAT entries.
proc cport catalog=source.formats file=tranfile;
   trantab name=ttable1 type=(format);
run;

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.