You can create a custom code page for 3270 and 5250 models by modifying any of the sample code page files provided with Host Integrator. By default, these examples are located in <VHI folder>\codepage folder for the Design Tool.
The basic steps for creating and implementing a custom code page are:
If, for example, you want to create a custom code page that has Canadian French settings except for the keyboard type, you could change the keyboard type from CAI to USB and then save it as custom.codepage.
IBMAS400Keyboard=USB // AS/400 Keyboard type (custom)
The lower portion of the code page sample is a series of character mappings. A character mapping consists of 3 values on a single line, separated by spaces or commas:
In the samples, mappings that are the same as the US English default are commented out with // at the beginning of the line. For example, the French.codepage.sample has H44 mapped to W '@' and U '@' for the 'commercial at' sign and is not commented out. (In US English, H44 is mapped to lowercase a with a grave accent sign.) You could create a custom code page based on the French code page, with a modification that returns H44 to the US English default.
After creating and saving the code page and then restarting the Host Integrator server or Design Tool, look at the log file for the code page: <Host Integrator install folder>\codepage\codepage.log.
When the code page is deployed successfully, the log looks like this:
--------------------------------------------------------------------------- Custom codepage logfile opened: Thu Jun 22 08:17:18 2006 --------------------------------------------------------------------------- Info Duplicate character mapping: We8 ==> U0e48 Info Duplicate character mapping: We9 ==> U0e49 Info Duplicate character mapping: Wea ==> U0e4a Info Duplicate character mapping: Web ==> U0e4b Info Duplicate character mapping: Wec ==> U0e4c Info === Read 221 Lines of text Info === Found 99 host character mappings Info +Added Mapping: H41 <==> Wa0 … … Info === Found 94 unicode character mappings Info +Added Mapping: : W1d <==> U00a2 Info +Added Mapping: : W1e <==> U00a6 --------------------------------------------------------------------------- Custom codepage logfile closed: Thu Jun 22 08:17:18 2006 ---------------------------------------------------------------------------
When a code page has errors, the log file includes warnings such as the ones shown below:
Warn Line 11 Unrecognized property 'MyProperty'
Warn Line 20 !Host value invalid or out-of-range. Warn Line 20 !Windows value invalid or out-of-range Warn Line 20 !Unicode value invalid or out-of-range. Warn Line 20 !Character mapping ignored "H3F U10000"
Warn Line 22 !Host value invalid or out-of-range. Warn Line 22 !Windows value invalid or out-of-range Warn Line 22 !Unicode value invalid or out-of-range. Warn Line 22 !Character mapping ignored "HH WW UU"