JPH10232803A - Program conversion system - Google Patents

Program conversion system

Info

Publication number
JPH10232803A
JPH10232803A JP9035822A JP3582297A JPH10232803A JP H10232803 A JPH10232803 A JP H10232803A JP 9035822 A JP9035822 A JP 9035822A JP 3582297 A JP3582297 A JP 3582297A JP H10232803 A JPH10232803 A JP H10232803A
Authority
JP
Japan
Prior art keywords
program
sentence
relational database
file
fixed
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
JP9035822A
Other languages
Japanese (ja)
Inventor
Seiichi Kondo
誠一 近藤
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP9035822A priority Critical patent/JPH10232803A/en
Publication of JPH10232803A publication Critical patent/JPH10232803A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a program conversion system for easily and surely converting a program sentence by an ISAM form to the program sentence by a relational data base language. SOLUTION: This system is provided with an instruction extraction part 11 for extracting the program sentence relating to access to the data base of the ISAM form from a conversion origin program 2, an automatic SQL sentence generation part 12 for automatically generating an SQL sentence for defining a relational data base and a table, etc., for using data base definition information extracted from the program sentence extracted by the instruction extraction part 11 by applying it to a prepared routine sentence and an automatic program generation part 13 for completing the program sentence required for relational data base access by applying the SQL sentence generated by the automatic SQL sentence generation part 12 to the prepared routine sentence and automatically generating a program (post conversion program 3) for accessing the relational data base by SQL.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、情報処理システ
ム上に構築されたデータベースへのアクセスを行うため
のプログラムの変換方式、特にISAM(Indexed Sequ
ential Access Method)形式のデータベースを使用する
プログラムを関係データベースを使用するプログラムに
変換する際におけるデータベースアクセス部分の文の変
換方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program conversion method for accessing a database built on an information processing system, and more particularly to an ISAM (Indexed Sequencing).
The present invention relates to a method for converting a sentence of a database access part when converting a program using a database of a ential access method format into a program using a relational database.

【0002】[0002]

【従来の技術】情報処理システムで実行されるプログラ
ムには、システム内に構築されたデータベースへのアク
セスを行うための宣言文や実行文等のプログラム文が通
常記述されており、プログラム実行時には、この実行文
のアクセス結果に基づいて様々な処理が続けて行われ
る。
2. Description of the Related Art In a program executed in an information processing system, a program statement such as a declaration statement or an execution statement for accessing a database built in the system is usually described. Various processes are continuously performed based on the access result of the executable statement.

【0003】ところで、システムの利用形態の変更に伴
って、情報処理システム上に構築されたISAM形式の
データベース(以下、「ISAMデータベース」)から
関係データベースへの移行を行う場合、ISAMデータ
ベースと関係データベースでは、アクセス方式が大きく
異なるため、データベースを単に入れ換えるだけでなく
プログラム内のISAM形式によるプログラム文を関係
データベースのプログラム文に新たに書き直す必要が生
じてくる。この書換作業は、通常、手動で行われてい
た。
[0003] By the way, with the change of the use form of the system, when an ISAM format database (hereinafter referred to as "ISAM database") constructed on the information processing system is to be migrated to a relational database, an ISAM database and a relational database are required. In this case, since the access method is greatly different, it is necessary to rewrite not only the database but also rewrite a program sentence in the ISAM format in the program into a program sentence in the relational database. This rewriting operation is usually performed manually.

【0004】しかし、このような手法では、ISAMと
関係データベースの両者の知識が不十分であるための実
行性能の低下を招き、更には手動による正確さの低下と
変換の手間がある。そこで、この問題を解消するものと
して、特開昭63−11537号公報に開示された「プ
ログラム変換処理方式」がある。図23は、この従来の
「プログラム変換処理方式」を示すブロック図である。
この方法は、変換すべきプログラムからデータベースア
クセス部分を解析して抽出データを生成し、その情報を
もとにプログラム変換を行うものである。
[0004] However, such a technique causes a decrease in execution performance due to inadequate knowledge of both the ISAM and the relational database, and further requires manual accuracy reduction and conversion. To solve this problem, there is a "program conversion processing system" disclosed in Japanese Patent Application Laid-Open No. 63-11537. FIG. 23 is a block diagram showing this conventional "program conversion processing method".
In this method, a database access part is analyzed from a program to be converted to generate extracted data, and the program is converted based on the information.

【0005】また、一般的なプログラム変換方法とし
て、特開平1−31233号公報に開示された「プログ
ラミング言語自動変換方法および装置並びに計算機シス
テム」がある。図24は、「プログラミング言語自動変
換方法および装置並びに計算機システム」を示すブロッ
ク図である。この方法では、1対1に対応しない文法で
表現された2つのプログラミング言語の自動変換を、変
換対象文の前後関係に基づいて変換効率を上げるもので
ある。
[0005] As a general program conversion method, there is an "programming language automatic conversion method and apparatus, and a computer system" disclosed in Japanese Patent Application Laid-Open No. 1-312233. FIG. 24 is a block diagram showing the “programming language automatic conversion method and device and the computer system”. In this method, automatic conversion between two programming languages expressed by a grammar that does not correspond one-to-one increases conversion efficiency based on the context of a conversion target sentence.

【0006】また、SQL埋め込み分生成に関するもの
として、特開平3−182932号公報に開示された
「プログラム生成方式」がある。図25は、「プログラ
ム生成方式」を示すブロック図である。この方法では、
処理仕様書等を入力としてテーブル定義に基づいてSQ
Lを埋め込んだプログラムを生成するものである。
[0006] Also, as a method relating to the generation of an SQL embedded portion, there is a "program generation method" disclosed in Japanese Patent Application Laid-Open No. 3-182933. FIG. 25 is a block diagram showing the “program generation method”. in this way,
SQ based on table definition with processing specifications etc. as input
A program in which L is embedded is generated.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、特開平
63−111537号公報に示された従来の「プログラ
ム変換処理方式」では、抽出データごとに処理し、その
指令語欄の内容によって変換対応ファイルを索引して、
さらにそれに対応する原形プログラムを引くので、IS
AMデータベースに対する処理、関係データベースにお
けるテーブルへの処理という大幅にその構造が異なるも
のに対しては、個々の要素の変換のみでは、十分に対応
することができないという課題があった。
However, in the conventional "program conversion processing method" disclosed in Japanese Patent Application Laid-Open No. 63-1111537, processing is performed for each extracted data, and a conversion corresponding file is processed according to the contents of the command word column. Index,
In addition, since the corresponding original program is drawn,
There is a problem that it is not possible to sufficiently cope with the processing of the AM database and the processing of the table in the relational database, which have greatly different structures, only by converting individual elements.

【0008】また、特開平1−31233号公報に示さ
れた従来の「プログラミング言語自動変換方法および装
置並びに計算機システム」では、一般の1対1に対応し
ない文法で表現された2つのプログラミング言語の自動
変換に関して対象文の前後を解析して変換後に文を決定
する方法を取っているので、特開平63−111537
号公報と同様に、局所的な要素の変換のみとなり、IS
AMと関係データベースといった大幅に構造が異なる場
合には、十分に対応することができないという課題があ
った。
Further, in the conventional "programming language automatic conversion method and apparatus and computer system" disclosed in Japanese Patent Application Laid-Open No. HEI 1-312233, two programming languages expressed by a grammar that does not correspond to general one-to-one correspondence are used. Japanese Patent Laid-Open No. 63-1111537 discloses a method of analyzing before and after a target sentence for automatic conversion and determining a sentence after the conversion.
In the same manner as in Japanese Patent Publication No.
When the structure is significantly different, such as AM and a relational database, there is a problem that it is not possible to cope sufficiently.

【0009】更に、特開平3−182932号公報に示
された従来の「プログラム生成方式」では、処理仕様書
等を使用して関係データベースアクセスを目的とするS
QLを埋め込んだプログラムを生成することを目的とし
ており、プログラムを変換する過程では、SQL文生成
という部分についてのみ利用することが可能となってい
る。SQL文自動生成に関しては、仕様書から指定する
という手段を取っており、SQL文で必要となる情報を
すべて仕様書に与えざるを得ないという課題があった。
Further, in the conventional "program generation method" disclosed in Japanese Patent Application Laid-Open No. 3-182293, the S program for accessing a relational database using a processing specification or the like is used.
The purpose is to generate a program in which QL is embedded, and in the process of converting the program, it is possible to use only a part called SQL sentence generation. With regard to automatic generation of an SQL sentence, there is a problem in that a means of designating from a specification is employed, and all information necessary for the SQL sentence must be provided to the specification.

【0010】本発明は以上のような問題を解決するため
になされたものであり、その目的は、データベースを利
用するアプリケーションプログラムからISAM形式に
よるプログラム文を自動的に抽出し、それを関係データ
ベース言語によるプログラム文に容易にかつ確実に変換
することができるプログラム変換システムを提供するこ
とである。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to automatically extract a program sentence in an ISAM format from an application program using a database, and to extract the program sentence in a relational database language. To provide a program conversion system that can easily and surely convert to a program sentence.

【0011】[0011]

【課題を解決するための手段】以上のような目的を達成
するために、第1の発明に係るプログラム変換システム
は、索引付きアクセスファイルをデータベースとして使
用する変換元プログラムに含まれる、使用するデータベ
ース、レコード、データ等を定義する定義文、データベ
ースアクセス命令等の実行文など前記索引付きアクセス
ファイルアクセスに関連したプログラム文を、関係デー
タベース管理システムによって管理される関係データベ
ースを使用するためのプログラム文に変換することによ
って関係データベースを使用する変換後プログラムを生
成するプログラム変換システムにおいて、前記変換元プ
ログラムの中から索引付きアクセスデータベースアクセ
スに関連したプログラム文を抽出する文抽出手段と、前
記文抽出手段により抽出された定義文から抽出したデー
タベース定義情報を予め用意した定型文に当てはめるこ
とによって使用する前記関係データベース、テーブルを
定義する関係データベース定義文を自動生成する関係デ
ータベース定義文自動生成手段と、前記関係データベー
ス定義文自動生成手段により生成された関係データベー
ス定義文を予め用意した定型文に当てはめることによっ
て前記関係データベースアクセスに必要なプログラムを
自動生成する関係データベースプログラム文自動生成手
段とを有するものである。
In order to achieve the above object, a program conversion system according to a first aspect of the present invention provides a program conversion system which uses an indexed access file as a database. A program statement related to the access to the indexed access file, such as a definition statement defining records, data, etc., and an execution statement such as a database access instruction, into a program statement for using a relational database managed by a relational database management system. In a program conversion system that generates a converted program using a relational database by converting, a statement extraction unit that extracts a program statement related to access to an indexed access database from the conversion source program, and a statement extraction unit. Yo A relational database definition statement automatic generation means for automatically generating a relational database definition statement for defining a relational database definition statement for defining a relational database and a table to be used by applying database definition information extracted from the extracted definition statement to a fixed form sentence prepared in advance; A relational database program sentence automatic generation means for automatically generating a program necessary for accessing the relational database by applying a relational database definition sentence generated by the database definition sentence automatic generation means to a fixed form sentence prepared in advance.

