JP2004021551A - System, method, program, and recording medium for file conversion - Google Patents

System, method, program, and recording medium for file conversion Download PDF

Info

Publication number
JP2004021551A
JP2004021551A JP2002174915A JP2002174915A JP2004021551A JP 2004021551 A JP2004021551 A JP 2004021551A JP 2002174915 A JP2002174915 A JP 2002174915A JP 2002174915 A JP2002174915 A JP 2002174915A JP 2004021551 A JP2004021551 A JP 2004021551A
Authority
JP
Japan
Prior art keywords
conversion
file
data
format
conversion system
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
JP2002174915A
Other languages
Japanese (ja)
Inventor
Seiichi Tochihara
栃原 聖一
Takeshi Takahashi
高橋 剛
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2002174915A priority Critical patent/JP2004021551A/en
Publication of JP2004021551A publication Critical patent/JP2004021551A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an automatic file conversion system and method in which XML data is efficiently converted into a fixed-length file without program development by a programmer each time. <P>SOLUTION: The file conversion system and method comprises a file specification means which specifies at least 1 or more files to be converted at one time, a conversion format specification means which designates a conversion format when data of the files to be converted is stored in an output file, and a conversion means which sequentially reads the plurality of the files to be converted, converts the data based on the conversion format specification means, and then generates one output file. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、ファイル変換に関し、特に、複数のファイルを一括して一つの出力ファイルを生成することに関するものである。
【0002】
【従来の技術】
近年、従来の紙の帳票に代わるものとして、電子帳票が利用されている。電子帳票とは、申込書、申請書、その他の各種の帳票を電子的に構成した電子データであり、例えばXML(eXtensible Markup Language)データとして構成することができる。
【0003】
XMLは、各々所定の識別記号により始端部と終端部を指示した複数のデータを備え、様々なデータの構造が記述可能であるが、メインフレームに構築した既存のシステム(例えば顧客管理システムや申し込み受付システムなど)で使用する場合には、以下の問題がある。
【0004】
すなわち、メインフレームで稼動する既存のシステムは、固定長ファイルのデータを入力する場合が多く、電子帳票システムで生成したXMLデータをこの様な既存システムで使用するためには、個々のアプリケーション毎に、XMLデータを変換する機能を有するRDBMS(Relational Database Management System)などに、複数のXMLデータの各々を取り込み、RDBMSの機能により固定長ファイルを生成するという、煩雑で時間がかかる作業を行う必要があるという問題がある。
【0005】
更に、XMLデータをRDBMSへ取り込む処理は、汎用的な開発ツールを用いて、例えば、「生命保険の申込書」、「公共機関への申請書」などのXMLデータの種類により、プログラムを毎回作成する必要があり、プログラミングのスキルを身に付けたプログラマにしか開発できないという問題もある。
【0006】
【発明が解決しようとする課題】
本発明は係る問題を解決するためなされたものであり、その目的とするところは、プログラマが毎回プログラム開発を行う必要がなく、効率的にXMLデータから固定長ファイルへの変換を行う、自動ファイル変換システムおよび方法を提供することである。
【0007】
【課題を解決するための手段】
本発明の第1の態様は、コンピュータ読み取り可能なファイルを異なるコンピュータシステムが使用する異なる形式のファイルに変換するシステムであって、少なくとも一つ以上の変換元ファイルを一括で指定可能なファイル指定手段と、前記変換元ファイルの各データの出力ファイルに格納する際の変換形式を指示する変換形式指示手段と、前記複数の変換元ファイルを順次読み込み前記変換形式指示手段に基づいてデータの変換を施し一つの出力ファイルを生成する変換手段とを設けたものである。
【0008】
本発明の第2の態様は、上述の第1の態様に係るファイル変換システムにおいて、前記変換元ファイルに、各々所定の識別記号により始端部と終端部とを指示した複数のデータおよび/またはデータ属性を設けたものである。
【0009】
本発明の第3の態様は、上述の第1または2に係るファイル変換システムにおいて、前記変換形式指示手段に、前記変換元ファイル内の1データを指定し出力ファイルの1レコード内における当該データの変換形式を指定する変換情報と、出力ファイルの1レコードを所定の長さに固定するためにまたは項目を区切るために固定個所に挿入する文字を指示する固定挿入文字情報とを設けたものである。
【0010】
本発明の第4の態様は、上述の第1から3の態様に係るファイル変換システムにおいて、前記変換情報に、前記変換元ファイル内のデータの各々を指示する所定の識別記号の記述を設けたものである。
【0011】
本発明の第5の態様は、上述の第1から4の態様に係るファイル変換システムにおいて、前記変換情報に、前記変換元ファイル中の複数のデータの入れ子構造を示す前記所定の識別記号のリストの記述を設けたものである。
【0012】
本発明の第6の態様は、上述の第1から5の態様に係るファイル変換システムにおいて、前記変換情報に、変換元ファイルの当該データが前記出力ファイル中に占めるデータ長と、変換元ファイルの当該データが前記データ長に満たない場合に当該データに付加することにより前記データ長を満たすための詰め文字と、変換元ファイルの当該データを前記出力ファイル中において左右どちらに詰めて格納するかの詰め方向指定とを設けたものである。
【0013】
本発明の第7の態様は、上述の第1から6の態様に係るファイル変換システムにおいて、前記変換形式指示手段を、前記変換ファイル中の1データに係る変換情報または固定挿入文字情報を1レコード毎に記述したテキスト形式のパラメータファイルにより構成するようにしたものである。
【0014】
本発明の第8の態様は、コンピュータ読み取り可能なファイルを異なるコンピュータシステムが使用する異なる形式のファイルに変換する方法であって、複数の変換元ファイルに対する変換を一括で指定する段階と、前記変換元ファイル内の各データ項目の出力ファイルに格納する際の変換形式を指示する段階と、前記複数の変換元ファイルを順次読み込む段階と、前記指示した変換形式に基づきデータの変換を行う段階と、前記複数の変換元ファイル全てから前記変換形式に基づく一つの出力ファイルを生成する段階とを行うようにしたものである。
【0015】
本発明の第9の態様は、コンピュータを、上述の第1から7の態様に係るファイル変換システムとして動作させるプログラムを提供するようにしたものである。
【0016】
本発明の第10の態様は、コンピュータを、上述の第1から第7に係るファイル変換システムとして動作させるためのプログラムを、コンピュータ読み取り可能な記録媒体に記録して提供するようにしたものである。
【0017】
【発明の実施の形態】
以下、本発明を図示する実施形態に基づいて説明する。
図1は、本発明の一実施形態に係わるファイル変換システム1の概略構成図である。
【0018】
ファイル変換システム1は、実際にはコンピュータシステムであり、ハードウェアの観点からみると、演算を行うCPU、情報を記録するコンピュータ用の記録装置(磁気ディスク、光ディスクなど)、コンピュータに指示を与える入力装置(キーボード、マウスなど)、結果を表示するCRTなどの表示装置、電子帳票などを印字するプリンタ、他システムとデータ交換を行う通信装置などから構成されている。
【0019】
また、ファイル変換システム1は、変換元ファイルであるXMLデータ2を、出力ファイルである固定長ファイル3に変換するために、ソフトウェアの観点からみると、ファイル指定手段4と、変換形式指示手段5と、変換手段6とを備えている。
【0020】
XMLデータ2は、各々のデータを所定の識別記号により始端部と終端部で指示することで、データの構造を記述したファイルである。図2に、XMLデータ2の内容の一実施例として、受験票の例を示す。
【0021】
図2は、始端部「<>」および終端部「</>」の2つの識別記号に囲まれたタグと呼ばれる文字列毎に、「試験年度」、「試験名」、「試験日時」、「試験会場」、「受験者」という5つのデータにより「受験票」というデータが構成されることを示している。
【0022】
また、図2は、「受験者」というデータが「氏名」、「生年月日」という2つのデータから構成されており、更に「氏名」は「氏」および「名」、「生年月日」は「元号」、「年」、「月」、「日」という複数のデータの入れ子構造により構成されていることも示している。
【0023】
固定長ファイル3は、図3に一実施例を示すように、レコード中において各データの格納位置と使用する長さ(桁数)、および1レコードの長さが決められたファイルであり、メインフレームなどで動作する既存のシステムが処理可能なものである。各データ項目を、カンマなどの文字記号により区別する形態も可能である。
【0024】
ファイル指定手段4は、複数のXMLデータ2を一括で指定するものであり、実際には、当該ファイル変換システム1を実現するコンピュータのOS(Operating System)が管理するファイルシステムの所定のフォルダの元に、複数のXMLデータ2を記録したものである。
【0025】
変換形式指示手段5は、各レコード(行)が変換情報7または固定挿入文字情報8により構成されたテキスト形式のパラメータファイルである。図4に、変換形式指示手段5の一実施例を示す。
【0026】
変換情報7は、XMLデータ2の特定データに対する変換方法を記述するものであり、XMLデータ2内の対象データ、および固定長ファイル3における当該データの長さ、詰め文字、詰め方向などを指定するものである。
【0027】
図4において、例えば5行目の「<氏>;<氏名>;<受験者>;<受験票>=」という変換情報7の記述は、「受験票」を記述したXMLデータ2の「受験者」データの「氏名」の「氏」に対する変換形式であることを示している。
【0028】
また、7行目の「<住所>;<受験者>;<受験票>=」という変換情報7の記述は、「受験票」を記述したXMLデータ2の「受験者」データの「<field_name>=」というデータの属性の記述に対応し、実際の対象データは「<field_name>」タグ内の「<value>」タグで囲まれた「東京都」であることを示している。
【0029】
また、例えば10行目の「月」に係る変換情報7の記述において、「=」の右にある「2,“0”,R」は、「2」が二桁の長さであることを示し、「“0”」が一桁の数字の月の場合に「01」のように前に「0(ゼロ)」を詰めることを示し、「R」がデータを右詰めで格納することを示している。
【0030】
上述のように変換情報7は、「<氏>;<氏名>;<受験者>;<受験票>」のように、XMLデータ2の中の特定データをタグの入れ子構造を順に記述することで表現可能であるが、「元号」などのように当該XMLデータ2においてタグが一意に決定できる場合は、タグの入れ子構造の列挙を省略することもできる。
【0031】
もちろん、当該データが、XMLデータ2および固定長ファイル3において長さが同一などにより、詰め文字および左右のどちらに詰めて格納するかの詰め方向指定が不要な場合には、該当する情報を省略してもよい。
【0032】
固定挿入文字情報8は、当該レコード(行)の長さを一定にしたり、項目間をカンマで区切る場合など、特定の位置に固定的に挿入すべき文字を指定するものである。固定挿入文字情報8は、通常のデータ項目と区別するために、図4において、「<<」および「>>」で指示するものとする。
【0033】
図4の12行目は、「<<Filler>>=4,“ ”」により、「“ ”(空白)」を4文字分挿入することにより、固定長ファイル3の有効なレコード長を80バイトにすることを示している。
【0034】
更に、13行目の「<<delimit>>=<CR><LF>」は、当該レコードの最後に改行の文字コード「<CR><LF>」を挿入することを示している。
【0035】
この固定挿入文字情報8は、レコード長の調整や改行の文字コードなどの変換情報7の後方の記述に限定されるものではなく、項目同士を区切るためのカンマなどを、変換情報7の任意の行に記述することにより、固定長ファイル3の特定の位置に文字コードを挿入することを指定してよい。もちろん、固定の文字を挿入する必要がなければ、省略することも可能である。
【0036】
変換手段6は、ファイル指定手段4により指定された複数のXMLデータ2を順次読み込み、変換形式指示手段5に基づいて、XMLデータ2を固定長ファイル3に順次変換し、最終的に一つの固定長ファイル3を生成するものである。
【0037】
次に、図5を用いて、本発明のファイル変換システム1の動作について、詳細に説明する。
【0038】
変換手段6は、ファイル指定手段4により記録されている複数のXMLデータ2から、例えばファイル名の並び順などに従い、一つのXMLデータ2を読み込む。
【0039】
次に、変換手段6は、予めエディタソフトやワープロソフトで作成してある変換形式指示手段5を読み込み、1行目から順に処理することで、XMLデータ2を固定長ファイル3に変換する。
【0040】
実際の変換処理は、まず変換情報7に従い、当該するXMLデータ2のデータの構造を追いながら、指定されているタグを検索し、対象とするデータを特定する。
【0041】
例えば、図4の1行目に示す変換情報7においては、「<試験年度>;<受験票>」というタグの指定であるから、図2のXMLデータ2を検索して、1行目の「<受験票>」から2行目の「<試験年度>」という順にタグを辿り、対象データとして「試験年度」を特定するのである。
【0042】
また、図4の7行目に示す変換情報7においては、「<住所>;<受験者>;<受験票>」というタグの指定であるが、図2のXMLデータには「<住所>」というタグはない。この場合、タグのfield_name属性に「住所」が記述されている、すなわち「<field_name=“住所”>」という記述により対象データを特定する。
【0043】
次に、変換手段6は、変換情報7により指定された長さ分のデータ領域を確保し、詰め方向の指示に従って右もしくは左詰で、特定したデータの値を出力用のバッファ領域に転記する。この時、指定された長さに対象データが満たない場合は、詰め文字で指定された文字を付加する。
【0044】
field_name属性のように、属性により対象データを特定した場合は、当該属性タグに含まれる「<value>」タグにより指定されたデータの値を使用する。図2のXMLデータ2の場合、「東京都」が実際のデータである。
【0045】
また、固定挿入文字情報8や変換情報7で指定されたタグがXMLデータ2の中に存在しない場合は、指定された長さ分のデータ領域を、詰め文字で指定された文字で埋める。
【0046】
変換形式指示手段5の全ての行について、上述のデータの特定から出力バッファ領域への転記を繰り返す。
【0047】
変換形式指示手段5の全ての行に対する処理が終了した後、上述の出力バッファ領域を固定長ファイル3の1レコードとして書き出す。
【0048】
ファイル指定手段4で指示された全てのXMLデータ2について、変換形式指定手段5の読み込みから出力バッファ領域の固定長ファイル3への書き出しを行うことにより、例えば、ファイル指定手段4で10ファイルのXMLデータ2を指定した場合は、10レコードを有する固定長ファイル3が生成されることになる。
【0049】
以上、本発明を実施の形態に基づいて詳細に説明してきたが、本発明によるファイル変換システムは、上述の実施の形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲において種々の変更が可能なことは当然のことである。
【0050】
【発明の効果】
以上のとおり、本発明に係るファイル変換システムによれば、RDBMSを介することなく、効率的に複数の変換元のXMLデータを固定長ファイルに変換することが可能になる。
【0051】
また、変換形式指定手段によりパラメータファイルを用意することで、XMLデータ毎にプログラムを開発しなくても、XMLデータの固定長ファイルへの変換を実施できる。
【図面の簡単な説明】
【図1】本発明の一実施の形態を示す構成図である。
【図2】本発明のXMLデータの説明図である。
【図3】本発明の固定長ファイルの説明図である。
【図4】本発明の変換形式指示手段の説明図である。
【図5】本発明の一実施の形態の動作を示すフローチャートである。
【符号の説明】
1 ファイル変換システム
2 XMLデータ
3 固定長ファイル
4 ファイル指定手段
5 変換形式指示手段
6 変換手段
7 変換情報
8 固定挿入文字情報
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to file conversion, and more particularly, to generating one output file by combining a plurality of files.
[0002]
[Prior art]
In recent years, electronic forms have been used as alternatives to conventional paper forms. The electronic form is electronic data that electronically forms an application form, an application form, and various other forms, and can be configured as, for example, XML (extensible Markup Language) data.
[0003]
XML includes a plurality of data, each of which designates a start end and an end by a predetermined identification symbol, and can describe various data structures. However, an existing system (for example, a customer management system or an application Reception system, etc.) have the following problems.
[0004]
In other words, existing systems operating on a mainframe often input data of fixed-length files, and in order to use XML data generated by an electronic form system in such an existing system, it is necessary to provide individual data for each application. It is necessary to perform a complicated and time-consuming operation of capturing each of a plurality of XML data into a RDBMS (Relational Database Management System) having a function of converting XML data and generating a fixed-length file using the RDBMS function. There is a problem.
[0005]
Furthermore, the process of importing the XML data into the RDBMS is performed by using a general-purpose development tool, for example, by creating a program according to the type of the XML data such as “application form for life insurance” and “application form for a public institution”. There is also a problem that it can be developed only by programmers who have programming skills.
[0006]
[Problems to be solved by the invention]
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to provide an automatic file conversion system that efficiently converts XML data into fixed-length files without the need for a programmer to develop programs each time. It is to provide a conversion system and method.
[0007]
[Means for Solving the Problems]
A first aspect of the present invention is a system for converting a computer-readable file into a file of a different format used by a different computer system, wherein at least one or more conversion source files can be collectively specified. A conversion format instructing unit for instructing a conversion format when each data of the conversion source file is stored in an output file; and sequentially converting the plurality of conversion source files to perform data conversion based on the conversion format instructing unit. And a conversion unit for generating one output file.
[0008]
According to a second aspect of the present invention, in the file conversion system according to the first aspect described above, a plurality of data and / or data each indicating a start end and an end by a predetermined identification symbol in the conversion source file. Attributes are provided.
[0009]
According to a third aspect of the present invention, in the file conversion system according to the first or second aspect, one data in the conversion source file is designated by the conversion format designating means, and the data in one record of the output file is designated. Conversion information for specifying a conversion format and fixed insertion character information for designating a character to be inserted at a fixed position to fix one record of the output file to a predetermined length or to separate items are provided. .
[0010]
According to a fourth aspect of the present invention, in the file conversion system according to the first to third aspects, the conversion information is provided with a description of a predetermined identification symbol indicating each of the data in the conversion source file. Things.
[0011]
According to a fifth aspect of the present invention, in the file conversion system according to the first to fourth aspects, the conversion information includes a list of the predetermined identification symbols indicating a nested structure of a plurality of data in the conversion source file. Is provided.
[0012]
According to a sixth aspect of the present invention, in the file conversion system according to the first to fifth aspects, the conversion information includes a data length occupied by the data of the conversion source file in the output file, and a data length of the conversion source file. When the data is shorter than the data length, the padding character for satisfying the data length by adding to the data, and whether the data of the conversion source file is stored left or right in the output file. This is provided with a filling direction designation.
[0013]
According to a seventh aspect of the present invention, in the file conversion system according to the first to sixth aspects described above, the conversion format instructing means transmits conversion information or fixed insertion character information relating to one data in the conversion file to one record. It is configured by a text-format parameter file described for each.
[0014]
An eighth aspect of the present invention is a method of converting a computer readable file into a file of a different format used by a different computer system, wherein a step of specifying conversions for a plurality of conversion source files at once is provided, Instructing a conversion format when storing in the output file of each data item in the original file, sequentially reading the plurality of conversion source files, and performing data conversion based on the instructed conversion format, Generating one output file based on the conversion format from all of the plurality of conversion source files.
[0015]
According to a ninth aspect of the present invention, there is provided a program for operating a computer as the file conversion system according to the first to seventh aspects.
[0016]
According to a tenth aspect of the present invention, a program for causing a computer to operate as the above-described first to seventh file conversion systems is provided by being recorded on a computer-readable recording medium. .
[0017]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described based on an illustrated embodiment.
FIG. 1 is a schematic configuration diagram of a file conversion system 1 according to an embodiment of the present invention.
[0018]
The file conversion system 1 is actually a computer system, and from a hardware point of view, a CPU that performs calculations, a recording device for recording information (such as a magnetic disk or an optical disk), and an input that gives instructions to the computer. It comprises a device (keyboard, mouse, etc.), a display device such as a CRT for displaying the results, a printer for printing electronic forms, etc., and a communication device for exchanging data with other systems.
[0019]
The file conversion system 1 converts the XML data 2 that is the conversion source file into the fixed-length file 3 that is the output file from the viewpoint of software. And conversion means 6.
[0020]
The XML data 2 is a file describing a data structure by designating each data at a start end and a tail end by a predetermined identification symbol. FIG. 2 shows an example of an examination ticket as an example of the content of the XML data 2.
[0021]
FIG. 2 shows “test year”, “test name”, “test date and time”, and “character name” for each character string called a tag surrounded by two identification symbols of a start part “<>” and a terminal part “<//>”. It shows that the data of “test card” is composed of the five data of “test hall” and “examinee”.
[0022]
FIG. 2 shows that the data “examinee” is composed of two data “name” and “date of birth”, and “name” is “name” and “name”, and “date of birth”. Also indicates that it is composed of a nested structure of a plurality of data of "era", "year", "month", and "day".
[0023]
As shown in FIG. 3, the fixed-length file 3 is a file in which the storage position of each data in the record, the length to be used (the number of digits), and the length of one record are determined. It can be processed by existing systems that operate on frames and the like. A form in which each data item is distinguished by a character symbol such as a comma is also possible.
[0024]
The file designating means 4 designates a plurality of pieces of XML data 2 collectively. In practice, the file designating means 4 stores a predetermined folder of a file system managed by an OS (Operating System) of a computer that realizes the file conversion system 1. In this example, a plurality of pieces of XML data 2 are recorded.
[0025]
The conversion format designating means 5 is a text format parameter file in which each record (line) is composed of the conversion information 7 or the fixed insertion character information 8. FIG. 4 shows an embodiment of the conversion format instruction means 5.
[0026]
The conversion information 7 describes a conversion method for the specific data of the XML data 2 and specifies the target data in the XML data 2 and the length, the padding character, the padding direction, and the like of the data in the fixed length file 3. Things.
[0027]
In FIG. 4, for example, the description of the conversion information 7 of “<Mr.>;<Name>;<Examinee>;<Examinationticket> =” on the fifth line is the “Examination test” in the XML data 2 describing the “Examination ticket”. This is a conversion format for “name” of “name” of “person” data.
[0028]
The description of the conversion information 7 of “<address>;<examinee>;<examinationticket> =” on the seventh line is described in “<field_name” of the “examinee” data of the XML data 2 describing the “examination ticket”. > = ”, Indicating that the actual target data is“ Tokyo ”enclosed by“ <value> ”tags in the“ <field_name> ”tag.
[0029]
Further, for example, in the description of the conversion information 7 relating to “month” on the tenth line, “2,“ 0 ”, R” to the right of “=” indicates that “2” is two digits long. When "0" is a single-digit month, it indicates that "0 (zero)" is padded before, such as "01", and "R" indicates that data is stored right-justified. Is shown.
[0030]
As described above, the conversion information 7 describes specific data in the XML data 2 in the order of nested tags, such as “<Mr>;<Name>;<Examinee>;<Examinationticket>”. However, when a tag can be uniquely determined in the XML data 2 such as “era”, the enumeration of the nested structure of the tag can be omitted.
[0031]
Of course, if it is not necessary to specify whether the data is to be stored in a packed character or to the left or right due to the same length in the XML data 2 and the fixed-length file 3, the corresponding information is omitted. May be.
[0032]
The fixed insertion character information 8 specifies a character to be fixedly inserted at a specific position, for example, when the length of the record (line) is fixed or when items are separated by commas. The fixed insertion character information 8 is designated by "<<" and ">>" in FIG. 4 in order to distinguish it from normal data items.
[0033]
In the twelfth line in FIG. 4, the effective record length of the fixed-length file 3 is 80 bytes by inserting ““ ”(blank) for four characters by“ << Filer >> = 4, “”. Is shown.
[0034]
Further, “<< delimit >>> = <CR><LF>” on the thirteenth line indicates that a character code “<CR><LF>” for a line feed is inserted at the end of the record.
[0035]
The fixed insertion character information 8 is not limited to the description after the conversion information 7 such as the record length adjustment and the line feed character code. The description in the line may specify that a character code is inserted at a specific position in the fixed-length file 3. Of course, if it is not necessary to insert a fixed character, it is possible to omit it.
[0036]
The conversion unit 6 sequentially reads the plurality of XML data 2 specified by the file specification unit 4, sequentially converts the XML data 2 into the fixed-length file 3 based on the conversion format specifying unit 5, and finally converts one A long file 3 is generated.
[0037]
Next, the operation of the file conversion system 1 of the present invention will be described in detail with reference to FIG.
[0038]
The conversion unit 6 reads one piece of XML data 2 from the plurality of pieces of XML data 2 recorded by the file designating unit 4 in accordance with, for example, the order of file names.
[0039]
Next, the conversion means 6 converts the XML data 2 into the fixed-length file 3 by reading the conversion format instruction means 5 prepared in advance by editor software or word processing software and processing the XML data 2 in order from the first line.
[0040]
In the actual conversion process, first, according to the conversion information 7, while following the data structure of the XML data 2, the specified tag is searched for and the target data is specified.
[0041]
For example, in the conversion information 7 shown in the first line of FIG. 4, the tag "<test year>;<examinationticket>" is specified, so the XML data 2 in FIG. The tags are traced in the order of “<test year>” in the second line from “<test card>”, and “test year” is specified as target data.
[0042]
Also, in the conversion information 7 shown in the seventh line in FIG. 4, the tag “<address>;<examinee>;<examinationticket>” is specified, but the XML data in FIG. There is no tag. In this case, “address” is described in the field_name attribute of the tag, that is, the target data is specified by the description “<field_name =“ address ”>”.
[0043]
Next, the conversion means 6 secures a data area for the length specified by the conversion information 7, and transfers the specified data value to the output buffer area right or left justified in accordance with the instruction of the packing direction. . At this time, if the target data is less than the specified length, the character specified by the padding character is added.
[0044]
When the target data is specified by the attribute, such as the field_name attribute, the value of the data specified by the “<value>” tag included in the attribute tag is used. In the case of the XML data 2 in FIG. 2, "Tokyo" is the actual data.
[0045]
If the tag specified by the fixed insertion character information 8 or the conversion information 7 does not exist in the XML data 2, the data area of the specified length is filled with the character specified by the padding character.
[0046]
The above-described specification of the data and the transfer to the output buffer area are repeated for all the rows of the conversion format designating means 5.
[0047]
After the conversion format instructing means 5 completes the processing for all the rows, the output buffer area is written as one record of the fixed length file 3.
[0048]
For all the XML data 2 designated by the file designating unit 4, by reading from the conversion format designating unit 5 and writing it out to the fixed-length file 3 in the output buffer area, for example, the file designating unit 4 converts the XML of 10 files into XML. When data 2 is specified, a fixed-length file 3 having 10 records is generated.
[0049]
As described above, the present invention has been described in detail based on the embodiments. However, the file conversion system according to the present invention is not limited to the above-described embodiments at all, and various modifications may be made without departing from the spirit of the present invention. It is a matter of course that the change of is possible.
[0050]
【The invention's effect】
As described above, according to the file conversion system of the present invention, it is possible to efficiently convert a plurality of conversion source XML data into fixed-length files without going through an RDBMS.
[0051]
Also, by preparing a parameter file by the conversion format designating means, it is possible to convert XML data into a fixed-length file without developing a program for each XML data.
[Brief description of the drawings]
FIG. 1 is a configuration diagram showing an embodiment of the present invention.
FIG. 2 is an explanatory diagram of XML data of the present invention.
FIG. 3 is an explanatory diagram of a fixed-length file according to the present invention.
FIG. 4 is an explanatory diagram of a conversion format instruction unit according to the present invention.
FIG. 5 is a flowchart showing the operation of the embodiment of the present invention.
[Explanation of symbols]
1 file conversion system 2 XML data 3 fixed length file 4 file designation means 5 conversion format instruction means 6 conversion means 7 conversion information 8 fixed insertion character information

