JPH047759A - Data file form converter - Google Patents

Data file form converter

Info

Publication number
JPH047759A
JPH047759A JP2108685A JP10868590A JPH047759A JP H047759 A JPH047759 A JP H047759A JP 2108685 A JP2108685 A JP 2108685A JP 10868590 A JP10868590 A JP 10868590A JP H047759 A JPH047759 A JP H047759A
Authority
JP
Japan
Prior art keywords
data
conversion
data file
format
converted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2108685A
Other languages
Japanese (ja)
Inventor
Ariyoshi Kobayashi
小林 有可
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2108685A priority Critical patent/JPH047759A/en
Publication of JPH047759A publication Critical patent/JPH047759A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To facilitate the conversion of a data file form by selecting the proper conversion means based on the definition of a format defining part and combining these selected conversion means in order to perform of the conversion of a data form for each data item. CONSTITUTION:A processor 1 is provided together with a magnetic disk device 2, a main storage device 3, a display 4, and a keyboard 5. Then the conversion means A - N prepared at a format conversion processing part 11 are selected based on the result of conversion performed between the definition of an unconverted data file and that of a converted data file, and the conversion of a data form is carried out for each data item. Thus an operator can easily perform the conversion of the data form of a data file without producing a data conversion program each time.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、計算機システムにおけるデータファイルのデ
ータ形式を変換するデータファイル形式変換装置に関す
る。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a data file format conversion device that converts the data format of a data file in a computer system.

(従来の技術) 計算機システムにおいて、磁気ディスク装置等に格納さ
れるデータファイルには、順編成ファイル ランダム・
アクセス・ファイル、索引順編成ファイル等、種々の形
式のものが存在する。また、同じ順編成ファイルであっ
ても、それを取扱うプログラムによって、それぞれデー
タ形式が異なる場合がある。
(Prior art) In computer systems, data files stored in magnetic disk devices, etc. include sequential files, random files, etc.
Various formats exist, such as access files and indexed sequential files. Furthermore, even if the sequential files are the same, their data formats may differ depending on the program that handles them.

例えば、A社製のプログラムを用いて作成した順編成フ
ァイルと、B社製のプログラムを用いて作成した順編成
ファイルとては、そのブロックサイズ、データ型(漢字
データかカナのみのデータかといったもの)や文字コー
トに、それぞれ相違がある。
For example, a sequential file created using a program made by company A and a sequential file created using a program made by company B are different in terms of block size, data type (kanji data or kana-only data, etc.). There are differences in the characters (things) and character coats.

しかしながら、実際には、A社のプログラムで作成した
順編成ファイルを、B社のプログラムを用いてアクセス
することが要求される場合がある。また、プログラム開
発段階では、一定の内容のデータファイルを、そのデー
タ形式を種々変換しながらアクセスを試みるといった要
求もある。
However, in reality, it may be necessary to access a sequential file created using a program from company A using a program from company B. Furthermore, at the program development stage, there is a demand for attempting to access a data file with a certain content while converting the data format in various ways.

この種の要求に応えるために、従来、被変換データファ
イルと変換後データファイルのルコードを構成する各デ
ータ項目を比較し、その都度、変換用のプログラムを作
成するようにしていた。
In order to meet this type of request, conventionally, each data item constituting the code of the data file to be converted and the data file after conversion has been compared, and a program for conversion has been created each time.

第2図に、従来のデータ変換手順フローチャートを示す
FIG. 2 shows a conventional data conversion procedure flowchart.

図のように、従来法では、先ず、被変換データファイル
のデータ形式解析が行なわれる(ステップSl)。続い
て、変換後データファイルのデータ形式解析が行なわれ
る(ステップS2)。その後、上記解析結果に基づいて
データ変換プログラムの作成が行なわれる(ステップS
3)。こうしてデータ変換プログラムが完成すると、そ
のプログラムを動作させてデータ変換が実行される(ス
テップS4)。
As shown in the figure, in the conventional method, first, data format analysis of the data file to be converted is performed (step Sl). Subsequently, data format analysis of the converted data file is performed (step S2). Thereafter, a data conversion program is created based on the above analysis results (step S
3). When the data conversion program is completed in this way, the program is operated to execute data conversion (step S4).

(発明が解決しようとする課題) ところで、例えば、順編成ファイルのデータ形式は、ブ
ロックサイズ、レコードサイズ、レコード形式等により
決定される。このレコード形式には、データ項目の位置
、データ項目の型、データ項目の文字コード、データ有
効部の指定、パディング文字の指定等によって表わされ
る。
(Problem to be Solved by the Invention) By the way, for example, the data format of a sequential file is determined by block size, record size, record format, etc. This record format is represented by the position of the data item, the type of the data item, the character code of the data item, the designation of the data valid part, the designation of padding characters, etc.

従って、これらを考慮しながら、その都度、データ形式
変換プログラムを作成する作業には、多大な労力と時間
がかかるという問題があった。
Therefore, there is a problem in that it takes a lot of effort and time to create a data format conversion program each time taking these into consideration.