【0012】第2の発明に係るプログラム変換システム
は、第1の発明において、前記関係データベース定義文
自動生成手段は、前記変換元プログラムが累積型の順フ
ァイルと索引を持つ0個以上のファイルとを使用する形
態を有するプログラムである場合に限定使用する第1の
定型文を有し、前記関係データベースプログラム文自動
生成手段は、前記第1の定型文に対応した第2の定型文
を有するものである。
In a program conversion system according to a second aspect, in the first aspect, the relational database definition sentence automatic generation means is arranged such that the conversion source program stores zero or more files having a cumulative sequential file and an index. A first fixed phrase that is used only when the program has a form using the first fixed phrase, and the relational database program sentence automatic generation means has a second fixed phrase corresponding to the first fixed phrase. It is.

【0013】第3の発明に係るプログラム変換システム
は、第1の発明において、前記関係データベース定義文
自動生成手段は、前記変換元プログラムが累積型の索引
ファイルと索引を持つ0個以上のファイルとを使用する
形態を有するプログラムである場合に限定使用する第3
の定型文を有し、前記関係データベースプログラム文自
動生成手段は、前記第3の定型文に対応した第4の定型
文を有するものである。
[0013] In a third aspect of the present invention, in the first aspect of the present invention, the relational database definition sentence automatic generation means includes: a conversion source program that stores a cumulative index file and zero or more files having an index; 3rd use only if the program has a form that uses
The relational database program sentence automatic generation means has a fourth fixed sentence corresponding to the third fixed sentence.

【0014】第4の発明に係るプログラム変換システム
は、第1の発明において、前記関係データベース定義文
自動生成手段は、前記変換元プログラムがキーでランダ
ムにアクセスすることができる累積型の索引ファイルと
索引を持つ0個以上のファイルとを使用する形態を有す
るプログラムである場合に限定使用する第5の定型文を
有し、前記関係データベースプログラム文自動生成手段
は、前記第5の定型文に対応した第6の定型文を有する
ものである。
According to a fourth aspect of the present invention, in the program conversion system according to the first aspect, the relational database definition sentence automatic generation means includes a cumulative index file which the conversion source program can randomly access with a key. A fifth fixed phrase used only when the program has a form using zero or more files having an index, wherein the relational database program sentence automatic generation means corresponds to the fifth fixed phrase. It has a sixth fixed form sentence.

【0015】第5の発明に係るプログラム変換システム
は、第1の発明において、前記関係データベース定義文
自動生成手段は、前記変換元プログラムが累積型の順フ
ァイルと索引を持つ集計ファイルとを使用し、かつ集計
命令を記述したプログラム文の実行結果に基づいて前記
集計ファイルを更新する形態を有するプログラムである
場合に限定使用する第7の定型文を有し、前記関係デー
タベースプログラム文自動生成手段は、前記第7の定型
文に対応した第8の定型文を有するものである。
According to a fifth aspect of the present invention, in the program conversion system according to the first aspect, the relational database definition sentence automatic generation means uses the cumulative type sequential file and the total file having the index as the conversion source program. And a seventh fixed phrase used only when the program has a mode of updating the total file based on the execution result of the program statement describing the total command, wherein the relational database program statement automatic generation means includes: , And an eighth fixed sentence corresponding to the seventh fixed sentence.

【0016】第6の発明に係るプログラム変換システム
は、第1の発明において、前記関係データベースプログ
ラム文自動生成手段が用意している複数の定型文の中か
ら使用するものを指定する定型文指定手段を有するもの
である。
A program conversion system according to a sixth aspect of the present invention is the program conversion system according to the first aspect, wherein a fixed form sentence designating means for designating one to be used from a plurality of fixed forms prepared by the relational database program sentence automatic creation means. It has.

【0017】第7の発明に係るプログラム変換システム
は、第1の発明において、前記関係データベース定義文
自動生成手段は、前記変換元プログラムが前記変換元プ
ログラムが累積型の順ファイルのデータに基づいて索引
ファイルを参照する形態を有するプログラムである場合
に限定使用され、前記データに基づいて前記各ファイル
を結合させる第9の定型文を有し、前記関係データベー
スプログラム文自動生成手段は、前記第9の定型文に対
応した第10の定型文を有するものである。
According to a seventh aspect of the present invention, in the program conversion system according to the first aspect, the relational database definition statement automatic generation means is arranged such that the conversion source program is based on data of a sequential file in which the conversion source program is cumulative. The program is used only when the program has a form that refers to an index file, and has a ninth fixed phrase that combines the files based on the data. Has a tenth fixed phrase corresponding to the fixed phrase.

【0018】第8の発明に係るプログラム変換システム
は、第1の発明において、前記関係データベース定義文
自動生成手段は、前記変換元プログラムが累積型の順フ
ァイルのデータに基づいて索引ファイルを参照する形態
を有するプログラムである場合に限定使用され、前記デ
ータに基づいて前記各ファイルを関連付けてビューを生
成する第11の定型文を有し、前記関係データベースプ
ログラム文自動生成手段は、前記第11の定型文に対応
した第12の定型文を有するものである。
According to an eighth aspect of the present invention, in the program conversion system according to the first aspect, the relational database definition statement automatic generation means refers to the index file based on data of the sequential file in which the conversion source program is cumulative. The program has an eleventh fixed phrase that is used only when the program has a form and associates each of the files based on the data to generate a view. It has a twelfth fixed phrase corresponding to the fixed phrase.

【0019】[0019]

【発明の実施の形態】以下、図面に基づいて、本発明の
好適な実施の形態について説明する。なお、本実施の形
態では、関係データベース言語としてSQLを使用する
場合で説明する。もちろん、他の関係データベース言語
にも適用可能であることはいうまでもない。
Preferred embodiments of the present invention will be described below with reference to the drawings. In this embodiment, a case where SQL is used as a relational database language will be described. Of course, it is needless to say that the present invention can be applied to other relational database languages.

【0020】実施の形態1.図1は、本発明に係るプロ
グラム変換システムの一実施の形態を示した概略構成図
である。本システムは、情報処理システムの一部又はそ
の全体を構成する。図1に示した本システムは、命令抽
出部11、SQL文自動生成部12及びプログラム自動
生成部13を含むプログラム変換部10と、入力処理部
1とで構成される。プログラム変換部10は、変換元プ
ログラム2を入力とし、また、必要に応じて入力処理部
1からシステムエンジニア等により設定された内容を入
力とし、変換後プログラム3に変換するというプログラ
ム変換処理を行うことになる。
Embodiment 1 FIG. 1 is a schematic configuration diagram showing an embodiment of a program conversion system according to the present invention. This system constitutes a part or the whole of an information processing system. The system shown in FIG. 1 includes a program conversion unit 10 including an instruction extraction unit 11, an automatic SQL statement generation unit 12, and a program automatic generation unit 13, and an input processing unit 1. The program conversion unit 10 performs a program conversion process in which the conversion source program 2 is input and, if necessary, the contents set by a system engineer or the like from the input processing unit 1 are input and converted into the converted program 3. Will be.

【0021】命令抽出部11は、文抽出手段として設け
られ、変換元プログラム2の中から索引付きアクセスデ
ータベースアクセスに関連したプログラム文を抽出す
る。SQL文自動生成部12は、関係データベース定義
文自動生成手段として設けられ、命令抽出部11により
抽出された定義文から抽出したデータベース定義情報
を、予め用意した定型文に当てはめることによって使用
する関係データベース、テーブルを定義する関係データ
ベース定義文(SQL文)を自動生成する。プログラム
自動生成部13は、関係データベースプログラム文自動
生成手段として設けられ、SQL文自動生成部12によ
り生成されたSQL文を、予め用意した定型文に当ては
めることによって関係データベースアクセスに必要なプ
ログラム文を完成させ、SQLによる関係データベース
をアクセスするプログラム(変換後プログラム3)を自
動生成する。
The instruction extracting unit 11 is provided as sentence extracting means, and extracts a program sentence related to access to the indexed access database from the conversion source program 2. The SQL sentence automatic generation unit 12 is provided as a relational database definition sentence automatic generation unit, and is used by applying database definition information extracted from the definition sentence extracted by the instruction extraction unit 11 to a prepared fixed sentence. , A relational database definition statement (SQL statement) for defining a table is automatically generated. The program automatic generation unit 13 is provided as a relational database program statement automatic generation unit, and applies a SQL statement generated by the SQL statement automatic generation unit 12 to a standardized sentence prepared in advance, thereby generating a program statement necessary for relational database access. After completion, a program (the converted program 3) for accessing the relational database by SQL is automatically generated.

【0022】本実施の形態においては、変換元プログラ
ム2を、ISAMファイルをデータベースとして使用す
るように記述し、かつ、累積型の順ファイル(累積ファ
イル)と索引を持つ0個以上のマスターファイルを使用
し、累積ファイル“RUISEKI”に含まれるデータに基づ
いて商品マスターファイル“SHOMAS”を参照するCOB
OLプログラムとする。なお、COBOLプログラムの
場合、使用する索引付きアクセスファイル、データベー
ス並びにレコード(データ)長、形式等それらに含まれ
るレコード(データ)に関する情報を事前に定義文で宣
言しておき、READ、MOVE等の命令等の実行文で
データベースにアクセスを実際に行うことになる。ま
た、本実施の形態では、データベース内のデータ項目に
関する情報を扱うプログラム文(項目移動命令等)も実
行文に含まれるものとする。また、本実施の形態におい
ては、変換後プログラム3を、関係データベースをRD
O(Remote Data Object)でアクセス
するVisual Basicのプログラムとする。
In the present embodiment, the conversion source program 2 is described so as to use an ISAM file as a database, and zero or more master files having an accumulation type sequential file (accumulation file) and an index are defined. COB that uses and references the product master file “SHOMAS” based on the data contained in the cumulative file “RUISEKI”
OL program. In the case of the COBOL program, information on the indexed access file, the database, and the record (data) included in the record (data) length, format, etc. used in the COBOL program is declared in advance by a definition statement, and READ, MOVE, etc. The database is actually accessed by an executable statement such as an instruction. Also, in the present embodiment, it is assumed that a program statement (such as an item move instruction) that handles information about a data item in the database is also included in the executable statement. In the present embodiment, the converted program 3 is stored in the relational database RD.
It is a Visual Basic program accessed by O (Remote Data Object).