Claims (10)

コンピュータ読み取り可能なファイルを、異なるコンピュータシステムが使用する異なる形式のファイルに変換するシステムであって、
少なくとも一つ以上の変換元ファイルを一括で指定可能なファイル指定手段と、前記変換元ファイルの各データの出力ファイルに格納する際の変換形式を指示する変換形式指示手段と、
前記複数の変換元ファイルを順次読み込み、前記変換形式指示手段に基づいてデータの変換を施し、一つの出力ファイルを生成する変換手段と、
を備えることを特徴とするファイル変換システム。
A system for converting a computer readable file into a different format for use by different computer systems,
File designation means for collectively specifying at least one or more conversion source files, and conversion format instructing means for indicating a conversion format when storing each data of the conversion source file in an output file;
A conversion unit that sequentially reads the plurality of conversion source files, performs data conversion based on the conversion format instruction unit, and generates one output file;
A file conversion system comprising:
請求項1記載のファイル変換システムであって、
前記変換元ファイルが、
各々所定の識別記号により始端部と終端部とを指示した複数のデータおよび/またはデータの属性、
を備えることを特徴とするファイル変換システム。
The file conversion system according to claim 1, wherein
The conversion source file is
A plurality of data and / or data attributes each indicating a start end and an end by a predetermined identification symbol;
A file conversion system comprising:
請求項1または2記載のファイル変換システムであって、
前記変換形式指示手段が、
前記変換元ファイル内の1データを指定し、出力ファイルの1レコード内における当該データの変換形式を指定する変換情報と、
出力ファイルの1レコードを所定の長さに一定にするために、または項目を区切るために固定個所に挿入する文字を指示する固定挿入文字情報と、
を備えることを特徴とするファイル変換システム。
The file conversion system according to claim 1 or 2,
The conversion format instruction means,
Conversion information specifying one data in the conversion source file and specifying a conversion format of the data in one record of the output file;
Fixed insertion character information indicating a character to be inserted at a fixed location to make one record of the output file constant at a predetermined length or to separate items;
A file conversion system comprising:
請求項1から3のいずれかに記載のファイル変換システムであって、
前記変換情報が、
前記変換元ファイル内のデータの各々を指示する所定の識別記号の記述、
を備えることを特徴とするファイル変換システム。
The file conversion system according to any one of claims 1 to 3,
The conversion information,
Description of a predetermined identification symbol indicating each of the data in the conversion source file,
A file conversion system comprising:
請求項1から4のいずれかに記載のファイル変換システムであって、
前記変換情報が、
前記変換元ファイル中の複数のデータの入れ子構造を示す、前記所定の識別記号のリストの記述、
を備えることを特徴とするファイル変換システム。
The file conversion system according to any one of claims 1 to 4,
The conversion information,
A description of the list of the predetermined identification symbols, showing a nested structure of a plurality of data in the conversion source file,
A file conversion system comprising:
請求項1から5のいずれかに記載のファイル変換システムであって、
前記変換情報が、
変換元ファイルの当該データが前記出力ファイル中に占めるデータ長と、
変換元ファイルの当該データが前記データ長に満たない場合に、当該データに付加することにより前記データ長を満たすための詰め文字と、
変換元ファイルの当該データを前記出力ファイル中において、左右どちらに詰めて格納するかの詰め方向指定と、
を備えることを特徴とするファイル変換システム。
The file conversion system according to any one of claims 1 to 5,
The conversion information,
The data length of the conversion source file in the output file,
When the data of the conversion source file is shorter than the data length, a padding character for satisfying the data length by adding to the data,
In the output file, the data of the conversion source file in the output file is specified to be packed left or right;
A file conversion system comprising:
請求項1から6のいずれかに記載のファイル変換システムであって、
前記変換形式指示手段が、
前記変換ファイル中の1データに係る変換情報、または固定挿入文字情報を、1レコード毎に記述したテキスト形式のパラメータファイルである、
ことを特徴とするファイル変換システム。
The file conversion system according to any one of claims 1 to 6,
The conversion format instruction means,
It is a text-format parameter file in which conversion information or fixed insertion character information relating to one data in the conversion file is described for each record.
A file conversion system, characterized in that:
コンピュータ読み取り可能なファイルを、異なるコンピュータシステムが使用する異なる形式のファイルに変換する方法であって、
少なくとも一つ以上の変換元ファイルに対する変換を一括で指定する段階と、
前記変換元ファイル内の各データ項目の出力ファイルに格納する際の変換形式を指示する段階と、
前記複数の変換元ファイルを順次読み込む段階と、
前記指示した変換形式に基づきデータの変換を行う段階と、
前記複数の変換元ファイル全てから、前記変換形式に基づく一つの出力ファイルを生成する段階と、
を設けたことを特徴とするファイル変換方法。
A method of converting a computer readable file into a different format for use by different computer systems,
A step of collectively specifying conversions for at least one or more source files;
Indicating a conversion format when storing in the output file of each data item in the conversion source file,
Reading the plurality of conversion source files sequentially;
Performing data conversion based on the instructed conversion format;
Generating an output file based on the conversion format from all of the plurality of conversion source files;
A file conversion method characterized by comprising:
コンピュータを請求項1から7記載のファイル変換システムとして機能させるプログラム。A program that causes a computer to function as the file conversion system according to claim 1. コンピュータを請求項1から7記載のファイル変換システムとして機能させるプログラムを記録したコンピュータ読み取り可能な媒体。A computer-readable medium storing a program that causes a computer to function as the file conversion system according to claim 1.
JP2002174915A 2002-06-14 2002-06-14 System, method, program, and recording medium for file conversion Pending JP2004021551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002174915A JP2004021551A (en) 2002-06-14 2002-06-14 System, method, program, and recording medium for file conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002174915A JP2004021551A (en) 2002-06-14 2002-06-14 System, method, program, and recording medium for file conversion