また、データファイルのデータ形式には、多くの種類が
あり、予め被変換データファイルと変換後データファイ
ルとを想定して、プログラムを用意しておこうとした場
合、そのプログラムの数量が膨大となり、現実的でない
という問題もあった。
In addition, there are many types of data file formats, and if you try to prepare a program in advance with the data file to be converted and the converted data file in mind, the number of programs will be enormous. There was also the problem that it was not realistic.

本発明は以上の点に着目してなされたもので、被変換デ
ータファイルと変換後データファイルのデータ形式を所
定の手順に従って指定するだけで、簡易にデータファイ
ル形式の変換を行なうことができるデータファイル形式
変換装置を提供することを目的とするものである。
The present invention has been made with attention to the above points, and it is possible to easily convert data file formats by simply specifying the data formats of the converted data file and the converted data file according to a predetermined procedure. The purpose is to provide a file format conversion device.

(課題を解決するための手段) 本発明のデータファイル形式変換装置は、被変換データ
ファイル格納部と、この被変換データファイルのデータ
形式を変換して格納する変換後データファイル格納部と
、前記被変換データファイルのルコードを構成する各デ
ータ項目のデータ形式を定義するフォーマット定義部と
、このフォーマット定義部の定義した形式に基づいてデ
ータ項目毎の変換手段を選定し、前記被変換データファ
イルの各レコードのデータ形式を変換するフォーマット
変換処理部とを備えたことを特徴とするものである。
(Means for Solving the Problems) A data file format conversion device of the present invention includes a converted data file storage section, a converted data file storage section that converts and stores the data format of the converted data file, and a converted data file storage section that converts and stores the converted data file. A format definition section that defines the data format of each data item constituting the code of the data file to be converted; and a conversion means for each data item is selected based on the format defined by this format definition section; The present invention is characterized by comprising a format conversion processing section that converts the data format of each record.

(作用) 以上の装置は、フォーマット変換処理部に、データ項目
毎の変換手段、例えば文字コート変換テーブル等を用意
する。フォーマット定義部には、被変換データファイル
と変換後データファイルの各データ項目のデータ形式、
即ちブロックサイズ、レコードサイズ、レコード形式等
を定義する。フォーマッ−ト変換処理部は、このフォー
マット定義部の定義に従って適当な変換手段を選択して
組合わせ、各データ項目毎のデータ形式変換を行なう。
(Operation) In the above device, the format conversion processing section is provided with conversion means for each data item, such as a character code conversion table. The format definition section contains the data format of each data item of the converted data file and the converted data file,
That is, block size, record size, record format, etc. are defined. The format conversion processing section selects and combines appropriate conversion means according to the definition of the format definition section, and performs data format conversion for each data item.

変換手段をモジュール化し、汎用性のあるものにすれば
、比較的少量の変換手段を用いて、種々の組合わせに基
づくデータ変換処理が可能となる。
By modularizing the conversion means and making it versatile, it becomes possible to perform data conversion processing based on various combinations using a relatively small amount of conversion means.

(実施例) 以下、本発明を図の実施例を用いて詳細に説明する。(Example) Hereinafter, the present invention will be explained in detail using embodiments shown in the drawings.

第1図は、本発明のデータファイル形式変換装置実施例
を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of the data file format conversion device of the present invention.

図の装置は、プロセッサ1と、磁気ディスク装置2と、
主記憶装置3と、デイスプレィ4及びキーホード5から
構成される。
The device in the figure includes a processor 1, a magnetic disk device 2,
It is composed of a main storage device 3, a display 4, and a keyboard 5.

プロセッサ1は、この装置の動作を制御するためのもの
で、マイクロプロセッシングユニット等から成る。この
プロセッサlに、本発明に関わるフォーマット変換処理
部11が構築される。このフォーマット変換処理部11
には、例えば、データ変換のためのモジュール化された
テーブルデータである変換手段A、B、C,・・・、N
が設けられている。尚、この種のデータは、通常、主記
憶装置3等に格納されるが、本実施例においては、説明
の都合上、プロセッサ1内のフォーマット変換処理部1
1に設けられるものとして説明を行なう。
The processor 1 is for controlling the operation of this device, and is composed of a microprocessing unit and the like. A format conversion processing unit 11 related to the present invention is constructed in this processor l. This format conversion processing section 11
For example, conversion means A, B, C, ..., N, which is modularized table data for data conversion, are included.
is provided. Note that this type of data is normally stored in the main storage device 3, etc., but in this embodiment, for convenience of explanation, the format conversion processing unit 1 in the processor 1 is stored.
The explanation will be given assuming that it is provided in 1.

磁気ディスク装置2には、データ変換の対象となる被変
換データファイル格納部21と、データ形式変換後のデ
ータファイルを格納する変換後データファイル格納部2
2とか設けられている。
The magnetic disk device 2 includes a converted data file storage section 21 that is a target of data conversion, and a converted data file storage section 2 that stores data files after data format conversion.
There are 2 or so.