【0023】本実施の形態において特徴的なことは、予
め用意したSQL文に基づく定型文に変換元プログラム
2から得たデータベース情報を当てはめることによって
関係データベースのプログラム文を自動生成するように
したことである。これにより、ISAM形式によるプロ
グラムを関係データベースのプログラムに容易にかつ確
実に変換することができる。
A feature of this embodiment is that a program sentence of a relational database is automatically generated by applying database information obtained from the conversion source program 2 to a fixed sentence based on a prepared SQL sentence. It is. As a result, a program in the ISAM format can be easily and reliably converted into a program in the relational database.

【0024】次に、本実施の形態における動作につい
て、図2に示したフローチャートを用いて説明する。
Next, the operation of this embodiment will be described with reference to the flowchart shown in FIG.

【0025】ステップ100において、命令抽出部11
は、変換元プログラム2からデータレコード定義(FILE
CONTROL,SELECT等)、ファイルアクセス命令(OPEN,REA
D,MOVE等)、項目移動命令(MOVE)などのプログラム文
を抽出する。例えば、図3に示すCOBOLのステート
メントが抽出される。なお、この抽出は、予めCOBO
Lのステートメントリストに含まれるステートメントと
変換元プログラム2の各プログラム文とを逐次比較する
など従来からある手法を用いることでできる。
In step 100, the instruction extracting unit 11
Is the data record definition (FILE
CONTROL, SELECT, etc.), file access instructions (OPEN, REA
D, MOVE, etc.), and program statements such as an item move instruction (MOVE) are extracted. For example, the statement of COBOL shown in FIG. 3 is extracted. Note that this extraction is performed in advance by COBO
A conventional method such as sequentially comparing statements included in the statement list of L with each program statement of the conversion source program 2 can be used.

【0026】ステップ110において、SQL文自動生
成部12は、上述した累積ファイル及びマスターファイ
ルそれぞれをテーブルに対応させたSQL文を自動生成
する。これは、ファイル名をテーブル名に、FD句をSELE
CT文のフィールドに、キーを入力パラメータに対応させ
ることで生成できる。本実施の形態におけるSQL文自
動生成部12は、変換元プログラム2が累積ファイルと
索引を持つ0個以上のファイル(マスターファイル)と
を使用する形態を有するプログラムである場合に限定使
用する図4に示した第1の定型文を有しており、変換元
プログラム2から抽出したデータベース定義情報、すな
わち累積ファイル、マスターファイル及び各々に含まれ
るデータの名称をこの定型文の下線部分にはめ込むだけ
で関係データベース定義文(SQL文)を生成すること
ができる。
In step 110, the SQL sentence automatic generation unit 12 automatically generates an SQL sentence in which each of the above-described cumulative file and master file is associated with a table. This means that the file name is the table name and the FD clause is SELECT
It can be generated by associating a key with an input parameter in the CT statement field. The SQL sentence automatic generation unit 12 in the present embodiment is used only when the conversion source program 2 is a program having a form using an accumulated file and zero or more files (master files) having an index. And the database definition information extracted from the conversion source program 2, that is, the names of the cumulative file, the master file, and the data contained in each of them, are simply inserted into the underlined portions of this fixed phrase. A relational database definition statement (SQL statement) can be generated.

【0027】ステップ120において、プログラム自動
生成部13は、SQL文自動生成部12が生成したSQ
L文に基づいて変換後プログラム3として書き込まれる
SQL文を自動生成する。本実施の形態では、RUISEKI
テーブルから参照された商品IDを示すS-IDが商品マス
ターを参照するキーとなる。本実施の形態におけるプロ
グラム自動生成部13は、SQL文自動生成部12が持
つ第1の定型文に対応した図5に示した第2の定型文を
有している。この定型文は、変換後プログラム3の基
(枠組み)となる。SQL文自動生成部12が生成した
SQL文を図5に示した第2の定型文の下線部分にはめ
込むだけで変換後プログラム3を自動生成することがで
きる。
In step 120, the program automatic generation unit 13 generates the SQ generated by the SQL statement automatic generation unit 12.
An SQL statement written as the post-conversion program 3 is automatically generated based on the L statement. In the present embodiment, RUISEKI
The S-ID indicating the product ID referenced from the table is a key for referring to the product master. The automatic program generation unit 13 in the present embodiment has a second fixed expression shown in FIG. 5 corresponding to the first fixed expression possessed by the automatic SQL sentence generation unit 12. This fixed phrase is the basis (framework) of the post-conversion program 3. The converted program 3 can be automatically generated simply by fitting the SQL sentence generated by the SQL sentence automatic generation unit 12 into the underlined portion of the second fixed sentence shown in FIG.

【0028】以上のように、本実施の形態によれば、変
換元プログラム2が累積ファイルと索引を持つ0個以上
のマスターファイルとを使用する形態を有するプログラ
ムである場合に限定使用する図4に示した第1の定型文
を予め用意しておくようにしたので、変換元プログラム
2からは、累積ファイル及びマスターファイルに関する
情報の抽出のみに注目すればよいことになる。また、累
積ファイルを1レコードずつ読み込み、特定の項目をキ
ーとしてマスターファイルを参照するような構造を予め
規定した第2の定型文を予め用意しておくようにしたの
で、関係データベースをアクセスするプログラムへの変
換を容易にかつ確実に行うことができる。
As described above, according to the present embodiment, the conversion source program 2 is used only when the conversion source program 2 is a program having a form using an accumulated file and zero or more master files having an index. Is prepared in advance, so that the conversion source program 2 only needs to pay attention to the extraction of information on the cumulative file and the master file. In addition, since the second fixed phrase preliminarily defining a structure in which the cumulative file is read one record at a time and the master file is referred to by using a specific item as a key is prepared in advance, a program for accessing the relational database is prepared. Can be easily and reliably performed.

【0029】実施の形態2.本実施の形態においては、
変換元プログラム2を、ISAMファイルをデータベー
スとして使用するように記述し、かつ、累積型の索引フ
ァイル(累積ファイル)と索引を持つ0個以上のマスタ
ーファイルとを使用し、キー順にソートする形態に合致
する累積ファイル“RUISEKI”に含まれるデータに基づ
いて商品マスターファイル“SHOMAS”を参照するCOB
OLプログラムとする。
Embodiment 2 In the present embodiment,
The conversion source program 2 is described in such a manner that the ISAM file is used as a database, and is sorted in the key order using a cumulative index file (cumulative file) and zero or more master files having an index. COB that refers to the product master file “SHOMAS” based on the data contained in the matching cumulative file “RUISEKI”
OL program.

【0030】次に、本実施の形態における動作につい
て、図6に示したフローチャートを用いて説明する。
Next, the operation of this embodiment will be described with reference to the flowchart shown in FIG.

【0031】ステップ200において、命令抽出部11
は、変換元プログラム2からデータレコード定義等のプ
ログラム文を抽出する。この処理は、上記実施の形態1
におけるステップ100と同じなので詳細は省略する。
In step 200, the instruction extracting unit 11
Extracts a program sentence such as a data record definition from the conversion source program 2. This processing is performed in the first embodiment.
, The details are omitted.

【0032】ステップ210において、SQL文自動生
成部12は、上述した累積ファイル及びマスターファイ
ルそれぞれをテーブルに対応させたSQL文を自動生成
する。これは、ファイル名をテーブル名に、FD句をSELE
CT文のフィールドに、キーを入力パラメータに対応させ
ることができる。本実施の形態におけるSQL文自動生
成部12は、変換元プログラム2が累積型の索引ファイ
ル(累積ファイル)と索引を持つ0個以上のファイル
(マスターファイル)とを使用する形態を有するプログ
ラムである場合に限定使用する図7に示した第3の定型
文を有している。この定型文には、第1の定型文にORDE
R BY句が付加されており、変換元プログラム2から抽出
したデータベース定義情報、すなわち累積ファイル、マ
スターファイル及び各々に含まれるデータの名称、更に
は累積ファイルのキーであるRUIIDの順に読み込むよう
にこの定型文の下線部分にはめ込むだけで関係データベ
ース定義文(SQL文)を生成することができる。
In step 210, the SQL sentence automatic generation unit 12 automatically generates an SQL sentence in which each of the above-mentioned cumulative file and master file is associated with a table. This means that the file name is the table name and the FD clause is SELECT
A key can be associated with an input parameter in the CT statement field. The SQL sentence automatic generation unit 12 according to the present embodiment is a program having a form in which the conversion source program 2 uses a cumulative index file (cumulative file) and zero or more files (master files) having an index. It has the third fixed form sentence shown in FIG. 7 which is used only in the case. In this fixed phrase, ORDE is added to the first fixed phrase.
An RBY clause is added, and the database definition information extracted from the conversion source program 2, that is, the cumulative file, the master file and the names of the data included in each, and the RUIID that is the key of the cumulative file are read in this order. A relational database definition sentence (SQL sentence) can be generated simply by fitting it into the underlined portion of the fixed sentence.

【0033】ステップ220において、プログラム自動
生成部13は、SQL文自動生成部12が生成したSQ
L文に基づいて変換後プログラム3として書き込まれる
SQL文を、第3の定型文に対応した第4の定型文を用
いることによって自動生成する。本実施の形態では、
“RUISEKI”テーブルから参照された商品IDである“S
-ID”が商品マスターを参照するキーとなる。変換した
結果のVisual Basicのプログラムの内容は、実施の形態
1とSQL文の部分が異なるだけである。
In step 220, the program automatic generation unit 13 generates the SQ generated by the SQL statement automatic generation unit 12.
An SQL sentence written as the post-conversion program 3 based on the L sentence is automatically generated by using a fourth fixed sentence corresponding to the third fixed sentence. In the present embodiment,
"S" which is the product ID referenced from the "RUISEKI" table
-ID "is a key for referring to the product master. The contents of the converted Visual Basic program are the same as those of the first embodiment except for the SQL statement.

