PreviousRevolve and Mainframe Express Integration Overview of Assembler OptionNext"

Chapter 26: National Language Support

Mainframe Express provides basic national language support for languages other than US English. In particular, it provides support for entering and displaying non-US English character sets in both source code and data files.

When you download source code files (in locale-specific EBCDIC coded character sets) from the mainframe, the specifically supported character sets are translated to the ANSI character set. They are automatically reconverted to the appropriate EBCDIC character set when uploaded again.

Note: This behavior differs from the behavior of many previous Micro Focus COBOL systems, where extended ASCII character sets were used on the PC. A utility mfastoan is provided for converting files from extended ASCII to ANSI on the PC.

Data files are maintained in their native EBCDIC coded character set. This ensures that the correct characters are displayed for each character code. You can build a customized language module that behaves just like the built-in modules for character sets not directly supported.

When you first install Mainframe Express, it defaults to the US English character set. You can change the character set, on a project-by-project basis, on the NLS page of the General page of the Project Settings dialog box. Once you have changed the character set to be the same as that used in the source files for the project, you need not concern yourself further with national language keyboard or display issues, as Mainframe Express handles any necessary conversions automatically.

26.1 Supported Languages

Mainframe Express has built-in support for the following character sets:

Mainframe Express always uses the ANSI character set (as defined by the Windows Latin 1 (ANSI 1252) or Latin 5 (ANSI 1254) code page) when editing source files on the PC. The ANSI character set is the industry standard character set for Windows applications. The mapping between the ANSI coding of a particular character and its corresponding EBCDIC coding is handled automatically when files are transferred between the PC and the mainframe when you use Mainframe Express to transfer the file.

Note: DOS applications, many third-party file transfer utilities and many previous Micro Focus COBOL systems save files using the extended ASCII character set.

The first half of the extended ASCII character set, containing most of the control and unaccented alphanumeric characters, is identical to the first half of the ANSI character set.

Characters in the second half of the extended ASCII character set, however, are determined by the DOS code page in use at the time the file was created and do not necessarily display correctly when viewed using the ANSI character set.

26.2 MFASTOAN Utility

If you have source files on the PC that use extended ASCII, you should convert them to ANSI before using them in Mainframe Express. You can use the mfastoan command-line utility to do this.

The mfastoan utility is only suitable for files which were converted to extended ASCII by earlier versions of Micro Focus products - that is, Micro Focus WorkBench. Since users have often made use of different tailored conversion tables when converting to extended ASCII, no guarantee can be made that this utility will handle all of the character codes correctly. It is strongly recommended that users re-download source files directly into Mainframe Express and use the utility only where unavoidable.

Before using the mfastoan utility, you must set the mfcodeset environment variable to the 4-digit country code corresponding to the DOS code page in use when the file was downloaded or created. Mainframe Express country codes for single-byte character sets follow the CCIT/ITU convention. Built-in support for the following country codes is provided:

Country Code
DEFAULT English (US)
AUTO Uses the operating system default country setting
0031 Dutch
0033 French
0034 Spanish
0039 Italian
0044 English (UK)
0045 Danish
0046 Swedish
0049 German
0351 Portuguese
0358 Finnish
0437 English (US)

For more information, see MFASTOAN utility and Country codes in the online help index.

26.3 Euro Currency Symbol

Each national language supported by Mainframe Express has two alternative code pages. One code page includes the Euro currency symbol and one does not. You can choose to use the code pages that include the Euro symbol by selecting Use Euro-enabled translation tables on the NLS page of the General page on the Project Settings dialog box. Both code pages for each language have the same code number.

26.4 Customizing Character Set Conversion

If you use a character set that is not directly supported by Mainframe Express or if you want to customize one of the built-in conversions, you can create your own conversion tables using the codecomp utility provided. You can build your conversion tables into a codeset module that works in the same way as the built-in conversion support.

To create your new conversion module, you need to create two text files, each containing a table: one table indicates the required EBCDIC to ANSI conversion and the other indicates the corresponding ANSI to EBCDIC conversion. You can use one of the built-in conversion tables as a starting point for your customized version.

When you have completed your two conversion tables, you can use the codecomp utility to create a copybook. A program called csnnnn.cbl is provided to enable you to build a new conversion module using the tables contained in the copybook. You should make a copy of csnnnn.cbl, replacing nnnn with a number to identify your conversion module. Use values 2000 through 2999. All other values are reserved for Micro Focus use. If you build this file to optimize code and copy the resultant csnnnn.gnt file to the \mfide\bin subfolder, your customized character set conversions will be available for use in Mainframe Express. The created file csnnnn.gnt does not support the Euro-enabled transation tables, as described above. If you want to use Euro-enabled translation tables, you will need to supply your own file.

The conversion tables used by a Mainframe Express project are set from the NLS page of the General page on the Project Settings dialog box. You can specify a different country code for each Mainframe Express project.

The conversion tables used by command-line utilities are set from the environment variable mfcodeset. To specify the country code, set the environment variable mfcodeset to the appropriate module number from the Mainframe Express command prompt. Remember that only utilities started from the same command-line session are affected by the setting.

For more information, see Codecomp utility and MFCODESET in the online help index.

26.5 Tips

You should be aware of the following when using the national language support provided:

Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousRevolve and Mainframe Express Integration Overview of Assembler OptionNext"