Publications (1)

Publication Number Publication Date
JP2004021551A true JP2004021551A (en) 2004-01-22

Family

ID=31173761

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002174915A Pending JP2004021551A (en) 2002-06-14 2002-06-14 System, method, program, and recording medium for file conversion

Country Status (1)

Country Link
JP (1) JP2004021551A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008282114A (en) * 2007-05-09 2008-11-20 Profield Co Ltd Information processor, server device, information processing system, information processing method, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008282114A (en) * 2007-05-09 2008-11-20 Profield Co Ltd Information processor, server device, information processing system, information processing method, and program

Similar Documents

Publication Publication Date Title
JP4755427B2 (en) Database access system and database access method
US5999937A (en) System and method for converting data between data sets
US7673235B2 (en) Method and apparatus for utilizing an object model to manage document parts for use in an electronic document
CN111767057B (en) Data processing method and device
US8806357B2 (en) Plug-ins for editing templates in a business management system
EP2189931A1 (en) Integrated document oriented templates
US20020049731A1 (en) Information processing method and apparatus
US7747942B2 (en) System and method for obtaining a markup language template through reversing engineering
EP2164004A1 (en) Generic data retrieval
US20020165883A1 (en) Electronic document management system
CN105589959A (en) Form processing method and form processing system
US20100131486A1 (en) Analyzer Engine
US20040210881A1 (en) Method of generating an application program interface for resource description framwork (RDF) based information
JP5794568B2 (en) Data editing apparatus and data editing method
JP2007179347A (en) Program verification support system
JP4234698B2 (en) Structured document processing system
JP2007041983A (en) Application form creation program and application form creation apparatus
JP2004021551A (en) System, method, program, and recording medium for file conversion
US8578268B2 (en) Rendering electronic documents having linked textboxes
JP4165086B2 (en) Apparatus and method for storing XML data in RDB, apparatus and method for acquiring XML data from RDB, and program
JP2001256043A (en) Correction history managing method and correction history management system of program source
Ross et al. FAIRer Data through Digital Recording: The FAIMS Mobile Experience
JPS6122822B2 (en)
US20110185274A1 (en) Mark-up language engine
Ripley Lazy loading and packages in R 2.0. 0

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050608

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080708

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080905

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081007

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090224