【0034】以上のように、本実施の形態によれば、変
換元プログラム2が累積型の索引ファイルと索引を持つ
0個以上のマスターファイルとを使用し、かつ、それら
を関連付けてキー順にソートする形態を有するプログラ
ムである場合に限定使用する図7に示した第3の定型文
を予め用意しておくようにしたので、変換元プログラム
2からは、累積ファイル及びマスターファイルに関する
情報の抽出のみに注目すればよいことになる。すなわ
ち、第3の定型文にキー順読み出しを指定するORDER BY
句を設定したので、1レコードずつ読み込み、特定の項
目をキーとしてマスターファイルを参照する形態の変換
後プログラムへの変換を容易かつ確実に行うことができ
る。
As described above, according to the present embodiment, the conversion source program 2 uses a cumulative index file and zero or more master files having an index, and sorts them in key order by associating them. Since the third fixed phrase shown in FIG. 7 which is used only when the program has the form shown in FIG. 7 is prepared in advance, only the extraction of the information on the cumulative file and the master file from the conversion source program 2 is performed. Attention should be paid to In other words, ORDER BY that specifies key order reading in the third fixed phrase
Since the phrase is set, it is possible to read the record one record at a time, and to easily and reliably convert the program into a post-conversion program in a form in which the master file is referred to using a specific item as a key.

【0035】実施の形態3.本実施の形態においては、
変換元プログラム2を、ISAMファイルをデータベー
スとして使用するように記述し、かつ、キーでランダム
にアクセスすることができる累積型の索引ファイル(累
積ファイル)と索引を持つ0個以上のマスターファイル
を使用し、累積ファイル“RUISEKI”に含まれるデータ
に基づいて商品マスターファイル“SHOMAS”を参照する
COBOLプログラムとする。
Embodiment 3 FIG. In the present embodiment,
The conversion source program 2 is described so as to use an ISAM file as a database, and uses a cumulative index file (cumulative file) that can be randomly accessed with a key and zero or more master files having an index. Then, the COBOL program refers to the product master file “SHOMAS” based on the data included in the cumulative file “RUISEKI”.

【0036】次に、本実施の形態における動作につい
て、図8に示したフローチャートを用いて説明する。
Next, the operation of this embodiment will be described with reference to the flowchart shown in FIG.

【0037】ステップ300において、命令抽出部11
は、変換元プログラム2からデータレコード定義等のプ
ログラム文を抽出する。この処理は、上記実施の形態1
におけるステップ100と同じなので詳細は省略する。
In step 300, the instruction extracting unit 11
Extracts a program sentence such as a data record definition from the conversion source program 2. This processing is performed in the first embodiment.
, The details are omitted.

【0038】ステップ310において、SQL文自動生
成部12は、上述した累積ファイル及びマスターファイ
ルそれぞれをテーブルに対応させたSQL文を自動生成
する。これは、ファイル名をテーブル名に、FD句をSELE
CT文のフィールドに、キーを入力パラメータに対応させ
ることができる。本実施の形態におけるSQL文自動生
成部12は、変換元プログラム2がキーでランダムにア
クセスすることができる累積型の索引ファイル(累積フ
ァイル)と索引を持つ0個以上のファイル(マスターフ
ァイル)とを使用する形態を有するプログラムである場
合に限定使用する図9に示した第5の定型文を有してい
る。この定型文には、第1の定型文にWHERE句を付加し
て累積ファイルのキーである“RUIID”を外部から与え
られるように設定されており、この定型文の下線部分に
はめ込むだけで関係データベース定義文(SQL文)を
生成することができる。
In step 310, the SQL sentence automatic generation unit 12 automatically generates an SQL sentence in which each of the above-described cumulative file and master file is associated with a table. This means that the file name is the table name and the FD clause is SELECT
A key can be associated with an input parameter in the CT statement field. The SQL sentence automatic generation unit 12 according to the present embodiment includes a cumulative index file (cumulative file) that the conversion source program 2 can randomly access with a key, and zero or more files (master files) having an index. The fifth fixed phrase shown in FIG. 9 which is used only when the program has a form using. This fixed phrase is set so that “RUIID”, which is the key of the accumulation file, can be given from the outside by adding a WHERE clause to the first fixed phrase. A database definition statement (SQL statement) can be generated.

【0039】ステップ320において、プログラム自動
生成部13は、SQL文自動生成部12が生成したSQ
L文に基づいて変換後プログラム3として書き込まれる
SQL文を、第5の定型文に対応した第6の定型文を用
いることによって自動生成する。本実施の形態では、外
部から与えられたキーに基づいて“RUISEKI”テーブル
を参照し、その商品IDである“S-ID”が商品マスター
を参照するキーとなる。図10に変換した結果のVisual
Basicのプログラム(第6の定型文)を示す。図10に
示した下線部にSQL文自動生成部12が生成したSQ
L文をはめ込むだけで、変換後プログラム3を自動生成
することができる。
In step 320, the program automatic generation unit 13 generates the SQ generated by the SQL statement automatic generation unit 12.
An SQL sentence written as the post-conversion program 3 based on the L sentence is automatically generated by using a sixth fixed sentence corresponding to the fifth fixed sentence. In the present embodiment, the “RUISEKI” table is referred to based on a key given from the outside, and the product ID “S-ID” is a key for referring to the product master. Visual converted as shown in Fig. 10
This shows a Basic program (sixth fixed phrase). The SQ generated by the SQL sentence automatic generation unit 12 is underlined in FIG.
By simply inserting the L sentence, the post-conversion program 3 can be automatically generated.

【0040】以上のように、本実施の形態によれば、変
換元プログラム2がキーでランダムにアクセスすること
ができる累積型の索引ファイルと索引を持つ0個以上の
マスターファイルとを使用するプログラムである場合に
限定使用する図9に示した第5の定型文を予め用意して
おくようにしたので、変換元プログラム2からは、累積
ファイル及びマスターファイルに関する情報の抽出のみ
に注目すればよいことになる。すなわち、第5の定型文
にWHERE句を設定したので、外部から指定したキーに対
応するレコードを読み込み、特定の項目をキーとしてマ
スターファイルを参照する形態の変換後プログラムへの
変換を容易かつ確実に行うことができる。
As described above, according to the present embodiment, the conversion source program 2 uses a cumulative index file that can be randomly accessed with a key and a program that uses zero or more master files having an index. In this case, the fifth fixed phrase shown in FIG. 9 that is used only in the case of is prepared in advance, so that the conversion source program 2 only needs to pay attention to the extraction of information on the cumulative file and the master file. Will be. That is, since the WHERE clause is set in the fifth fixed phrase, the record corresponding to the key specified from the outside is read, and the conversion to the post-conversion program in the form of referring to the master file using the specific item as a key is easy and reliable. Can be done.

【0041】実施の形態4.本実施の形態においては、
変換元プログラム2を、ISAMファイルをデータベー
スとして使用するように記述し、かつ、累積型の順ファ
イル(累積ファイル)と索引を持つ集計ファイルとを使
用し、集計命令を記述したプログラム文の実行結果に基
づいて集計ファイルを更新する形態を有するCOBOL
プログラムとする。より具体的には、累積ファイル“RU
ISEKI”から売上値“URIAGE”を商品ごとの集計ファイ
ル“SHUUKEI”の合計に足し込むプログラムである。
Embodiment 4 FIG. In the present embodiment,
An execution result of a program statement in which the conversion source program 2 is described so as to use the ISAM file as a database, and uses a cumulative type sequential file (cumulative file) and a totaling file having an index and describes a totaling instruction. Having a form for updating the aggregation file based on the COBOL
Program. More specifically, the cumulative file “RU
This program adds the sales value "URIAGE" from "ISEKI" to the total of the total file "SHUUKEI" for each product.

【0042】次に、本実施の形態における動作につい
て、図11に示したフローチャートを用いて説明する。
Next, the operation of this embodiment will be described with reference to the flowchart shown in FIG.

【0043】ステップ400において、命令抽出部11
は、変換元プログラム2からデータレコード定義等のプ
ログラム文を抽出する。例えば、図12に示すCOBO
Lのステートメントが抽出される。この処理は、上記実
施の形態1におけるステップ100と同じなので詳細は
省略する。
In step 400, the instruction extracting unit 11
Extracts a program sentence such as a data record definition from the conversion source program 2. For example, the COBO shown in FIG.
The statement of L is extracted. This process is the same as step 100 in the first embodiment, and thus details are omitted.

【0044】ステップ410において、SQL文自動生
成部12は、上述した累積ファイル及び集計ファイルそ
れぞれをテーブルに対応させたSQL文を自動生成す
る。これは、ファイル名をテーブル名に、FD句をSELECT
文のフィールドに、キーを入力パラメータに対応させる
ことができる。本実施の形態におけるSQL文自動生成
部12は、変換元プログラム2が累積型の索引ファイル
(累積ファイル)と索引を持つファイル(集計ファイ
ル)とを使用し、集計ファイルを更新するする形態を有
するプログラムである場合に限定使用する図13に示し
た第7の定型文を有している。従って、この定型文のUP
DATE文のSET句においてキーを入力パラメータに対応さ
せる。これにより、合計値を更新する命令を第7の定型
文の下線部にはめ込むだけで関係データベース定義文
(SQL文)を生成することができる。
In step 410, the SQL sentence automatic generation unit 12 automatically generates an SQL sentence in which each of the above-mentioned accumulation file and total file is associated with a table. This is because the file name is the table name and the FD clause is SELECT
In the statement field, keys can correspond to input parameters. The SQL sentence automatic generation unit 12 according to the present embodiment has a form in which the conversion source program 2 updates a total file using a cumulative index file (cumulative file) and a file having an index (total file). It has a seventh fixed phrase shown in FIG. 13 which is used only when it is a program. Therefore, this fixed phrase UP
Make the key correspond to the input parameter in the SET clause of the DATE statement. This makes it possible to generate a relational database definition sentence (SQL sentence) simply by inserting the instruction for updating the total value into the underlined portion of the seventh fixed-form sentence.