これらは、磁気ディスク装置2の所定の記憶領域に設定
される。
These are set in a predetermined storage area of the magnetic disk device 2.

主記憶装置3には、被変換データファイルのルーコード
を構成する各データ項目のデータ形式を定義した被変換
データファイル定義部31が設けられている。この定義
は、例えば、オペレータがデイスプレィ4及びキーボー
ド5を操作しながら入力し、設定される。変換後データ
ファイル定義部32は、変換後データファイルのルーコ
ードを構成する各データ項目のデータ形式を定義した部
分である。設定方法は、被変換データファイル定義部3
1と同様である。
The main storage device 3 is provided with a converted data file definition section 31 that defines the data format of each data item constituting the roux code of the converted data file. This definition is input and set by an operator while operating the display 4 and keyboard 5, for example. The converted data file definition section 32 is a section that defines the data format of each data item that constitutes the roux code of the converted data file. The setting method is to convert data file definition section 3.
It is the same as 1.

第3図に、上記のフォーマット定義部30に、各データ
ファイルの定義を行なうためのデータ形式設定画面を示
す。この画面は、第1図のデイスプレィ4に表示され、
第3図の■〜■に示す部分の情報はキーボード5から入
力される。
FIG. 3 shows a data format setting screen for defining each data file in the format definition section 30 described above. This screen is displayed on display 4 in Figure 1,
The information in the portions shown by ■ to ■ in FIG. 3 is input from the keyboard 5.

図のように、各データファイルのデータ形式は、ブロッ
クサイズ■、レコードサイズ■及びレコード形式から成
る。このレコード形式は、データID■1位置■、デー
タ型■、長さ■1文字コード種別■、データ有効部■及
びパディング文字■から成る。
As shown in the figure, the data format of each data file consists of a block size (■), a record size (■), and a record format. This record format consists of data ID (1 position), data type (2), length (1 character), code type (2), data valid part (2), and padding character (2).

ブロックサイズ■は、lブロックの長さをバイト単位で
指定するものである。レコードサイズ■は、ルーコード
の長さをバイト単位で指定するものである。通常、デー
タファイルは、多数のブロックに分けて構成されており
、各ブロックは一定の数のレコードから構成されている
Block size ■ specifies the length of l block in bytes. Record size (■) specifies the length of the lou code in bytes. Typically, a data file is organized into a number of blocks, each block consisting of a fixed number of records.

データID■は、データ項目固有の名称である。このデ
ータID■によって、1レコードを構成する各データ項
目を識別する。また、被変換データファイルと変換後デ
ータファイルの各データ項目を、このデータID■をキ
ーとして対応付け、項目毎の形式変換のための変換手段
を選定することになる。
The data ID ■ is a name unique to the data item. This data ID ■ identifies each data item that constitutes one record. Furthermore, each data item of the data file to be converted and the data file after conversion is associated with each other using this data ID ■ as a key, and a conversion means for converting the format of each item is selected.

位置■は、レコード中のデータ項目の位置を示すもので
、レコード先端からの相対バイト数で表わされる。尚、
可変長データの場合には、文字数格納領域が先頭にくる
ため、位置■は文字数格納領域の位置を示すことになる
The position ■ indicates the position of the data item in the record, and is expressed by the relative number of bytes from the beginning of the record. still,
In the case of variable length data, the character number storage area comes at the beginning, so the position ■ indicates the position of the character number storage area.

次にデータ型■は、例えば次のようなものである。Next, the data type ■ is as follows, for example.

第4図に、データ型例を示す図表を示した。FIG. 4 shows a diagram showing examples of data types.

データ型には、数字データから成る整数型、固定長のカ
ナ文字等から成る文字型、可変長のカナ文字等から成る
可変長文字型、1字分を2バイトで表わす漢字型、これ
が可変長となる可変長漢字型といったものがある。その
長さは次のように表わされる。
Data types include an integer type consisting of numeric data, a character type consisting of fixed-length kana characters, a variable-length character type consisting of variable-length kana characters, etc., a kanji type that represents one character in 2 bytes, and this is a variable-length type. There is such a thing as a variable length kanji type. Its length is expressed as:

先ず、整数型はバイト数で表わされ、省略された場合に
は4バイトであることを意味する。これはINTと表示
する。また、文字型の長さはバイト数で指定される。こ
れはCHARと表示される。可変長文字型の長さは、デ
ータ格納域の長さを文字数で指定することにより表わさ
れる。これはVARCHARと表示される。漢字型は、
通常2バイトで1文字を表わし、漢字の文字数によって
長さが指定される。これはGRAPHと表示される。可
変長漢字型は、データ格納域の長さをバイト数で指定し
、VARGRAPi表示すレル。
First, the integer type is expressed in bytes, and if omitted, it means 4 bytes. This is displayed as INT. Additionally, the length of character types is specified in bytes. This is displayed as CHAR. The length of a variable-length character type is expressed by specifying the length of the data storage area in characters. This is displayed as VARCHAR. Kanji type is
Usually 2 bytes represent one character, and the length is specified by the number of kanji characters. This is displayed as GRAPH. The variable length Kanji type specifies the length of the data storage area in bytes and displays it in VARGRAPi.

