Code Page
This chapter describes the OpenFrame/Base code page component.
1. Overview
User data is stored in EBCDIC (or EBCDIK) format in mainframe and in open standard ASCII character set in OpenFrame. Because these two formats are incompatible, mainframe data must be converted from EBCDIC to ASCII code during the migration to OpenFrame. To successfully accomplish this, you need to create and use a code page as a mapping table for code conversion.
2. Migration and Code Conversion
The process of converting resources from their native format on the mainframe to the format used by OpenFrame is called migration. Several different OpenFrame migration processes exist, each focusing on a specific resource type. However, most migration processes share a common task: the conversion of EBCDIC (or EBCDIK) code to ASCII code. OpenFrame provides the dsmigin tool to simplify the code conversion process.
dsmigin uses the Code Page Manager (CPM) component to convert EBCDIC (or EBCDIK) characters to their respective ASCII characters. The CPM module manages the mapping between two different code pages.
|
3. CPM Module
The CPM module manages the mapping between two different code pages. The cpmmgr tool can read the CPM data and display the mapping information for editing. cpmmgr can also be used to test the conversion of a simple sentence or file.
3.1. cpmmgr
When cpmmgr is executed, a user prompt is displayed where you can enter abbreviated commands.
The following is the execution screen of cpmmgr.
OpenFrame Code Page Manager(CPM) Usage: cpmmgr <file> <file> Specify file to manage
Typing "help" at the prompt displays a list of cpmmgr commands and their descriptions.
>> help
Command | Description |
---|---|
cc (Change Code Mapping) |
Replaces a mapping code in the current CPM data with the specified mapping code. |
cf (Convert File) |
Converts a file using the current CPM data. |
ct (Convert Text) |
Converts the specified string or hexadecimal value using the current CPM data. |
pd (Print Double-Byte Code Mapping) |
Prints the two-byte code mapping information stored in the current CPM data. |
ps (Print Single-Byte Code Mapping) |
Prints the one-byte code mapping information stored in the current CPM data. |
pr (Print Single/Double Byte Code Range) |
Prints the mapping range in the current CPM data. |
pc (Print Code Not Exist in CPM) |
Receives two-byte code information as a file and prints the two-byte mapping information that is not in the current CPM data. |
pt (Print Mapping Table) |
Prints the code mapping information stored in the current CPM data as a file. |
rr (Reset Single/Double Byte Code Range) |
Resets the byte code range based on the current code page, and prints a new code page. |
cr (Change Single/Double Byte Code Range) |
Changes the byte code range of the current code page, and prints a new code page. |