DataMagic Technical Column Vol.7

<Distribution BMS ⇒ CSV conversion>

Introduction

Distribution BMS (short for Distribution Business Message Standard) is a new guideline for electronic commerce (EDI) created by industry groups such as the Japan Chain Stores Association (JCA) and the Japan Supermarket Association as part of the Ministry of Economy, Trade and Industry's Distribution System Standardization Project. The widespread adoption of Distribution BMS is expected to lead to improved operational efficiency and cost reductions throughout the entire distribution industry.

Distribution BMS uses "XML" as the message representation format, so if the application cannot directly handle XML data, it must be converted into an existing in-house format.

By utilizing DataMagic, you can convert the format from XML to fixed-length or CSV format, making it easy to link data from the distribution BMS to your own company's system.

This TIPS will introduce an example of converting XML data in the distribution BMS format into Shift_JIS CSV data. In this example, we will extract the "transaction details (lineItem)" in the XML message Order as a record. Note that in order to use this TIPS, DataMagic must be installed on your computer. For information on where to obtain DataMagic and how to install it, please refer to the separate article "Installing DataMagic."

How to operate

Step 1 - Prepare fixed-length data to be converted

First, prepare the XML data that will be used in the distributed BMS format. Once the data is ready, save it in the following folder on the PC where DataMagic is installed.
C:\work\SAMPLE7\ (saved with the file name "in")

»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 XML data in the distributed BMS format to Shift_JIS CSV format, download the script file below and save it in the folder where DataMagic is installed.
C:\work\SAMPLE7\ (saved as "sample7.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. On the Import Management Information screen, specify the downloaded file and click the Import button. If the import is successful, the ID SAMPLE7 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 SAMPLE7 registered in step 2 and check that the file names for the input and output settings are set correctly. Open the data processing information ID SAMPLE7 from the screen and click the "Execute" 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\SAMPLE7\, which is specified in the output settings. Please check this file using an editor such as Notepad.

lastly

This time, we showed a conversion sample of the XML message Order in the distribution BMS format, but DataMagic comes standard with the ability to register XML message templates for Distribution BMS Basic Version 1.3. Using these templates, you can easily convert from XML to various data formats. We encourage you to download DataMagic trial version and try out the explanations in the technical column.

  • 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.

DataMagic Column List

Related Content

Return to column list