The Codecomp Utility

The Codecomp utility enables you to create customized mapping tables for EBCDIC/ANSI character set translation.

Codecomp can be used either with or without the /p option in the following way:

  1. With the /p option, specifying one filename with extension .e2a and one with extension .a2e. Codecomp creates these files, which contain the mapping tables used for the current country setting. You can then edit these files to produce your own customized tables.
  2. Without the /p option, specifying the two files produced in step1. A copybook called codeset.cpy, used for building a customized codeset module from mapping files, is produced.

Syntax

>>--codecomp--.----.--filename--.-----------.--><
              +-/p-+            +-filename2-+

where

/p Specifies that the mapping table(s) in use for the current country setting are to be written to the specified file(s)
filename The name of a mapping file. The file must have the extension .e2a for an EBCDIC to ANSI mapping table, or .a2e for an ANSI to EBCDIC mapping table. This file is an output file when the /p option is used, and an input file when it is not.
filename2 The name of a mapping file. The file must have the extension .e2a for an EBCDIC to ANSI mapping table, or .a2e for an ANSI to EBCDIC mapping table. This file is an output file when the /p option is used, and an input file when it is not.

If you specify only a single filename when using the /p option, only the mapping file that you have specified (EBCDIC to ANSI or ANSI to EBCDIC) is produced.

If you specify only a single filename without using the /p option, Codecomp attempts to produce the corresponding mapping table by inverting the one in the file you provide. This can only succeed if the second column in the table contains all values from 0 through 255, as otherwise it would not be possible to produce round-trip conversions.