【0045】ステップ420において、プログラム自動
生成部13は、SQL文自動生成部12が生成したSQ
L文に基づいて変換後プログラム3として書き込まれる
SQL文を、第7の定型文に対応した第8の定型文を用
いることによって自動生成する。本実施の形態では、
“RUISEKI”テーブルを順に参照し、その商品IDであ
る“S-ID”に合致する“SHUUKEI”テーブルの行の“GOU
KEI”フィールドを更新する。図14に変換した結果のV
isual Basicのプログラム(第8の定型文)を示す。図
14に示した下線部にSQL文自動生成部12が生成し
たSQL文をはめ込むだけで、変換後プログラム3を自
動生成することができる。
In step 420, the program automatic generation unit 13 generates the SQ generated by the SQL statement automatic generation unit 12.
An SQL sentence written as the post-conversion program 3 based on the L sentence is automatically generated by using an eighth fixed sentence corresponding to the seventh fixed sentence. In the present embodiment,
Referring to the “RUISEKI” table in order, the “GOU” of the “SHUUKEI” table row that matches the product ID “S-ID”
Update the “KEI” field. V of the result converted to FIG.
This shows an isual Basic program (eighth fixed phrase). The converted program 3 can be automatically generated simply by fitting the SQL sentence generated by the SQL sentence automatic generation unit 12 into the underlined portion shown in FIG.

【0046】以上のように、本実施の形態によれば、変
換元プログラム2が累積型の順ファイル(累積ファイ
ル)と索引を持つ集計ファイルとを使用し、集計命令を
記述したプログラム文の実行結果に基づいて集計ファイ
ルを更新するプログラムである場合に限定使用する図1
3に示した第7の定型文を予め用意しておくようにした
ので、変換元プログラム2からは、累積ファイル及びマ
スターファイルに関する情報の抽出のみに注目すればよ
いことになる。すなわち、上記第7の定型文を用いるこ
とにより累積ファイルを1レコードずつ読み込み、特定
の項目をキーとして集計ファイルを参照して、集計デー
タを集計ファイルに足し込むという形態の変換後プログ
ラムへの変換を容易かつ確実に行うことができる。
As described above, according to the present embodiment, the conversion source program 2 executes the program statement in which the aggregation command is described by using the accumulation type sequential file (accumulation file) and the aggregation file having the index. FIG. 1 used only for a program that updates a tally file based on the result
Since the seventh fixed phrase shown in FIG. 3 is prepared in advance, the conversion source program 2 only needs to pay attention to the extraction of information on the cumulative file and the master file. That is, by using the seventh fixed phrase, the cumulative file is read one record at a time, the total file is referred to using the specific item as a key, and the total data is added to the total file. Can be performed easily and reliably.

【0047】実施の形態5.上記各実施の形態において
は、予め規定したそれぞれ特有の形態を持つ変換元プロ
グラム2を、所定の定型文を用いることによって容易に
かつ確実に関係データベースを使用するプログラムへ変
換することについて説明した。
Embodiment 5 In each of the above embodiments, it has been described that the conversion source program 2 having a specific form defined in advance is easily and reliably converted to a program using a relational database by using a predetermined fixed phrase.

【0048】本実施の形態では、上記実施の形態1〜4
で示した4種類の形態を例とし、システムエンジニア等
がこの中から変換を行う変換元プログラム2に合致する
形態を手動で選択できるようにしたことを特徴としてい
る。図1に示した入力処理部1は、本実施の形態におい
てSQL文自動生成部12が用意している上記複数の定
型文の中から使用するものを指定する定型文指定手段と
して設けられており、システムエンジニア等が入力処理
部1から何れかの形態を選択する。
In this embodiment, the first to fourth embodiments are described.
In this embodiment, a system engineer or the like can manually select a form that matches the conversion source program 2 to be converted from the four forms described above. The input processing unit 1 shown in FIG. 1 is provided as a fixed sentence designating unit for designating one to be used from among the plurality of fixed sentences prepared by the SQL sentence automatic generation unit 12 in the present embodiment. , A system engineer or the like selects any form from the input processing unit 1.

【0049】次に、本実施の形態における動作につい
て、図15に示したフローチャートを用いて説明する。
Next, the operation of this embodiment will be described with reference to the flowchart shown in FIG.

【0050】入力処理部1は、システムエンジニアによ
り選択された変換元プログラム2の形態を受け付けると
(ステップ500)、そのプログラム形態に応じたいず
れかの変換処理を行うことになる(ステップ510〜5
40)。すなわち、予め用意している何れかの定型文を
使用した変換処理を行うことになる。なお、各変換処理
(ステップ510〜540)の内容は、上記各実施の形
態において説明したので、その内容の詳細は省略する。
Upon receiving the form of the conversion source program 2 selected by the system engineer (step 500), the input processing unit 1 performs one of the conversion processes according to the program form (steps 510 to 5).
40). That is, conversion processing using any of the prepared fixed sentences is performed. Since the contents of each conversion process (steps 510 to 540) have been described in the above embodiments, the details of the contents will be omitted.

【0051】以上のように、本実施の形態によれば、変
換対象とする変換元プログラムの形態と合致するもの
を、複数の予め規定した特定の形態からシステムエンジ
ニア等が手動で選択できるようにしたので、変換元プロ
グラムから抽出するデータベース関連の情報を特定する
ことができる。これにより、変換後プログラムの形態を
予め規定できるという特徴を持ち、かつ、プログラム変
換可能な形態の範囲を拡大することができる。
As described above, according to the present embodiment, a system engineer or the like can manually select a program conforming to the format of a conversion source program to be converted from a plurality of predetermined specific formats. Therefore, it is possible to specify database-related information extracted from the conversion source program. This has the feature that the form of the converted program can be specified in advance, and the range of the form in which the program can be converted can be expanded.

【0052】なお、上記説明では、実施の形態1〜4で
説明した処理のうち何れかを選択するようにしたが、他
の定型文の形態を用意した他の変換処理を選択対象とし
て追加することができる。
In the above description, one of the processes described in the first to fourth embodiments is selected. However, another conversion process in which another fixed sentence form is prepared is added as a selection target. be able to.

【0053】実施の形態6.本実施の形態においては、
変換元プログラム2を、累積型の順ファイルのデータに
基づいて索引ファイルを参照する形態を有するCOBO
Lプログラムとする。特に、本実施の形態では、この累
積ファイル“RUISEKI”からマスターファイル“SHOMA
S”を参照する部分について、関係データベースの結合
処理を含むSQL文を自動生成して変換後プログラム3
に埋め込むことを特徴としている。
Embodiment 6 FIG. In the present embodiment,
COBO having a form in which the conversion source program 2 refers to an index file based on data of a cumulative type sequential file
Let it be an L program. In particular, in the present embodiment, the master file “SHOMAKI” is obtained from the accumulated file “RUISEKI”.
For the part referring to "S", an SQL statement including a relational database joining process is automatically generated and the converted program 3
The feature is to embed in.

【0054】次に、本実施の形態における動作につい
て、図16に示したフローチャートを用いて説明する。
Next, the operation of this embodiment will be described with reference to the flowchart shown in FIG.

【0055】ステップ600において、命令抽出部11
は、変換元プログラム2からデータレコード定義等のプ
ログラム文を抽出する。この処理は、上記実施の形態1
におけるステップ100と同じであり、図3に示した処
理結果を得る。
In step 600, the instruction extracting unit 11
Extracts a program sentence such as a data record definition from the conversion source program 2. This processing is performed in the first embodiment.
Is the same as step 100, and the processing result shown in FIG. 3 is obtained.

【0056】ステップ610において、SQL文自動生
成部12は、上述した累積ファイル“RUISEKI”及びマ
スターファイル“SHOMAS”それぞれをテーブルに対応さ
せた“RUISEKI”テーブルと“SHOMAS”テーブルとを関
係演算の結合処理を含む参照用のSQL文を生成する。
本実施の形態におけるSQL文自動生成部12は、変換
元プログラム2が累積型の順ファイル(累積ファイル)
のデータに基づいて索引ファイルを参照する形態を有す
るプログラムである場合に限定使用する第9の定型文を
有している。このような変換元プログラム2である場合
にこの図17に示した定型文を用いることにより、累積
型の順ファイルと索引を持つマスターファイルを参照し
て関連付ける形態であるという情報から、“RUISEKI”
テーブルの列“S-ID”から“SHOMAS”テーブルの列“SH
OID”と関連付けて図17に示した定型文の下線部分に
はめ込むだけで関係データベース定義文(SQL文)を
自動生成することができる。
In step 610, the SQL sentence automatic generation unit 12 combines the "RUISEKI" table and the "SHOMAS" table in which the above-mentioned cumulative file "RUISEKI" and master file "SHOMAS" correspond to the tables, by performing a relational operation. A reference SQL sentence including a process is generated.
In the SQL sentence automatic generation unit 12 according to the present embodiment, the conversion source program 2 is a cumulative sequential file (cumulative file).
Ninth fixed phrase that is used only when the program has a form that refers to the index file based on the above data. By using the fixed phrase shown in FIG. 17 in the case of such a conversion source program 2, it is determined from the information that the cumulative forward file and the master file having the index are referred to and associated with each other.
From the column “S-ID” in the table to the column “SH” in the “SHOMAS” table
It is possible to automatically generate a relational database definition sentence (SQL sentence) simply by associating it with the OID "and inserting it into the underlined portion of the fixed sentence shown in FIG.

【0057】ステップ620において、プログラム自動
生成部13は、SQL文自動生成部12が生成したSQ
L文に基づいて変換後プログラム3として書き込まれる
SQL文を、第9の定型文に対応した第10の定型文を
用いることによって自動生成する。図18には、第10
の定型文が示されており、この定型文の下線部にSQL
文自動生成部12が生成したSQL文をはめ込むことに
よって順に行を参照する変換後プログラム3を自動生成
することができる。
In step 620, the program automatic generation unit 13 generates the SQ generated by the SQL statement automatic generation unit 12.
An SQL sentence written as the post-conversion program 3 based on the L sentence is automatically generated by using a tenth fixed sentence corresponding to the ninth fixed sentence. FIG. 18 shows the tenth
Is shown, and the underlined part of this fixed phrase is SQL
By inserting the SQL sentence generated by the automatic sentence generation unit 12, the post-conversion program 3 that sequentially refers to the rows can be automatically generated.

