Adding Language Support for DB2/400 (Magic xpi 3.x)
DB2/400 data is saved on IBM i as Extended Binary Coded Decimal Interchange Code (EBCDIC). EBCDIC encoding is a character encoding set used by IBM. Almost every language has it is own EBCDIC code which is represented by an IBM character set ID CCSID. For example:
|
|
English
|
CCSID 37
|
German
|
CCSID 273
|
French
|
CCSID 298
|
There are new CCSID codes that represent a group of languages, as opposed to a single language.
To process non-Unicode DB2/400 data, Magic xpi needs to translate it from EBCDIC to ANSII, and vice versa.
This translation is done by Magic xpi through a EBCDIC to ANSII translation table. The translation table is set through the .ini file. You can control it in the AS/400 entry's DBMS properties via the LANGUAGE=AS2EB.XXX keyword (where XXX represents a short name of the language, for example ENG for English, GER for German, etc).
Magic xpi is supplied with a list of translation tables. You can also build your own translation tables, or order them from the MSE support channel. By default, Magic xpi uses the AS2EB.ENG translation.
The collecting sequence (sorting) of EBCDIC data is different from ANSII. To handle this difference, Magic xpi uses an alternative collecting sequence table, acs.xxx. By default, this is set to acs.eng. If you select a different AS2EB.XXX translation, you should consider changing the alternative collecting sequence table as well.
If necessary, make the following changes to the Configuration (Magic.ini) file:
-
Go to the [MAGIC_DBMS] section in the Magic.ini file.
-
In the line that starts with AS400, find the entry LANGUAGE=AS2EB.ENG. If your system language is not English, change the *.ENG file extension to match the language supported by your DB2/400 database.
-
Add a comma (,) at the end of the AS400 line and then type the correct ASCII/EDBCDIC translation path to the end of the line. For example, for German add support/ACS400.GER.
-
In the line that starts with DB2/400, add a comma (,) at the end of the line and then type the correct ASCII/EDBCDIC translation path to the end of the line. For example, for German add support/ACS400.GER.
Note:
|
The extension added to the LANGUAGE entry in step 2 must be the same as the extension used in the ASCII/EDBCDIC translation path in steps 3 and 4.
|
|
-
Add another comma (,) and add the correct ACS file. For example, for German add support/ACS400.GER.
Unicode is a standard encoding system for computers to display text and symbols from all writing systems around the world. It provides a unique number for every character regardless of the platform, the program, or the language.
There are several types of Unicode encoding, but i5/OS supports only UCS-2 (CCSID 13488) and UTF-16 (CCSID 1200 ) Unicode. Of the two, UTF-16 is not compatible with many standard programming techniques. IBM i supports Unicode throughout its operating system and programs. Magic xpi supports UCS-2 encoding. The Unicode data fields are implemented in DB2/400 as GRAPHIC fields.

There is no translation table required for processing DB2/400 Unicode data. If you use Unicode and non-Unicode data fields in the same database, the EBCDIC to ANSII translation is still required.
The following keyword has to be added into DBMS settings of the .ini file to support Unicode values in the SQL and ISAM statements: SUPPORT_UNICODE_STMT
Make the following changes to the Windows Environment Variables:
-
Open the Windows System Properties.
-
Click the Advanced tab.
-
Click Environment Variables.
-
In the User variables for the <name of computer> section, select iBOLT_LANGUAGE and click Edit.
-
If this variable is not in the list, click New and type iBOLT_LANGUAGE in the Variable name field. You do not need to click Edit. Add the path described in the next step in the Variable value field. Click OK to close the dialog box, then continue with the final step.
-
Add the correct ASCII/EDBCDIC translation path in the Variable value field. For example, if you are using German then add support/AS2EB.GER.
-
Click OK to close the dialog box.
-
Click OK to close the Windows Environment Variables.
You should also consider to setting the following regional settings in the .ini file:
[MAGIC_ENV]
ThousandSeparator =
DecimalSeparator =
DateSeparator =
TimeSeparator =
ScreenModePrompt =
[MAGIC_LOGICAL_NAMES]
date_format=YYYY-MM-DD