第5図に、可変長文字型データの構成を例示した。FIG. 5 shows an example of the structure of variable-length character data.

図のように、可変長文字型データは、その先頭に2バイ
ト分の、バイト数格納域が設けられ、ここにデータ格納
域の長さが数字で示される。そして、これに続く固定長
の領域にデータ格納域が設定され、文字列がデータ格納
域の先頭から可変長で書込まれる。可変長漢字型も同様
であるが、データ格納域の長さは漢字文字数で示される
As shown in the figure, variable-length character data is provided with a 2-byte storage area for the number of bytes at the beginning, and the length of the data storage area is indicated by a number. Then, a data storage area is set in a fixed-length area following this, and a character string is written in a variable length from the beginning of the data storage area. The variable-length Kanji type is similar, but the length of the data storage area is indicated by the number of Kanji characters.

次に第3図へ戻って、文字コート種別■は、データ項目
が文字コートである場合に指定されるもので、例えば次
のようなものかある。
Next, returning to FIG. 3, the character coat type (■) is specified when the data item is a character coat, and may be, for example, as follows.

第6図は、文字コート種別例を示す図表である。FIG. 6 is a chart showing examples of character coat types.

例えば、文字コード種別としては、この実施例では、図
のように、JIS 、 tlJIs、 A、 Bという
4種が用意されテイル。JISは、JIS−XO20B
及びJIS−XO201という日本工業規格で規定され
た文字コートである。IJJIsは、JIS−XO20
8(7)最上位ヒツトの立った文字コードである。また
Aは、例えばA社で設定した文字コードAを示している
。またBは、B社で設定した文字コートBを示している
For example, in this embodiment, four types of character codes are prepared: JIS, tlJIs, A, and B, as shown in the figure. JIS is JIS-XO20B
This is a character coat specified by the Japanese Industrial Standards called JIS-XO201. IJJIs are JIS-XO20
8(7) is the character code with the most significant hit. Further, A indicates a character code A set by company A, for example. Further, B indicates character coat B set by company B.

ワードプロセッサ等において汎用されるアルファベット
やカナ、漢字等は、機種によって文字コード種別が異な
る。従って、このような文字コード種別の認識が必要と
なる。
The character code types for alphabets, kana, kanji, etc. commonly used in word processors and the like vary depending on the model. Therefore, it is necessary to recognize such character code types.

また、第3図のデータ有効部■は、左詰めの場合り、右
詰めの場合R1全格納域が有効な場合Aというように表
示し、何れか1つを選んで指定する。省略された場合に
は、全格納域か有効なAであるものとみなされる。
In addition, the data valid section (2) in FIG. 3 is displayed as "A" if the data is left justified, "A" if the entire storage area of R1 is valid if it is right justified, and one of them is selected and specified. If omitted, the entire storage area is assumed to be a valid A.

パディング文字■は、データ有効部■で、左詰めり、右
詰めRの指定をしたときに記述するものである。即ち、
左詰め、右詰めをしたとき、データ格納域には余白部分
が生じる。この余白部分を、どのような文字で埋めるか
を指定する。通常、この空き部分は、スペースデータや
特殊な符号で埋める。ここでは、パディング文字は、例
えば、1バイト型文字列の場合はX“△△”(16進2
桁)、2バイト型文字列の場合にはx゛°△△△△” 
(16進4桁)とする。
The padding character ■ is written when left-justification or right-justification R is specified in the data valid section ■. That is,
When left-aligned or right-aligned, a blank space appears in the data storage area. Specify what kind of characters should be used to fill this blank space. Usually, this empty part is filled with space data or special code. Here, the padding character is, for example, X “△△” (hexadecimal 2
digit), x゛°△△△△” for double-byte character strings
(4 digits in hexadecimal).

以上のようにして、被変換データファイルと変換後デー
タファイルのデータ形式を設定した後、ルコードを構成
する各データ項目のデータ形式変換のための変換手段を
選定することになる。
After setting the data formats of the data file to be converted and the data file after conversion as described above, a conversion means for converting the data format of each data item constituting the code is selected.

本発明の装置においては、予め次のような変換手段を用
意しておく。
In the apparatus of the present invention, the following conversion means is prepared in advance.

第7図に、文字コード種別に関する変換手段である変換
テーブルの一例を示す。
FIG. 7 shows an example of a conversion table that is a conversion means regarding character code types.

図の(a)には、コードAとJIS相互間の文字コード
種別変換テーブルを示す。また、図の(b)には、コー
ドBとJIS相互間の文字コード種別変換テーブルを示
す。また、図の(C)には、コードυJISとJIS相
互間の文字コード種別変換テーブルを示す。これらのテ
ーブルを使えば、何れの種類の文字コードもJISの文
字コードに変換し、あるいは逆変換をすることができる
(a) of the figure shows a character code type conversion table between code A and JIS. Further, (b) of the figure shows a character code type conversion table between code B and JIS. Further, (C) of the figure shows a character code type conversion table between the code υJIS and JIS. By using these tables, any type of character code can be converted into JIS character code or vice versa.

