# Conversion Tables/Custom Code Conversion

With this feature, you can convert text files between various character-set specifications.

Note: The character conversion tables are for single byte conversion. If you need to do double byte conversions, there are two options:

1. Convert the file using the iconv utility, then send the file as a binary file.

2. Send a file to Platform Server for z/OS, then use Platform Server for z/OS to perform double byte conversion. For more information on double byte conversion, see LCT and RCT parameters in the TIBCO Managed File Transfer Platform Server for z/OS User's Guide.

The platform server provides the following four conversion tables:

Conversion Table | Description
--- | ---
Comtblg.classic | The old comtblg.dat shipped with previous versions (before version 7.1).
Comtblg.cp037 | Extended ASCII table that is based on IBM Code page 037.
Comtblg.cp1047 | Extended ASCII table that is based on IBM Code page 1047.
Comtblg.dat | ASCII/EBCIDIC table used by the platform server at run time. (By default a copy of Comtblg.cp037.)

MFTPS_install/Comtblg.dat contains the following table which converts data from ASCII to EBCDIC and vice versa:

To activate conversion tables, you have to turn the ASCII_to_EBCDIC parameter on. For more information, see ASCII_to_EBCDIC parameter in z/OS Specific Transfer Parameters.

When this parameter is on, it uses the file names that are specified in the ConvTbl, LocalCTFile, and RemoteCTFile parameters. For more information, see CONVTBL, LocalCTFile and RemoteCTFile in Optional Transfer Parameters.

You can define the ConvTbl parameter in the config.txt file to specify the default conversion table for all transfers. If this parameter is not set, the $CFROOT/Comtblg.dat file is used.

You can specify two conversion tables: one on the local side, and one on the remote side. In this way, you can have a standard character set for all types of transfer, without having a conversion table between every two possible character sets. To identify which table translates for send and which translates for receive during editing, it is good practice that you place a few lines between the two tables.

You can define the local conversion table using the LocalCTFile parameter in a transfer template or the lct parameter on the command line. Similarly, you can define the remote conversion table using the RemoteCTFile parameter in a transfer template or the rct parameter on the command line. The maximum lengths of the lct and rct parameters are both 16 characters. However, they support file names relative to the current working directory and the $CFROOT directory on the local side.

- For UNIX, the directories are searched in the following order: the directory where CyberResp is running on the remote side, the $CFROOT environment variable if it is defined in the environment of the CyberResp process, and then in the /mftps directory.
- For z/OS, the platform server searches an in-core table that has to be enabled at startup or through an operator command.
- For Windows, the platform server searches in the working directory.

Note: If both the ConvTbl and the LocalCTFile parameters are specified, the LocalCTFile parameter overrides the ConvTbl parameter. The platform server does not convert the file twice. The ConvTbl parameter is not affected by RemoteCTFile.

For a File Send, the top half of the conversion table is used. For a File Receive, the bottom half of the conversion table is used. For example, in a send transfer, if both the LocalCTFile and RemoteCTFile parameters are used, then the top half of local conversion table file is used on the local side, and the bottom half of remote conversion table file is used on the remote side. The reverse is true for a receive transfer.

Nodes can also support both local and remote conversion tables. Unless the parameters are overridden on the command line, conversion tables are used whenever that node is specified.

Copyright © 2022. TIBCO Software Inc. All Rights Reserved.