Record character transcoding

You can transform file records by changing (transcoding) the character set:

See Configure record transformation in Message Handler for the procedure to set transcoding in Message Handler.

See Configure record transformation on pickups and deliveries for the procedure to set transcoding on a PeSIT pickup or delivery.

See Metadata for record file management for a description of the attributes you can use for transcoding.

Note   In your record transformation configurations, you can combine record character transcoding and record format transformation.

EBCDIC-ASCII transcoding

Activator natively provides EBCDIC-to-ASCII and ASCII-to-EBCDIC transcoding.

  • EBCDIC and ASCII are recognized as LocalFileCharSet and VirtualFileCharSet.
  • Native transcoding only works for regular characters (equivalent to 7 bits ASCII - not extended 8 bits ASCII).
  • To perform EBCDIC-to-ASCII transcoding that includes extended characters, you must use Custom transcoding.

Custom transcoding

You can use custom tables to perform nearly any single-byte character transformation. To use a custom table:

  1. Create a table in <Activator_install_directory>/Activator/conf/sbcsTables.
  2. The table must specify the single-byte character equivalent for each of the 256 characters.
  3. Name the table <source char set>-<destination char set>.sbcs.
  4. For examples of file naming and content, look at the examples in <Activator_install_directory>/Activator/conf/sbcsTables.
  5. If the transformation is:
    • bijective, you need only one table. The transformation logic is capable of reversing the table relations.
    • is not bijective, and if you want to do the transformation in both directions, you must provide two tables.

Example

To perform the transcoding a<-->b and A<-->B:

  1. Create a table A-B.sbcs and put it in the conf/sbcstables directory.
  2. You can use the following content for testing purposes. This table is bijective. It can be used either way. The swaps of As and Bs are underlined in bold below.
  3. To use this table while sending, set:
    • LocalFileCharSet = A
    • VirtualFileCharSet = B
    • Virtual and Local FileFormat to type TEXT (variable or fixed)

Java multi-character transformation tables

Custom transcoding is possible using standard Java tables. However, this should be reserved to variable text as the size of each line is likely to change. The same logic is used where you name the source and destination character set. Note that performance may be slow. Refer to Java documentation for necessary details.

Related Links