従って、例えばコードAからコートBへの文字コード種
別変換を行なう場合には、(a)と(b)に示したテー
ブルを組合わせればよい。
Therefore, when converting the character code type from code A to code B, for example, the tables shown in (a) and (b) may be combined.

使用される文字コードが、例えば3種類の場合には、相
互に変換テーブルを作成しても、そのテーブル数が膨大
になることはない。しかしながら、文字コード種別が多
数あるような場合には、例えば何れもJISの文字コー
ドと相互に変換できるテーブルを用意し、JIS以外の
文字コードとの変換の場合は、2つの変換テーブルを組
合わせるようにする。これによって、変換テーブル数を
減少させることができる。
If three types of character codes are used, for example, even if mutual conversion tables are created, the number of tables will not become enormous. However, if there are many character code types, for example, prepare a table that can convert each character code to and from the JIS character code, and when converting to a character code other than JIS, combine two conversion tables. Do it like this. This allows the number of conversion tables to be reduced.

文字コード種別に限らず、その他のデータ変換について
も同様の思想でテーブルを作成する。
Tables are created based on the same concept not only for character code types but also for other data conversions.

尚、変換手段は、必ずしもテーブルデータとは限らない
が、本発明のような機械的なデータ変換の場合、テーブ
ルデータが最も適しているといえる。
Although the conversion means is not necessarily table data, table data is most suitable for mechanical data conversion as in the present invention.

以下、具体的に、第1図に示した本発明の装置によるデ
ータ変換動作の説明を行なう。
Hereinafter, the data conversion operation by the apparatus of the present invention shown in FIG. 1 will be specifically explained.

第8図には、この具体的な実施例に用いる被変換データ
ファイル設定後の場面を示す。また、第9図には、変換
後データファイル設定後の画面を示す。
FIG. 8 shows a scene after setting the converted data file used in this specific embodiment. Moreover, FIG. 9 shows the screen after setting the converted data file.

第8図に示したように、被変換データファイルは、ブロ
ックサイズが400バイト、レコードサイズが40バイ
ト、データIDを見て分かるように、IDコードがYO
MIと)IYOKI という2つのデータ項目から成る
ものである。各データ項目の位置は、それぞれ1バイト
目と21バイト目、データ型は何れもGRAPH、長さ
は何れも1o、文字コード種別は何れもJIS 、デー
タ有効部は何れも左詰めでし、パディング文字は何れも
X“2121”である。
As shown in Figure 8, the data file to be converted has a block size of 400 bytes, a record size of 40 bytes, and as seen from the data ID, the ID code is YO.
It consists of two data items: MI and) IYOKI. The position of each data item is the 1st byte and the 21st byte, the data type is GRAPH, the length is 1o, the character code type is JIS, the valid data part is left justified, and there is no padding. All characters are X "2121".

第10図(a)に、この被変換データファイルの具体的
構成を図示した。
FIG. 10(a) shows the specific structure of this converted data file.

図のように、YOMIというデータ項目に、“ながしま
”というデータが1バイト目から格納されている。また
、HYDKIというデータ項目に、“長高”というデー
タが21バイト目から格納されている。
As shown in the figure, data "Nagashima" is stored in the data item YOMI from the first byte. Furthermore, in the data item HYDKI, data “length and height” is stored starting from the 21st byte.

一方、変換後データファイルは、第9図に示すように、
被変換データファイルのデータIDと対応するYOMI
というデータ項目とHYOKIというデータ項目から構
成されている。そして、各データ項目の位置は13バイ
ト目と1バイト目に指定されている。データ型は、それ
ぞれVARCHARとVARGRAPHとされている。
On the other hand, the converted data file is as shown in Figure 9.
YOMI corresponding to the data ID of the converted data file
It consists of a data item called HYOKI and a data item called HYOKI. The position of each data item is specified at the 13th byte and the 1st byte. The data types are VARCHAR and VARGRAPH, respectively.

長さは10及び5、コード種別は何れもA、データ有効
部は何れも左詰めのし、パディング文字はX“40”と
X“4040″°とされている。
The lengths are 10 and 5, the code types are both A, the data valid portions are left justified, and the padding characters are X "40" and X "4040"°.

第10図(b)に、その変換後データファイルの具体的
構成を図示した。
FIG. 10(b) shows the specific structure of the converted data file.

図のように、このデータファイルの各データ項目は可変
長であるから、その先頭にデータ格納域の長さが示され
ている。その位置は、1バイト目と13バイト目となっ
ている。
As shown in the figure, since each data item in this data file has a variable length, the length of the data storage area is indicated at the beginning. Their positions are the 1st and 13th bytes.