【0058】以上のように、本実施の形態によれば、変
換元プログラムが累積型の順ファイルのデータに基づい
て索引ファイルを参照する形態を有するプログラムであ
る場合に限定使用する第9の定型文を予め用意しておく
ようにしたので、変換元プログラムからは、上記各ファ
イルに関する情報の抽出のみに注目すればよく、簡便で
ある。また、第9の定型文に対応した変換後プログラム
の基になる第10の定型文を予め用意しておくようにし
たので、関係データベースをアクセスするプログラムへ
の変換を容易にかつ確実に行うことができる。また、累
積ファイルからマスターファイルを参照する部分につい
て、関係データベースの結合処理を含むSQL文を自動
生成してプログラムの中に埋め込むことにより、プログ
ラム固有のSQL文に基づいて結合されたデータを読み
込むだけで、キーを指定してマスターファイルを参照す
る必要がないため、プログラム構造が単純で実行性能の
よい変換後プログラム3を自動生成することができる。
As described above, according to the present embodiment, the ninth fixed format is used only when the conversion source program is a program having a mode of referring to the index file based on the data of the cumulative sequential file. Since the sentences are prepared in advance, it is convenient to pay attention only to the extraction of information on each file from the conversion source program, which is convenient. In addition, since the tenth fixed phrase which is the basis of the converted program corresponding to the ninth fixed phrase is prepared in advance, the conversion to the program for accessing the relational database can be easily and reliably performed. Can be. In addition, for a part that refers to the master file from the accumulated file, an SQL statement including a connection process of the relational database is automatically generated and embedded in the program, so that only the data combined based on the SQL statement unique to the program is read. Since it is not necessary to specify the key and refer to the master file, the converted program 3 having a simple program structure and high execution performance can be automatically generated.

【0059】実施の形態7.本実施の形態においては、
変換元プログラム2を、累積型の順ファイルのデータに
基づいて索引ファイルを参照する形態を有するCOBO
Lプログラムとする。特に、本実施の形態では、この累
積ファイル“RUISEKI”からマスターファイル“SHOMA
S”を参照する部分について、関係データベースの結合
処理を含むSQL文を自動生成してビュー“RUISEKI_SH
OMAS”として登録することを特徴としている。
Embodiment 7 FIG. In the present embodiment,
COBO having a form in which the conversion source program 2 refers to an index file based on data of a cumulative type sequential file
Let it be an L program. In particular, in the present embodiment, the master file “SHOMAKI” is obtained from the accumulated file “RUISEKI”.
For the part referring to "S", an SQL statement including the join processing of the relational database is automatically generated and the view "RUISEKI_SH
It is characterized in that it is registered as "OMAS".

【0060】次に、本実施の形態における動作につい
て、図19に示したフローチャートを用いて説明する。
Next, the operation of the present embodiment will be described with reference to the flowchart shown in FIG.

【0061】ステップ700において、命令抽出部11
は、変換元プログラム2からデータレコード定義等のプ
ログラム文を抽出する。この処理は、上記実施の形態1
におけるステップ100と同じであり、図3に示した処
理結果を得る。
In step 700, the instruction extracting unit 11
Extracts a program sentence such as a data record definition from the conversion source program 2. This processing is performed in the first embodiment.
Is the same as step 100, and the processing result shown in FIG. 3 is obtained.

【0062】ステップ710において、SQL文自動生
成部12は、上述した累積ファイル“RUISEKI”及びマ
スターファイル“SHOMAS”それぞれをテーブルに対応さ
せた“RUISEKI”テーブルと“SHOMAS”テーブルとを関
係演算の結合処理を含むビュー“RUISEKI_SHOMAS”生成
用のSQL文を自動生成する。本実施の形態におけるS
QL文自動生成部12は、変換元プログラム2が累積型
の順ファイル(累積ファイル)のデータに基づいて索引
ファイルを参照する形態を有するプログラムである場合
に限定使用する第11の定型文を有している。このよう
な変換元プログラム2である場合にこの定型文を用いる
ことにより、累積ファイル内のデータに基づいて累積フ
ァイルとマスターファイルとを関連付けてビューを自動
生成する。すなわち、累積型の順ファイルと索引を持つ
マスターファイルを参照して関連付ける形態であるとい
う情報から、“RUISEKI”テーブルの列“S-ID”から“S
HOMAS”テーブルの列“SHOID”と関連付けて図20に示
した定型文の下線部分にはめ込むだけで関係データベー
ス定義文(SQL文)のビュー定義部分を自動生成する
ことができる。
In step 710, the SQL sentence automatic generation unit 12 joins the “RUISEKI” table and the “SHOMAS” table, each of which corresponds to the cumulative file “RUISEKI” and the master file “SHOMAS”, with the relational operation. An SQL sentence for generating a view “RUISEKI_SHOMAS” including processing is automatically generated. S in the present embodiment
The QL sentence automatic generation unit 12 has an eleventh fixed phrase used only when the conversion source program 2 is a program having a mode of referring to an index file based on data of a cumulative sequential file (cumulative file). doing. By using this fixed sentence in the case of such a conversion source program 2, a view is automatically generated by associating a cumulative file with a master file based on data in the cumulative file. That is, from the information that the cumulative type sequential file and the master file having the index are referenced and associated, the “RUISEKI” table column “S-ID” to “S-ID”
The view definition portion of the relational database definition sentence (SQL sentence) can be automatically generated simply by associating it with the underlined portion of the fixed sentence shown in FIG. 20 in association with the column "SHOID" of the "HOMAS" table.

【0063】更に、SQL文自動生成部12は、ステッ
プ720において、図21に示した第11の定型文の下
線部分にはめ込むだけでビューRUISEKI_SHOMASを参照す
るSQL文のビュー参照部分を自動生成することができ
る。
Further, in step 720, the SQL sentence automatic generation unit 12 automatically generates a view reference portion of the SQL sentence referring to the view RUISEKI_SHOMAS simply by fitting it into the underlined portion of the eleventh fixed sentence shown in FIG. Can be.

【0064】ステップ730において、プログラム自動
生成部13は、SQL文自動生成部12が生成したSQ
L文に基づいて変換後プログラム3として書き込まれる
SQL文を、第11の定型文に対応した第12の定型文
を用いることによって自動生成する。図22には、第1
2の定型文が示されており、この定型文の下線部にSQ
L文自動生成部12が生成したSQL文をはめ込むこと
によって“RUISEKI_SHOMAS”ビューから順に行を参照す
る変換後プログラム3を自動生成することができる。
In step 730, the program automatic generation unit 13 generates the SQ generated by the SQL statement automatic generation unit 12.
An SQL sentence written as the post-conversion program 3 based on the L sentence is automatically generated by using a twelfth fixed sentence corresponding to the eleventh fixed sentence. FIG. 22 shows the first
2 is shown, and SQ is added to the underlined portion of the fixed phrase.
By inserting the SQL sentence generated by the automatic L sentence generation unit 12, the post-conversion program 3 that sequentially refers to the rows from the “RUISEKI_SHOMAS” view can be automatically generated.

【0065】以上のように、本実施の形態によれば、関
係データベースをアクセスする変換後プログラム3への
変換を容易にかつ確実に行うことができるだけでなく、
累積ファイルからマスターファイルを参照する部分につ
いて、関係データベースの結合処理を含むSQL文を自
動生成してビューとして登録するようにしたので、ビュ
ーを読み込むだけでキーを指定してマスターファイルを
参照する必要がないため、プログラム構造が単純で実行
性能のよい変換後プログラム3を自動生成することがで
きる。
As described above, according to the present embodiment, the conversion into the post-conversion program 3 for accessing the relational database can be performed easily and reliably.
For the part that refers to the master file from the accumulated file, an SQL statement including the join processing of the relational database is automatically generated and registered as a view, so it is necessary to refer to the master file by specifying the key just by reading the view Therefore, the converted program 3 having a simple program structure and good execution performance can be automatically generated.

【0066】[0066]

【発明の効果】本発明によれば、索引付きアクセスデー
タベースアクセスに関わる定義文から抽出したデータベ
ース定義情報を予め用意した定型文に当てはめることに
よって関係データベースを使用する変換後プログラムを
生成するようにしたので、そのプログラム変換処理を容
易にかつ確実に行うことができる。
According to the present invention, a converted program that uses a relational database is generated by applying database definition information extracted from a definition sentence relating to access to an indexed access database to a fixed phrase prepared in advance. Therefore, the program conversion process can be easily and reliably performed.

【0067】また、変換元プログラムが累積型の順ファ
イルと索引を持つ0個以上のファイルとを使用する形態
を有するプログラムである場合に限定使用する第1の定
型文を予め用意しておくようにしたので、変換元プログ
ラムからは、上記各ファイルに関する情報の抽出のみに
注目すればよく、簡便である。また、第1の定型文に対
応した変換後プログラムの基になる第2の定型文を予め
用意しておくようにしたので、関係データベースをアク
セスするプログラムへの変換を容易にかつ確実に行うこ
とができる。
Also, a first fixed phrase to be used only when the conversion source program is a program having a form using a cumulative sequential file and zero or more files having an index is prepared in advance. Therefore, it is only necessary to pay attention to the extraction of information on each of the files from the conversion source program, which is convenient. In addition, since the second fixed phrase that is the basis of the converted program corresponding to the first fixed phrase is prepared in advance, the conversion to the program that accesses the relational database can be easily and reliably performed. Can be.

【0068】また、変換元プログラムが累積型の索引フ
ァイルと索引を持つ0個以上のファイルとを使用する形
態を有するプログラムである場合に限定使用する第3の
定型文を予め用意しておくようにしたので、変換元プロ
グラムからは、上記各ファイルに関する情報の抽出のみ
に注目すればよく、簡便である。また、第3の定型文に
対応した変換後プログラムの基になる第4の定型文を予
め用意しておくようにしたので、関係データベースをア
クセスするプログラムへの変換を容易にかつ確実に行う
ことができる。
Also, a third fixed phrase to be used only when the conversion source program is a program having a form using a cumulative index file and zero or more files having an index is prepared in advance. Therefore, it is only necessary to pay attention to the extraction of information on each of the files from the conversion source program, which is convenient. In addition, since the fourth fixed phrase that is the basis of the converted program corresponding to the third fixed phrase is prepared in advance, the conversion to the program that accesses the relational database can be easily and reliably performed. Can be.

【0069】また、変換元プログラムがキーでランダム
にアクセスすることができる累積型の索引ファイルと索
引を持つ0個以上のファイルとを使用する形態を有する
プログラムである場合に限定使用する第5の定型文を予
め用意しておくようにしたので、変換元プログラムから
は、上記各ファイルに関する情報の抽出のみに注目すれ
ばよく、簡便である。また、第5の定型文に対応した変
換後プログラムの基になる第6の定型文を予め用意して
おくようにしたので、関係データベースをアクセスする
プログラムへの変換を容易にかつ確実に行うことができ
る。
Further, the fifth embodiment is used only when the conversion source program is a program having a form using a cumulative index file which can be randomly accessed with a key and zero or more files having an index. Since the fixed phrase is prepared in advance, the conversion source program only needs to pay attention to the extraction of information on each of the above files, which is convenient. In addition, since the sixth fixed phrase that is the basis of the converted program corresponding to the fifth fixed phrase is prepared in advance, the conversion to the program that accesses the relational database can be easily and reliably performed. Can be.

