DataMagic Technical Column Vol.1

Character code conversion: Mutual conversion between EBCDIC and Shift_JIS

Introduction

There are many situations where differences in character codes can be a nuisance when integrating systems in a multi-platform environment, such as mainframe/midrange computers or UNIX/Linux/Windows. For example, when using mainframe data in a Windows environment, you will need to convert the character code using OS utilities.

However, by using DataMagic, it is possible to convert character codes for different devices in one go, and by combining it with operational tools, it is also possible to automate character code conversion. This provides extremely convenient functionality for users with multi-platform environments such as mainframes, mid-range computers, UNIX, Linux, and Windows, as well as users who need to handle differences in character codes when collaborating with business partners.

  • If you use "HULFT", the above code conversion can be performed during file transfer.

To use this tip, you must have DataMagic installed on your computer. For information on where to get DataMagic and how to install it, please refer to the separate article "Installing DataMagic."

How to operate

Step 1 - Prepare the text data to be converted

First, prepare the mainframe data. Once the data is ready, save it in the following folder on the PC where DataMagic is installed.
C:\work\SAMPLE1\ (saved with the file name "in")

  • In this TIPS, we will use fixed-length data in IBM (zOS) character code.

»Download the source data (Note: The sample file is in zip format. Please unzip it before use.)

Step 2 - Download and configure DataMagic script file.

To convert IBM mainframe data to Shift_JIS, download the script file below and save it in the folder where DataMagic is installed: C:\work\SAMPLE1\ (save it as "sample1.igen")

Launch DataMagic management screen and import the downloaded script file into DataMagic. To import, click the [Import Management Information] icon under [Tools] on the start screen. Specify the downloaded file on the Import Management Information screen and click the Import button. If the import is successful, the ID SAMPLE1 will be registered on the Data Processing Information List screen.

»Download the script file (Note: The sample file is in zip format. Please unzip it before use.)

Step 3 - Run DataMagic

Double-click the data processing information ID SAMPLE1 registered in step 2 and confirm that the file names for the input and output settings are set correctly. DataMagic supports both command launch and GUI launch. (In this example, we will run it from the screen.) To run it from the screen, open the data processing information ID SAMPLE1 and click the "Run" button at the top of the screen.

Step 4 - Check the execution results

When execution is complete in step 3, a file called "out" will be created in C:\work\SAMPLE1\, which is specified in the output settings. Please check this file using an editor such as Notepad.

lastly

This time we performed a conversion from EBCDIC to Shift_JIS, but DataMagic supports a wide range of other character code systems. To convert character codes other than those for IBM mainframes, you can change the data processing information in step 2 and prepare the appropriate input file for each model. DataMagic can also be launched as a command, so its uses are even greater when used in conjunction with a job management tool. We encourage you to download DataMagic trial version and try out the technical column explanations.

  • The trial version is free to use for 60 days.
  • After you sign up for the trial version, you will receive 90 days of free technical support.
kanji character code conversion: Shift_JIS⇔UTF-16 (not supported HULFT7)⇔UTF-8⇔EUC⇔NEC Kanji⇔IBM Kanji⇔JEF⇔KEIS⇔JIS (not supported HULFT7)⇔Shift_JIS, 1-byte code conversion: ASCII⇔ASPEN⇔Kana⇔IBM English lowercase⇔IBM English lowercase extended⇔NEC Kana⇔English lowercase⇔User table⇔ASCII

DataMagic Column List

Related Content

Return to column list