第10図(a)及び(b)を比較して分かるように、デ
ータ項目YOMIとデータ項目HYOKIのデータ形式
が、データ型や長さ8文字コード種別、書込み位置等に
ついて大幅に変更される。従って、これらのデータ形式
変換に必要な変換テーブルを選定して変換を実行するこ
とになる。
As can be seen by comparing FIGS. 10(a) and (b), the data formats of data item YOMI and data item HYOKI are significantly changed in terms of data type, 8-character code type, writing position, etc. Therefore, the conversion table required for these data format conversions is selected and the conversion is executed.

以下、これまでに説明した本発明の装置の動作をフロー
チャートを用いて簡単に説明する。
Hereinafter, the operation of the apparatus of the present invention described above will be briefly explained using a flowchart.

第11図には、フォーマット定義部の設定処理を示すフ
ローチャートを図示した。
FIG. 11 shows a flowchart showing the setting process of the format definition section.

図のように、第1図に示すフォーマット定義部30の設
定を行なう場合には、オペレータが、第1図のデイスプ
レィ4やキーボード5を操作して、第3図に示したよう
なデータ形式設定画面を表示し、被変換データファイル
の定義を入力しくステップS1)、変換後のデータファ
イルの定義を入力する(ステップS2)。尚、この手順
は逆でも差し支えない。
As shown in the figure, when setting the format definition section 30 shown in Fig. 1, the operator operates the display 4 and keyboard 5 shown in Fig. 1 to set the data format as shown in Fig. 3. A screen is displayed to input the definition of the data file to be converted (step S1), and the definition of the data file to be converted is input (step S2). Note that this procedure may be reversed.

このようにして、データファイルの定義が入力されると
、フォーマット変換処理部11は、次のようなデータ形
式の解析を行なう。
When the definition of the data file is input in this manner, the format conversion processing unit 11 performs the following data format analysis.

第12図に、データ形式の解析処理を示すフローチャー
トを図示した。
FIG. 12 shows a flowchart showing data format analysis processing.

図において、先ず、フォーマット定義部のファイルをオ
ーブンする(ステップSl)。即ち、先にオペレータが
人力した被変換データファイル定義部31や変換後デー
タファイル定義部32のファイルをここでアクセス可能
にする。
In the figure, first, the file in the format definition section is opened (step Sl). That is, the files of the converted data file definition section 31 and the converted data file definition section 32, which were previously manually input by the operator, are made accessible here.

次に、被変換データファイルのブロックサイズ、レコー
ドサイズ、レコード形式を取出す(ステップS2)。ま
た、更に、変換後データファイルのブロックサイズ、レ
コードサイズ、レコード形式を取出す(ステップS3)
Next, the block size, record size, and record format of the data file to be converted are extracted (step S2). Furthermore, the block size, record size, and record format of the converted data file are extracted (step S3).
.

その後、項目数を数えて変換すべき項目を対応付ける(
ステップS4)。即ち、先に第8図及び第9図で示した
例の場合、項目数は何れも2個で、データIDかYOM
IとHYOKIというように同一の呼び名で対応付けら
れている。この対応付けを認識しながら、次のステップ
S5からステップS7の処理を実行する。
After that, count the number of items and match the items to be converted (
Step S4). That is, in the case of the examples shown in FIGS. 8 and 9 earlier, the number of items is two, and the data ID or YOM
They are associated with the same names, such as I and HYOKI. While recognizing this association, the next steps S5 to S7 are executed.

即ち、先ず、データ型変換テーブルの選定を行なう(ス
テップS5)。この変換テーブルは、第10図を見て明
らかなように、読み込んだデータ項目の位置を変更した
り、必要に応じてデータ格納域の長さに関するデータを
付加する機能をもったものである。勿論、データの並へ
換えや演算を伴なうモジュール状のプログラムであって
も差し支えない。更に、文字コート種別変換テーブルの
選定を行なう(ステップS6)  この変換手段は、先
に第7図を用いて説明したようなものである。
That is, first, a data type conversion table is selected (step S5). As is clear from FIG. 10, this conversion table has the function of changing the position of the read data item and adding data regarding the length of the data storage area as necessary. Of course, it may be a modular program that involves rearranging data or performing calculations. Furthermore, a character code type conversion table is selected (step S6). This conversion means is as described above with reference to FIG.

次に、ステップS7において、全ての項目について選定
作業が終了したか否かを判断する。若し、全てについて
の選定作業が終了していなければ、ステップS5に戻り
、他のデータ項目についてデータ型変換テーブル等の変
換手段の選定を行なう・そして・全ての項目についての
変換手段の選定が終われば、変換処理の前提としてのデ
ータ形式の解析処理が終了する。その後、実際にデータ
形式の変換処理に移る。
Next, in step S7, it is determined whether the selection work has been completed for all items. If the selection work for all items has not been completed, return to step S5 and select conversion means such as a data type conversion table for other data items.Then, the selection of conversion means for all items is completed. Once this is completed, the data format analysis process, which is a prerequisite for the conversion process, ends. After that, the process moves to actual data format conversion processing.

第13図は、データ形式変換処理を説明するフローチャ
ートである。
FIG. 13 is a flowchart illustrating data format conversion processing.