【0070】また、変換元プログラムが累積型の順ファ
イルと索引を持つ集計ファイルとを使用し、集計命令を
記述したプログラム文の実行結果に基づいて集計ファイ
ルを更新するプログラムである場合に限定使用する第7
の定型文を予め用意しておくようにしたので、変換元プ
ログラムからは、上記各ファイルに関する情報の抽出の
みに注目すればよく、簡便である。また、第7の定型文
に対応した変換後プログラムの基になる第8の定型文を
予め用意しておくようにしたので、関係データベースを
アクセスするプログラムへの変換を容易にかつ確実に行
うことができる。
Further, the conversion source program is used only when the conversion source program is a program that uses a cumulative sequential file and an aggregation file having an index and updates the aggregation file based on the execution result of a program statement describing an aggregation instruction. The seventh
Is prepared in advance, so that it is only necessary to pay attention to the extraction of information on each of the files from the conversion source program, which is convenient. In addition, since the eighth fixed phrase that is the basis of the converted program corresponding to the seventh fixed phrase is prepared in advance, the conversion to the program that accesses the relational database can be easily and reliably performed. Can be.

【0071】また、変換対象とする変換元プログラムの
形態と合致するものを、複数の予め規定した特定の形態
からシステムエンジニア等が手動で選択できるようにし
たので、変換元プログラムから抽出するデータベース関
連の情報を特定することができる。これにより、変換後
プログラムの形態を予め規定できるという特徴を持ち、
かつ、プログラム変換可能な形態の範囲を拡大すること
ができる。
Further, since a system engineer or the like can manually select a program that matches the format of the conversion source program to be converted from a plurality of specific formats specified in advance, a database-related program extracted from the conversion source program can be selected. Information can be specified. This has the feature that the form of the converted program can be defined in advance,
In addition, the range of the form in which the program can be converted can be expanded.

【0072】また、変換元プログラムが累積型の順ファ
イルのデータに基づいて索引ファイルを参照する形態を
有するプログラムである場合に限定使用する第9の定型
文を予め用意しておくようにしたので、変換元プログラ
ムからは、上記各ファイルに関する情報の抽出のみに注
目すればよく、簡便である。また、第9の定型文に対応
した変換後プログラムの基になる第10の定型文を予め
用意しておくようにしたので、関係データベースをアク
セスするプログラムへの変換を容易にかつ確実に行うこ
とができる。また、特に、累積ファイルから索引ファイ
ルを参照する部分について、関係データベースの結合処
理を含む関係データベース定義文を自動生成してプログ
ラムの中に埋め込むことにより、プログラム固有の関係
データベース定義文に基づいて結合されたデータを読み
込むだけで、キーを指定して索引ファイルを参照する必
要がないため、プログラム構造が単純で実行性能のよい
変換後プログラムを自動生成することができる。
Also, a ninth fixed phrase to be used only when the conversion source program is a program having a mode of referring to the index file based on the data of the cumulative sequential file is prepared in advance. From the conversion source program, it is only necessary to pay attention to the extraction of information on each of the above files, which is simple. In addition, since the tenth fixed phrase which is the basis of the converted program corresponding to the ninth fixed phrase is prepared in advance, the conversion to the program for accessing the relational database can be easily and reliably performed. Can be. In particular, for the part that refers to the index file from the accumulated file, the relational database definition statement including the relational database connection processing is automatically generated and embedded in the program, so that it is linked based on the program-specific relational database definition statement. Since it is not necessary to refer to the index file by designating a key only by reading the data thus converted, it is possible to automatically generate a converted program having a simple program structure and high execution performance.

【0073】また、変換元プログラムが累積型の順ファ
イルのデータに基づいて索引ファイルを参照する形態を
有するプログラムである場合に、関係データベースの結
合処理を含む関係データベース定義文を自動生成してビ
ューとして登録する第11の定型文を予め用意しておく
ようにしたので、変換元プログラムからは、上記各ファ
イルに関する情報の抽出のみに注目すればよく、簡便で
ある。また、第11の定型文に対応した変換後プログラ
ムの基になる第12の定型文を予め用意しておくように
したので、関係データベースをアクセスするプログラム
への変換を容易にかつ確実に行うことができる。また、
特に、累積ファイルから索引ファイルを参照する部分に
ついて、関係データベースの結合処理を含む関係データ
ベース定義文を自動生成してビューとして登録するよう
にしたので、ビューを読み込むだけでキーを指定してマ
スターファイルを参照する必要がないため、プログラム
構造が単純で実行性能のよい変換後プログラムを自動生
成することができる。
In the case where the conversion source program is a program that refers to an index file based on the data of a cumulative sequential file, a relational database definition statement including a relational database joining process is automatically generated and viewed. Since the eleventh fixed form sentence registered as "?" Is prepared in advance, the extraction of the information on each of the above files from the conversion source program is only required, which is convenient. Also, since the twelfth fixed phrase that is the basis of the converted program corresponding to the eleventh fixed phrase is prepared in advance, the conversion to the program that accesses the relational database can be easily and reliably performed. Can be. Also,
In particular, for the part that refers to the index file from the cumulative file, the relational database definition statement including the relational database join processing is automatically generated and registered as a view. , It is possible to automatically generate a converted program having a simple program structure and good execution performance.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明に係るプログラム変換システムの一実
施の形態を示した概略構成図である。
FIG. 1 is a schematic configuration diagram showing an embodiment of a program conversion system according to the present invention.

【図2】 実施の形態1における動作を示したフローチ
ャートである。
FIG. 2 is a flowchart showing an operation in the first embodiment.

【図3】 実施の形態1における命令抽出部が抽出した
変換元プログラムの一部を示した図である。
FIG. 3 is a diagram illustrating a part of a conversion source program extracted by an instruction extraction unit according to the first embodiment;

【図4】 実施の形態1におけるSQL文自動生成部の
出力であるSQL文を示した図である。
FIG. 4 is a diagram showing an SQL sentence which is an output of the SQL sentence automatic generation unit according to the first embodiment.

【図5】 実施の形態1におけるプログラム自動生成部
の出力である変換後プログラムを示した図である。
FIG. 5 is a diagram showing a converted program which is an output of a program automatic generation unit according to the first embodiment.

【図6】 実施の形態2における動作を示したフローチ
ャートである。
FIG. 6 is a flowchart showing an operation according to the second embodiment.

【図7】 実施の形態2におけるSQL文自動生成部の
出力であるSQL文を示した図である。
FIG. 7 is a diagram illustrating an SQL sentence output from an automatic SQL sentence generation unit according to the second embodiment.

【図8】 実施の形態3における動作を示したフローチ
ャートである。
FIG. 8 is a flowchart showing an operation in the third embodiment.

【図9】 実施の形態3におけるSQL文自動生成部の
出力であるSQL文を示した図である。
FIG. 9 is a diagram illustrating an SQL sentence output from an automatic SQL sentence generation unit according to the third embodiment.

【図10】 実施の形態3におけるプログラム自動生成
部の出力である変換後プログラムを示した図である。
FIG. 10 is a diagram showing a converted program which is an output of a program automatic generation unit according to the third embodiment.

【図11】 実施の形態4における動作を示したフロー
チャートである。
FIG. 11 is a flowchart showing an operation in the fourth embodiment.

【図12】 実施の形態4における命令抽出部が抽出し
た変換元プログラムの一部を示した図である。
FIG. 12 is a diagram illustrating a part of a conversion source program extracted by an instruction extraction unit according to the fourth embodiment.

【図13】 実施の形態4におけるSQL文自動生成部
の出力であるSQL文を示した図である。
FIG. 13 is a diagram showing an SQL sentence which is an output of an SQL sentence automatic generation unit according to the fourth embodiment.

【図14】 実施の形態4におけるプログラム自動生成
部の出力である変換後プログラムを示した図である。
FIG. 14 is a diagram showing a converted program which is an output of a program automatic generation unit according to the fourth embodiment.

【図15】 実施の形態5における動作を示したフロー
チャートである。
FIG. 15 is a flowchart showing an operation in the fifth embodiment.

【図16】 実施の形態6における動作を示したフロー
チャートである。
FIG. 16 is a flowchart showing an operation in the sixth embodiment.

【図17】 実施の形態6におけるSQL文自動生成部
の出力であるSQL文を示した図である。
FIG. 17 is a diagram illustrating an SQL sentence output from an automatic SQL sentence generation unit according to the sixth embodiment.

【図18】 実施の形態6におけるプログラム自動生成
部の出力である変換後プログラムを示した図である。
FIG. 18 is a diagram showing a converted program which is an output of a program automatic generation unit according to the sixth embodiment.

【図19】 実施の形態7における動作を示したフロー
チャートである。
FIG. 19 is a flowchart showing an operation in the seventh embodiment.

【図20】 実施の形態7におけるSQL文自動生成部
の出力であるSQL文(ビュー定義部分)を示した図で
ある。
FIG. 20 is a diagram illustrating an SQL sentence (view definition portion) output from an SQL sentence automatic generation unit according to the seventh embodiment.

【図21】 実施の形態7におけるSQL文自動生成部
の出力であるSQL文(ビュー参照部分)を示した図で
ある。
FIG. 21 is a diagram illustrating an SQL sentence (view reference portion) output from an SQL sentence automatic generation unit according to the seventh embodiment.

【図22】 実施の形態7におけるプログラム自動生成
部の出力である変換後プログラムを示した図である。
FIG. 22 is a diagram showing a converted program which is an output of an automatic program generation unit according to the seventh embodiment.

【図23】 従来の「プログラム変換処理方式」を示す
ブロック図である。
FIG. 23 is a block diagram showing a conventional “program conversion processing method”.

【図24】 従来の「プログラミング言語自動変換方法
および装置並びに計算機システム」を示すブロック図で
ある。
FIG. 24 is a block diagram showing a conventional “programming language automatic conversion method and device and computer system”.

【図25】 従来の「プログラム生成方式」の動作手順
を示すフローチャートである。
FIG. 25 is a flowchart showing an operation procedure of a conventional “program generation method”.

