Code set translation

For applications that are required to translate between ASCII and EBCDIC characters, there is inbuilt support for a number of languages. Code set support is further extended by the ability to utilize translation tables distributed by IBM; these tables provide access to many more languages and character sets.

The environment variable MFCODESET determines the code sets to be translated. By setting this variable to the appropriate country code or CCSID(s) as detailed in Supported country codes, the required translations are made for certain functionality within the product. For example, any program compiled under the CHARSET"EBCDIC" directive uses the value of this variable; programs that call the _CODESET library routine also rely on this variable.

If the code set you require is not part of the built-in support (that is, not listed in Supported country codes), you can install one of the code set tables distributed by IBM; for more information, see Installing CCSID translation tables. Once installed, the support explained above is extended to the newly installed code sets.

If the available code sets still do not match your needs, you can create custom translations between EBCDIC and ASCII using the Codecomp utility.

Note: Certain deployed applications do not require a full COBOL Server product to be available (for example, .NET COBOL applications, and native self-contained applications); if these rely on the inbuilt DBCS translation support (that is, ASCII/EBCDIC translations for code sets 81, 82, 86, 886, and 941), they must be deployed with the appropriate code set mapping files, and then you must use the MFCODESET_DBCSDIR environment variable to locate those files at run time. The required mapping files are located in the etc/codeset sub-directory of the Visual COBOL installation directory. (You only need to deploy the .E2A and .A2E files appropriate to the code set(s) you require.)