図において、先ず、第1図の磁気ディスク装置2に設け
られた被変換データファイルをオーブンする(ステップ
Sl)。更に、磁気ディスク装置2に格納された変換後
データファイルをオープンする(ステップS2)  そ
して、先ず、被変換データファイルのルコードを入力す
る(ステップS3)。その後、先に第12図で示した解
析結果に基づいて、データ項目毎にデータ形式の変換を
行なう(ステップS4)  そして、その結果を、変換
後データファイルへ出力する(ステップS5)。その後
、ステップS6において、全てのレコードの出力が終了
したか否かを判断し、まだ未変換のレコードが残されて
いれば、再びステップ$3に戻り、ステップS3からス
テップs6の処理を繰返す。被変換データファイルに格
納された全てのレコードの変換が終了すれば、ステップ
S7に移行し、全ファイルをクローズする。
In the figure, first, the converted data file provided in the magnetic disk device 2 of FIG. 1 is opened (step Sl). Furthermore, the converted data file stored in the magnetic disk device 2 is opened (step S2).Then, first, the code of the converted data file is input (step S3). Thereafter, the data format is converted for each data item based on the analysis results shown in FIG. 12 (step S4), and the results are output to the converted data file (step S5). Thereafter, in step S6, it is determined whether or not all records have been output. If there are still unconverted records left, the process returns to step $3 and the processes from step S3 to step s6 are repeated. When the conversion of all records stored in the converted data file is completed, the process moves to step S7, and all files are closed.

以上のようにして、データファイルの変換が終了する。In the above manner, the conversion of the data file is completed.

本発明は上記の実施例に限定されない。The invention is not limited to the above embodiments.

第1図の装置には、デイスプレィ及びキーホードを設け
、フォーマット定義部30へのデータ形式の設定を行な
うようにしたが、これは、例えば他の上位装置や磁気カ
ード、その他の種々の入力手段によって置換えることが
可能である。また、被変換データファイルのデータ形式
と変換後データファイルのデータ形式によっては、デー
タ型変換テーブルや文字コード種別変換テーブルの何れ
か一方を必要としないような場合もある。従って、その
内容に応じて、種々の変換手段を自由に選択して差し支
えない。
The device shown in FIG. 1 is equipped with a display and a keyboard, and the data format can be set in the format definition unit 30, but this can be done using other host devices, magnetic cards, or other various input means. It is possible to replace. Further, depending on the data format of the data file to be converted and the data format of the converted data file, either the data type conversion table or the character code type conversion table may not be necessary. Therefore, various conversion means may be freely selected depending on the content.