【符号の説明】[Explanation of symbols]

1 入力処理部、2 変換元プログラム、3 変換後プ
ログラム、10 プログラム変換部、11 命令抽出
部、12 SQL文自動生成部、13 プログラム自動
生成部。
1 input processing unit, 2 conversion source program, 3 converted program, 10 program conversion unit, 11 instruction extraction unit, 12 SQL statement automatic generation unit, 13 program automatic generation unit.

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 索引付きアクセスファイルをデータベー
スとして使用する変換元プログラムに含まれる、使用す
るデータベース、レコード、データ等を定義する定義
文、データベースアクセス命令等の実行文など前記索引
付きアクセスファイルアクセスに関連したプログラム文
を、関係データベース管理システムによって管理される
関係データベースを使用するためのプログラム文に変換
することによって関係データベースを使用する変換後プ
ログラムを生成するプログラム変換システムにおいて、 前記変換元プログラムの中から索引付きアクセスデータ
ベースアクセスに関連したプログラム文を抽出する文抽
出手段と、 前記文抽出手段により抽出された定義文から抽出したデ
ータベース定義情報を予め用意した定型文に当てはめる
ことによって使用する前記関係データベース、テーブル
を定義する関係データベース定義文を自動生成する関係
データベース定義文自動生成手段と、 前記関係データベース定義文自動生成手段により生成さ
れた関係データベース定義文を予め用意した定型文に当
てはめることによって前記関係データベースアクセスに
必要なプログラムを自動生成する関係データベースプロ
グラム文自動生成手段と、 を有することを特徴とするプログラム変換システム。
1. An indexed access file access, such as a definition statement defining a database, a record, data, etc. to be used, and an executable statement such as a database access instruction, included in a conversion source program using an indexed access file as a database. In a program conversion system for generating a converted program using a relational database by converting a related program statement into a program statement for using a relational database managed by a relational database management system, Sentence extracting means for extracting a program sentence related to access to an indexed access database from the database, and applying database definition information extracted from the definition sentence extracted by the sentence extracting means to a prepared fixed sentence. A relational database definition statement automatic generation means for automatically generating a relational database definition statement for defining the relational database and table to be used, and a fixed phrase prepared in advance for the relational database definition statement generated by the relational database definition statement automatic generation means And a relational database program statement automatic generation means for automatically generating a program necessary for accessing the relational database by applying to the program.
【請求項2】 前記関係データベース定義文自動生成手
段は、前記変換元プログラムが累積型の順ファイルと索
引を持つ0個以上のファイルとを使用する形態を有する
プログラムである場合に限定使用する第1の定型文を有
し、 前記関係データベースプログラム文自動生成手段は、前
記第1の定型文に対応した第2の定型文を有することを
特徴とする請求項1記載のプログラム変換システム。
2. The relational database definition sentence automatic generation means is used only when the conversion source program is a program having a form using a cumulative forward file and zero or more files having an index. The program conversion system according to claim 1, further comprising a first fixed sentence, wherein the relational database program sentence automatic generation means has a second fixed sentence corresponding to the first fixed sentence.
【請求項3】 前記関係データベース定義文自動生成手
段は、前記変換元プログラムが累積型の索引ファイルと
索引を持つ0個以上のファイルとを使用する形態を有す
るプログラムである場合に限定使用する第3の定型文を
有し、 前記関係データベースプログラム文自動生成手段は、前
記第3の定型文に対応した第4の定型文を有することを
特徴とする請求項1記載のプログラム変換システム。
3. The relational database definition sentence automatic generation means is used only when the conversion source program is a program having a form using a cumulative index file and zero or more files having an index. 3. The program conversion system according to claim 1, further comprising a third fixed sentence, wherein the relational database program sentence automatic generation unit has a fourth fixed sentence corresponding to the third fixed sentence.
【請求項4】 前記関係データベース定義文自動生成手
段は、前記変換元プログラムがキーでランダムにアクセ
スすることができる累積型の索引ファイルと索引を持つ
0個以上のファイルとを使用する形態を有するプログラ
ムである場合に限定使用する第5の定型文を有し、 前記関係データベースプログラム文自動生成手段は、前
記第5の定型文に対応した第6の定型文を有することを
特徴とする請求項1記載のプログラム変換システム。
4. The relational database definition sentence automatic generation means has a form in which the conversion source program uses a cumulative index file that can be randomly accessed with a key and zero or more files having an index. A fifth fixed sentence used only when the program is a program, wherein the relational database program sentence automatic generation means has a sixth fixed sentence corresponding to the fifth fixed sentence. 2. The program conversion system according to 1.
【請求項5】 前記関係データベース定義文自動生成手
段は、前記変換元プログラムが累積型の順ファイルと索
引を持つ集計ファイルとを使用し、かつ集計命令を記述
したプログラム文の実行結果に基づいて前記集計ファイ
ルを更新する形態を有するプログラムである場合に限定
使用する第7の定型文を有し、 前記関係データベースプログラム文自動生成手段は、前
記第7の定型文に対応した第8の定型文を有することを
特徴とする請求項1記載のプログラム変換システム。
5. The relational database definition statement automatic generation means, wherein the conversion source program uses a cumulative forward file and an aggregation file having an index, and based on an execution result of a program statement describing an aggregation instruction. A seventh fixed phrase used only when the program has a form for updating the aggregation file, the relational database program sentence automatic generation means includes an eighth fixed phrase corresponding to the seventh fixed phrase. 2. The program conversion system according to claim 1, further comprising:
【請求項6】 前記関係データベースプログラム文自動
生成手段が用意している複数の定型文の中から使用する
ものを指定する定型文指定手段を有することを特徴とす
る請求項1記載のプログラム変換システム。
6. A program conversion system according to claim 1, further comprising a fixed phrase designating unit for designating a plurality of fixed phrases prepared by said relational database program sentence automatic generating unit. .
【請求項7】 前記関係データベース定義文自動生成手
段は、前記変換元プログラムが前記変換元プログラムが
累積型の順ファイルのデータに基づいて索引ファイルを
参照する形態を有するプログラムである場合に限定使用
され、前記データに基づいて前記各ファイルを結合させ
る第9の定型文を有し、 前記関係データベースプログラム文自動生成手段は、前
記第9の定型文に対応した第10の定型文を有すること
を特徴とする請求項1記載のプログラム変換システム。
7. The relational database definition sentence automatic generation means is used only when the conversion source program is a program having a form in which the conversion source program refers to an index file based on data of a cumulative type sequential file. And a ninth fixed phrase for combining the files based on the data, wherein the relational database program sentence automatic generation means has a tenth fixed phrase corresponding to the ninth fixed phrase. The program conversion system according to claim 1, wherein:
【請求項8】 前記関係データベース定義文自動生成手
段は、前記変換元プログラムが累積型の順ファイルのデ
ータに基づいて索引ファイルを参照する形態を有するプ
ログラムである場合に限定使用され、前記データに基づ
いて前記各ファイルを関連付けてビューを生成する第1
1の定型文を有し、 前記関係データベースプログラム文自動生成手段は、前
記第11の定型文に対応した第12の定型文を有するこ
とを特徴とする請求項1記載のプログラム変換システ
ム。
8. The relational database definition sentence automatic generation means is used only when the conversion source program is a program having a form of referring to an index file based on data of a cumulative sequential file, and Generating a view by associating each of the files based on the first
2. The program conversion system according to claim 1, wherein the relational database program sentence automatic generation means has a twelfth fixed form sentence corresponding to the eleventh fixed form sentence. 3.
JP9035822A 1997-02-20 1997-02-20 Program conversion system Pending JPH10232803A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9035822A JPH10232803A (en) 1997-02-20 1997-02-20 Program conversion system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9035822A JPH10232803A (en) 1997-02-20 1997-02-20 Program conversion system

Publications (1)

Publication Number Publication Date
JPH10232803A true JPH10232803A (en) 1998-09-02

Family

ID=12452653

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9035822A Pending JPH10232803A (en) 1997-02-20 1997-02-20 Program conversion system

Country Status (1)

Country Link
JP (1) JPH10232803A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000043887A1 (en) * 1999-01-20 2000-07-27 Fujitsu Limited Database changing system and program storage medium
US6698010B1 (en) 1999-08-20 2004-02-24 Nec Corporation System, method and computer program product for automatic generation of data processing program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000043887A1 (en) * 1999-01-20 2000-07-27 Fujitsu Limited Database changing system and program storage medium
US6892197B2 (en) 1999-01-20 2005-05-10 Fujitsu Limited Database transition system and program storage medium
US6698010B1 (en) 1999-08-20 2004-02-24 Nec Corporation System, method and computer program product for automatic generation of data processing program

Similar Documents

Publication Publication Date Title
US7512633B2 (en) Conversion of hierarchically-structured HL7 specifications to relational databases
JP3921479B2 (en) Method and apparatus for database modeling and query using a structure similar to natural language
US5937410A (en) Method of transforming graphical object diagrams to product data manager schema
US5732262A (en) Database definition language generator
US20060235899A1 (en) Method of migrating legacy database systems
US20070143321A1 (en) Converting recursive hierarchical data to relational data
US7792851B2 (en) Mechanism for defining queries in terms of data objects
JP2007087216A (en) Hierarchical dictionary preparing device, program and hierarchical dictionary preparing method
JP3871832B2 (en) Data processing program automatic generation system and method, and computer-readable recording medium
JP2002342117A (en) Device, method and program for supporting test specification generation and recording medium
US20090228794A1 (en) Business specification comprehension assistance system and method
JP2007527058A (en) Form composition mechanism and method for linking data and meta data
CN113297251A (en) Multi-source data retrieval method, device, equipment and storage medium
JP2914664B2 (en) Automatic programming device
JPH10232803A (en) Program conversion system
CN113221528B (en) Automatic generation and execution method of clinical data quality evaluation rule based on openEHR model
JP2798118B2 (en) Database query statement creation device
JPH10111876A (en) Information retrieval device
JPH07146785A (en) Method for automatically generating program and device therefor
KR100656559B1 (en) Program Automatic Generating Tools
CA2359079A1 (en) Program reproducing method and device, and medium on which a program for program reproduction recording
JPH0588863A (en) Program development supporting system
JP3307476B2 (en) Data item definition standardization device
JP3419483B2 (en) Natural language processing apparatus and method
CN112925726A (en) Method for automatically generating database test case and storage medium