DBCSTAB Procedure

Example 1: Creating a Conversion Table with the DBCSTAB Procedure

Features:
PROC DBCSTAB statement options: :
CATALOG=
DBLANG=
BASETYPE=
VERIFY
The following example creates a Japanese translation table called CUSTAB and demonstrates how the TRANTAB option can be used to specify this new translation table. The DBCS, DBCSLANG, and DBCSTYPE options are specified at start up.
/*these parameters are required for the code to work*/
sdsenv m900 —box dntdd
sdssas —dbcs —dbcslang japanese —dbcstype pcms
The TRANTAB data set is created as follows:

Program

data trantab;
      pcms='8342'x; dec='b9b3'x; 
run;
proc dbcstab
      /* name of the new translate table */
          name=custtab
      /* based on pcibm encoding */
          basetype=pcms
      /* data to create the new table */
          data=trantab
      /* japanese language */
          dbcslang=japanese
      /* catalog descriptor */
          desc='Modified Japanese Trantab'
      /* where the table is stored */
          catalog=sasuser.dbcs 
      /* checks for invalid DBCS in the new data */ 
          verify;
run;
To specify the translate table, use the TRANTAB option:
options trantab=(,,,,,,,,,custtab);
Translate tables are generally used for DBCS conversion with SAS/CONNECT software, PROC CPORT and PROC CIMPORT, and the DATA step function, KCVT. The TRANTAB= option might be used to specify DBCS translate tables. For SAS release 8.2 and earlier versions, the ninth argument was formerly used to specify the DBCS system table. However, for SAS 9 and later versions, instead of using the ninth argument, the SAS system uses a system table that is contained in a loadable module. Japanese, Korean, Chinese, and Taiwanese are acceptable for the systab name. The tenth argument specifies the DBCS user table:
options trantab=(,,,,,,,,systab); /* ninth argument */