(発明の効果) 以上説明した本発明のデータファイル形式変換装置によ
れば、予めフォーマット変換処理部に用意された変換手
段を、被変換データファイルと変換後データファイルの
定義を比較して選定し、各データ項目毎にそのデータ形
式を変換するようにしたので、オペレータが、その都度
、データ変換用プログラムの作成を行なわなくても、簡
便にデータファイルのデータ形式変換を実行することが
できる。
(Effects of the Invention) According to the data file format conversion device of the present invention described above, the conversion means prepared in advance in the format conversion processing section is selected by comparing the definitions of the data file to be converted and the data file after conversion. Since the data format is converted for each data item, the operator can easily convert the data format of the data file without having to create a data conversion program each time.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明のデータファイル形式変換装置実施例を
示すブロック図、第2図は従来のデータ変換手順を示す
フローチャート、第3図は本発明におけるデータ形式の
設定画面説明図、第4図はデータ型例を示す図表、第5
図は可変長文字型データ例の説明図、第6図は文字コー
ド種別例を示す図表、第7図は文字コード種別変換テー
ブルの説明図、第8図は被変換データファイル設定後の
画面説明図、第9図は変換後データファイル設定後の画
面説明図、第10図はデータ形式変換例を示すデータの
内容説明図、第11図はフォーマット定義部の設定処理
手順を示すフローチャート、第12図はデータ形式の解
析処理手順を示すフローチャート、第13図はデータ形
式変換処理手順を示すフローチャートである。 1・・・プロセッサ、2・・・磁気ディスク装置、3・
・・主記憶装置、4・・・デイスプレィ、5・・・キー
ボード、 11・・・フォーマット変換処理部、 21・・・被変換データファイル格納部、22・・・変
換後データファイル格納部、3o・・・フォーマット定
義部、 31・・・被変換データファイル定義部、32・・・変
換後データファイル定義部。 (X米のデータ変換手順 第 ド1 (2バイト) (固定長用意) 可変長文字型データ例 第  5  図 文字コード種別例 第  6  図 (a) (b) (c) 文字コード峠別変換テーブル 第 図 OM  I HY Oに ! 被変換データファイル (a) 変換後データファイル (b) データ形式変換例 第  10  図 フォーマット定義部の設定 第  l l  図 データ形式の解析 第  12  図 第 データ形式変換 図
FIG. 1 is a block diagram showing an embodiment of the data file format conversion device of the present invention, FIG. 2 is a flowchart showing a conventional data conversion procedure, FIG. 3 is an explanatory diagram of the data format setting screen in the present invention, and FIG. 4 is a diagram showing data type examples, part 5
The figure is an explanatory diagram of an example of variable-length character type data, Figure 6 is a diagram showing an example of character code types, Figure 7 is an explanatory diagram of a character code type conversion table, and Figure 8 is an explanation of the screen after setting the converted data file. 9 is an explanatory diagram of the screen after setting the converted data file, FIG. 10 is an explanatory diagram of the data contents showing an example of data format conversion, FIG. 11 is a flowchart showing the setting process procedure of the format definition section, and FIG. 13 is a flowchart showing the data format analysis processing procedure, and FIG. 13 is a flowchart showing the data format conversion processing procedure. 1... Processor, 2... Magnetic disk device, 3.
... Main storage device, 4... Display, 5... Keyboard, 11... Format conversion processing section, 21... Converted data file storage section, 22... Post-conversion data file storage section, 3o ...Format definition part, 31... Converted data file definition part, 32... Post-conversion data file definition part. (X-US data conversion procedure No. 1 (2 bytes) (fixed length prepared) Example of variable length character type data Figure 5 Example of character code type Figure 6 (a) (b) (c) Conversion table by character code Figure OM I HYO! Data file to be converted (a) Data file after conversion (b) Example of data format conversion Figure 10 Setting of format definition section Figure l l Analysis of data format Figure 12 Data format conversion diagram

Claims (1)

【特許請求の範囲】 被変換データファイル格納部と、 この被変換データファイルのデータ形式を変換して格納
する変換後データファイル格納部と、前記被変換データ
ファイルの1レコードを構成する各データ項目のデータ
形式を定義するフォーマット定義部と、 このフォーマット定義部の定義した形式に基づいてデー
タ項目毎の変換手段を選定し、前記被変換データファイ
ルの各レコードのデータ形式を変換するフォーマット変
換処理部とを備えたことを特徴とするデータファイル形
式変換装置。
[Scope of Claims] A converted data file storage unit, a converted data file storage unit that converts and stores the data format of the converted data file, and each data item constituting one record of the converted data file. a format definition section that defines the data format of the data file; and a format conversion processing section that selects a conversion means for each data item based on the format defined by the format definition section and converts the data format of each record of the converted data file. A data file format conversion device comprising:
JP2108685A 1990-04-26 1990-04-26 Data file form converter Pending JPH047759A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2108685A JPH047759A (en) 1990-04-26 1990-04-26 Data file form converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2108685A JPH047759A (en) 1990-04-26 1990-04-26 Data file form converter

Publications (1)

Publication Number Publication Date
JPH047759A true JPH047759A (en) 1992-01-13

Family

ID=14491066

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2108685A Pending JPH047759A (en) 1990-04-26 1990-04-26 Data file form converter

Country Status (1)

Country Link
JP (1) JPH047759A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06251073A (en) * 1993-02-24 1994-09-09 Nippon Telegr & Teleph Corp <Ntt> Data distribution device
JPH07160554A (en) * 1993-12-02 1995-06-23 Toshiba Corp Table form data transforming device
JPH08194560A (en) * 1995-01-17 1996-07-30 Nec Corp Bit map conversion device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06251073A (en) * 1993-02-24 1994-09-09 Nippon Telegr & Teleph Corp <Ntt> Data distribution device
JPH07160554A (en) * 1993-12-02 1995-06-23 Toshiba Corp Table form data transforming device
JPH08194560A (en) * 1995-01-17 1996-07-30 Nec Corp Bit map conversion device

Similar Documents

Publication Publication Date Title
JPH0475170A (en) Data base operation system
JPS60218142A (en) Dynamic format conversion system of data
JPH047759A (en) Data file form converter
US5283895A (en) Apparatus and method for processing data corresponding to word labels
JPH0619756A (en) Edi format conversion method
JPH03194656A (en) Cad device
JPH0488469A (en) Device for issuing business management document or the like
JPH01280831A (en) Assisting method for standardization of intra-program data name
JPH11272524A (en) Data converter and storage medium
JP2003186670A (en) Automatic generation device, automatic generation method and automatic generation program for database access component
EP0358860A2 (en) Apparatus and method for processing data corresponding to labels
JP2609680B2 (en) Data registration device
JP2734535B2 (en) Form output device
JPH0395622A (en) Compressing system for information on screen defining matter
JPH0237466A (en) Information processing system
JPH04195580A (en) Device for forming index term file
CN118192961A (en) System and method for accurately customizing and automatically generating multi-type front-end and back-end codes
JPH10171686A (en) Data base extending method
JPS5852742A (en) Data update system
JPH03180942A (en) Master file forming device for document data base
JPH05143409A (en) File processing unit
JPH1063746A (en) Automatic table date generator
JPH0895997A (en) Method for retrieving data with operating button for computer processing
JPH02133871A (en) Record data processor
JPH04353933A (en) Program execution control language conversation device