JP5581894B2 - Data processing program automatic generation system - Google Patents

Data processing program automatic generation system Download PDF

Info

Publication number
JP5581894B2
JP5581894B2 JP2010189092A JP2010189092A JP5581894B2 JP 5581894 B2 JP5581894 B2 JP 5581894B2 JP 2010189092 A JP2010189092 A JP 2010189092A JP 2010189092 A JP2010189092 A JP 2010189092A JP 5581894 B2 JP5581894 B2 JP 5581894B2
Authority
JP
Japan
Prior art keywords
processing
statement
definition
output
program
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.)
Active
Application number
JP2010189092A
Other languages
Japanese (ja)
Other versions
JP2012048438A (en
Inventor
友章 佐川
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2010189092A priority Critical patent/JP5581894B2/en
Publication of JP2012048438A publication Critical patent/JP2012048438A/en
Application granted granted Critical
Publication of JP5581894B2 publication Critical patent/JP5581894B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明はプログラムの自動生成に関し、特に、情報処理システム上に構築されたデータベースの表のデータを参照してデータ処理を行い、処理結果を再度データベースの表に格納したり、処理結果に基づいてデータベースの表のデータを更新したり、削除したりするデータ処理プログラムを自動的に生成するシステムに関する。   The present invention relates to automatic generation of a program, and in particular, performs data processing with reference to data in a database table constructed on an information processing system, stores the processing result in the database table again, or based on the processing result The present invention relates to a system that automatically generates a data processing program that updates or deletes data in a database table.

この種のデータ処理プログラム自動生成システムの一例が特許文献1に記載されている。特許文献1に記載されたデータ処理プログラム自動生成システム(以下、本発明に関連するデータ処理プログラム自動生成システムと記す)は、予めシステムに用意されたプログラムスケルトンと、利用者から入力される仕様とから、データ処理プログラムを作成する。   An example of this type of data processing program automatic generation system is described in Patent Document 1. A data processing program automatic generation system described in Patent Document 1 (hereinafter referred to as a data processing program automatic generation system related to the present invention) includes a program skeleton prepared in advance in the system and a specification input from a user. From this, a data processing program is created.

上記プログラムスケルトンは、仕様の如何に関わらず固定の部分のプログラムとして、前段処理部分と、この前段処理部分に続く繰り返し処理部分と、この繰り返し処理部分に続く後段処理部分を有している。また、プログラムスケルトンは、仕様によって変化する部分のプログラム断片の挿入位置として、前段処理部分内にプログラム名挿入位置と、カーソル定義文挿入位置と、作業変数定義文列挿入位置と、初期処理挿入位置を含み、繰り返し処理部分内に出力処理文列挿入位置を含み、後段処理部分に終了処理挿入位置を含んでいる。   The program skeleton has, as a fixed part program regardless of the specification, a pre-processing part, a repetitive processing part following the pre-processing part, and a post-processing part following the repetitive processing part. In addition, the program skeleton includes the program fragment insertion position, the cursor definition statement insertion position, the work variable definition statement string insertion position, and the initial process insertion position as the insertion position of the part of the program fragment that changes according to the specification. , The output processing statement string insertion position is included in the repetition processing portion, and the end processing insertion position is included in the subsequent processing portion.

上記仕様は、生成したプログラムに付与するプログラム名と、入力表の名前とその入力表の各項目の名前および型の情報を含む入力表項目定義と、セレクト文内に定義する入力表項目の名前を含むセレクト項目定義と、出力表の名前とその出力表の各項目の名前および型の情報を含む出力表項目定義と、各出力表の処理を行う条件を示す処理条件と、挿入、更新、削除の別を示す処理種別と、処理種別が更新と削除の場合に更新、削除するための条件を示す更新、削除条件と、処理種別が挿入と更新の場合に各項目の値を計算する処理式とを含む出力表処理定義と、入力表からデータを取得する際の条件を含むセレクト条件定義と、プログラムスケルトンをカスタマイズするためのその他の情報を含むプログラムカスタマイズ情報とを含んでいる。   The above specifications are the program name to be given to the generated program, the input table name, the input table item definition including the name and type information of each item of the input table, and the name of the input table item to be defined in the select statement Select item definition that includes, output table name and output table item definition that includes information on the name and type of each item in the output table, processing conditions indicating the conditions for processing each output table, insert, update, Process type that indicates the type of deletion, update when the process type is update and delete, update that indicates the condition for deleting, delete condition, and process that calculates the value of each item when the process type is insert and update Includes an output table processing definition that includes an expression, a select condition definition that includes conditions for obtaining data from the input table, and program customization information that includes other information to customize the program skeleton That.

そして、上記データ処理プログラム自動生成システムは、仕様から取得した情報および該情報から生成した情報をプログラムスケルトンの該当する箇所に挿入することにより、プログラムを完成させる。具体的には、入力された仕様からプログラム名とプログラムカスタマイズ情報とを取得し、取得したプログラム名をプログラムスケルトンのプログラム名挿入位置に挿入し、取得したプログラムカスタマイズ情報を初期処理と終了処理とに分けて、プログラムスケルトンの初期処理挿入位置と終了処理挿入位置にそれぞれ挿入する。また、入力された仕様から入力表項目定義とセレクト項目定義とセレクト条件定義とを取得し、これらからカーソル定義文を生成し、プログラムスケルトンのカーソル定義文挿入位置に挿入する。さらに、上記データ処理プログラム自動生成システムは、入力された仕様から出力表項目定義と出力表処理定義とを取得し、これらから作業変数定義文と出力処理文とを生成し、プログラムスケルトンの作業変数定義文列挿入位置と出力処理文列挿入位置にそれぞれ挿入する。   And the said data processing program automatic generation system completes a program by inserting the information acquired from the specification, and the information produced | generated from this information in the applicable location of a program skeleton. Specifically, the program name and program customization information are acquired from the input specifications, the acquired program name is inserted at the program name insertion position of the program skeleton, and the acquired program customization information is used for initial processing and end processing. Separately, the program skeleton is inserted at the initial processing insertion position and the end processing insertion position, respectively. Also, an input table item definition, a select item definition, and a select condition definition are acquired from the input specification, a cursor definition statement is generated from these, and inserted at the cursor definition statement insertion position of the program skeleton. Further, the data processing program automatic generation system obtains an output table item definition and an output table processing definition from the input specification, generates a work variable definition statement and an output processing statement from them, and generates a work variable of the program skeleton. Inserted at the definition statement string insertion position and output processing statement string insertion position, respectively.

他方、プログラム自動合成装置において、抽象記述言語ファイル(サブシナリオファイル)を入力し、類似するサブシナリオファイルを検出し、一致する部分を検出し、共通化された形のサブシナリオファイルを生成し、該共通部分にIDを付与する技術がある(例えば特許文献2参照)。   On the other hand, in an automatic program synthesis device, an abstract description language file (subscenario file) is input, a similar subscenario file is detected, a matching part is detected, and a common subscenario file is generated. There is a technique for assigning an ID to the common part (see, for example, Patent Document 2).

特許第3871832号公報Japanese Patent No. 3871832 特開2002−99415号公報JP 2002-99415 A

上述した特許文献1に記載のデータ処理プログラム自動生成システムでは、作成するデータ処理プログラムに必要な情報をすべて含む仕様を一つの入力仕様として受け付ける構成となっているため、作成するデータ処理プログラム毎に、それに必要な情報をすべて含んだ仕様を事前に用意しておく必要がある。このため、プログラムスケルトンをカスタマイズするためのその他の情報であるプログラムカスタマイズ情報が、一部のデータ処理プログラム間で同じ仕様で良い場合であっても、作成するデータ処理プログラム毎に一切の情報を含む仕様を別々に作成し保存しておく必要がある。従って、仕様の作成および保存に要するコストが嵩むという課題があった。   In the data processing program automatic generation system described in Patent Document 1 described above, a specification including all information necessary for the data processing program to be created is received as one input specification. It is necessary to prepare a specification including all necessary information in advance. Therefore, even if the program customization information, which is other information for customizing the program skeleton, may have the same specifications among some data processing programs, it contains all information for each data processing program to be created It is necessary to create and save specifications separately. Therefore, there has been a problem that the cost required for creating and storing the specifications increases.

特許文献2には共通化された形のサブシナリオファイルを生成し、該共通部分にIDを付与することについて記載されているだけであり、特許文献2に記載の技術を特許文献1に適用しても、上記課題を解決することは困難である。   Patent Document 2 only describes generation of a common sub-scenario file and assigning an ID to the common part. The technique described in Patent Document 2 is applied to Patent Document 1. However, it is difficult to solve the above problem.

本発明の目的は、上述したような課題、すなわち仕様の作成および保存に要するコストが嵩むという課題を解決するデータ処理プログラム自動生成システムを提供することにある。   An object of the present invention is to provide an automatic data processing program generation system that solves the problem described above, that is, the problem that the cost required to create and store specifications increases.

本発明の一形態にかかるデータ処理プログラム自動生成システムは、
データベースの表のデータを参照し、表中に新たなデータを挿入したり、表中のデータを更新したり、表中のデータを削除したりするプログラムにおいて、前段処理部分と繰り返し処理部分と後段処理部分を備えたプログラム全体を、プログラムスケルトンと仕様とに基づいて、自動的に生成するデータ処理プログラム自動生成システムであって、
作成するデータ処理プログラム毎に異なる仕様である個別仕様を入力する機能と、作成するデータ処理プログラムが属するグループ毎に異なる仕様である共通仕様を入力する機能とを有する仕様入力手段を備える、という構成を採る。
A data processing program automatic generation system according to an aspect of the present invention includes:
In a program that references data in a database table and inserts new data into the table, updates data in the table, or deletes data in the table, the pre-processing part, the iterative processing part, and the post-processing part A data processing program automatic generation system that automatically generates an entire program including a processing part based on a program skeleton and specifications,
A configuration comprising specification input means having a function of inputting individual specifications which are different specifications for each data processing program to be created, and a function of inputting common specifications which are different specifications for each group to which the data processing program to be created belongs Take.

本発明は上述したような構成を有するため、仕様の作成および保存に要するコストを軽減することが可能である。   Since the present invention has the above-described configuration, it is possible to reduce the cost required for creating and storing specifications.

本発明の第3の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 3rd Embodiment of this invention. 本発明の第3の実施の形態における仕様の構成と、仕様中の出力表処理定義における処理種別毎の必要情報を示す図である。It is a figure which shows the required information for every process classification in the structure of the specification in the 3rd Embodiment of this invention, and the output table process definition in a specification. 本発明の第3の実施の形態におけるカーソル定義文生成手段の処理を示す流れ図である。It is a flowchart which shows the process of the cursor definition sentence production | generation means in the 3rd Embodiment of this invention. 本発明の第3の実施の形態における作業変数定義文生成手段の処理を示す流れ図である。It is a flowchart which shows the process of the work variable definition sentence production | generation means in the 3rd Embodiment of this invention. 本発明の第3の実施の形態における出力処理文生成手段の処理を示す流れ図である。It is a flowchart which shows the process of the output process sentence production | generation means in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるプログラム自動合成手段の処理を示す流れ図である。It is a flowchart which shows the process of the program automatic synthesis means in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるカーソル定義文生成手段で使用するカーソル定義文スケルトンの構成を示す図である。It is a figure which shows the structure of the cursor definition sentence skeleton used with the cursor definition sentence production | generation means in the 3rd Embodiment of this invention. 本発明の第3の実施の形態における作業変数定義文生成手段で使用する作業変数定義文スケルトンの構成を示す図である。It is a figure which shows the structure of the work variable definition sentence skeleton used by the work variable definition sentence production | generation means in the 3rd Embodiment of this invention. 本発明の第3の実施の形態における出力処理文生成手段で使用する出力処理文スケルトンの構成と、そのスケルトンのうちの挿入文、更新文、削除文の構成を示す図である。It is a figure which shows the structure of the output process sentence skeleton used by the output process sentence production | generation means in the 3rd Embodiment of this invention, and the structure of the insertion sentence of the skeleton, an update sentence, and a deletion sentence. 本発明の第3の実施の形態におけるプログラムスケルトンの構成を示す図である。It is a figure which shows the structure of the program skeleton in the 3rd Embodiment of this invention. 本発明の第4の実施の形態における仕様の構成を示す図である。It is a figure which shows the structure of the specification in the 4th Embodiment of this invention. 本発明の第4の実施の形態におけるカーソル定義文生成手段の処理を示す流れ図である。It is a flowchart which shows the process of the cursor definition sentence production | generation means in the 4th Embodiment of this invention. 本発明の第4の実施の形態におけるセレクト項目定義情報を作成する処理を示す流れ図である。It is a flowchart which shows the process which produces select item definition information in the 4th Embodiment of this invention. 本発明の第5の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 5th Embodiment of this invention. 本発明の第5の実施の形態における仕様の構成を示す図である。It is a figure which shows the structure of the specification in the 5th Embodiment of this invention. 本発明の第6の実施の形態における仕様入力手段の処理を示す処理流れ図である。It is a processing flowchart which shows the process of the specification input means in the 6th Embodiment of this invention. 本発明の第3の実施の形態の処理例を示す処理流れ図である。It is a process flowchart which shows the process example of the 3rd Embodiment of this invention. 本発明の第8の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 8th Embodiment of this invention. 本発明の第1の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 1st Embodiment of this invention. 本発明で使用する共通処理仕様の一例を示す図である。It is a figure which shows an example of the common process specification used by this invention. 本発明で使用する共通処理仕様の別の例を示す図である。It is a figure which shows another example of the common process specification used by this invention. 本発明の第2の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 2nd Embodiment of this invention. 本発明で使用する共通処理仕様の更に別の例を示す図である。It is a figure which shows another example of the common process specification used by this invention.

次に本発明の実施の形態について図面を参照して詳細に説明する。
[第1の実施形態]
図19を参照すると、本発明の第1の実施形態にかかるデータ処理プログラム自動生成システム10は、個別仕様1Aと、共通処理仕様1Bとを入力し、この入力した個別仕様1Aおよび共通処理仕様1Bと、予め用意されたプログラムスケルトンとに基づいてデータ処理プログラムを生成し、生成プログラム2として出力する機能を有している。生成されるデータ処理プログラムは、データベースの表のデータを参照し、表中に新たなデータを挿入したり、表中のデータを更新したり、表中のデータを削除したりする機能を持つデータ処理プログラムである。
Next, embodiments of the present invention will be described in detail with reference to the drawings.
[First embodiment]
Referring to FIG. 19, the data processing program automatic generation system 10 according to the first embodiment of the present invention inputs an individual specification 1A and a common processing specification 1B, and inputs the input individual specification 1A and common processing specification 1B. And a function for generating a data processing program based on a prepared program skeleton and outputting it as the generation program 2. The generated data processing program refers to the data in the database table and inserts new data into the table, updates the data in the table, and deletes data in the table. It is a processing program.

データ処理プログラム自動生成システム10は、仕様入力手段101を含んで構成される。仕様入力手段101は、個別仕様入力部1011と共通処理仕様入力部1012とを有する。   The data processing program automatic generation system 10 includes a specification input unit 101. The specification input unit 101 includes an individual specification input unit 1011 and a common processing specification input unit 1012.

個別仕様入力部1011は、個別仕様1Aを入力する機能を有する。個別仕様1Aは、作成するデータ処理プログラム毎に異なる。個別仕様1Aには、例えば、プログラム名、入力表項目定義、セレクト項目定義、出力表項目定義、出力表処理定義、セレクト条件定義が含まれている。個別仕様入力部1011によって入力された個別仕様1Aは、データ処理プログラム自動生成システム10における後段の処理機能に伝達され、プログラムの生成に利用される。   The individual specification input unit 1011 has a function of inputting the individual specification 1A. The individual specification 1A is different for each data processing program to be created. The individual specification 1A includes, for example, a program name, input table item definition, select item definition, output table item definition, output table processing definition, and select condition definition. The individual specification 1A input by the individual specification input unit 1011 is transmitted to a subsequent processing function in the data processing program automatic generation system 10 and used for generating a program.

共通処理仕様入力部1012は、共通処理仕様1Bを入力する機能を有する。共通処理仕様1Bは、作成するデータ処理プログラムが属するグループ毎に異なる。グループとは、例えばバッチ系システムを幾つかのグループに分けた場合の個々のグループのことである。共通処理仕様1Bには、プログラムスケルトンをカスタマイズするためのその他の情報であるプログラムカスタマイズ情報が含まれている。共通処理仕様入力部1012によって入力された共通処理仕様1Bは、データ処理プログラム自動生成システム10における後段の処理機能に伝達され、プログラムの生成に利用される。   The common processing specification input unit 1012 has a function of inputting the common processing specification 1B. The common processing specification 1B is different for each group to which the data processing program to be created belongs. A group is, for example, an individual group when a batch system is divided into several groups. The common processing specification 1B includes program customization information that is other information for customizing the program skeleton. The common processing specification 1B input by the common processing specification input unit 1012 is transmitted to a subsequent processing function in the data processing program automatic generation system 10 and used for generating a program.

図20は共通処理仕様1Bの一例である。この例の共通処理仕様1Bは、1000行から1011行まで初期処理を定義し、1013行から1024行まで終了処理を定義している。また初期処理には、開始ログ出力処理、共通変数定義処理、共通エラーハンドル処理が含まれている。また終了処理には、終了ログ出力処理、共通変数定義処理、共通エラーハンドル処理が含まれている。これらの初期処理および終了処理が、共通処理仕様入力部1012により取得され、後段の処理機能に伝達される。   FIG. 20 is an example of the common processing specification 1B. In this example, the common processing specification 1B defines initial processing from 1000 to 1011 and defines end processing from 1013 to 1024. The initial process includes a start log output process, a common variable definition process, and a common error handle process. The end process includes an end log output process, a common variable definition process, and a common error handle process. These initial processing and end processing are acquired by the common processing specification input unit 1012 and transmitted to the subsequent processing function.

図21は共通処理仕様1Bの他の例である。この例の共通処理仕様1Bは、1000行から1010行まで初期処理を定義し、1012行から1022行まで終了処理を定義している。図20に示した共通処理仕様とは多少内容が異なっている。これらの初期処理および終了処理が、共通処理仕様入力部1012により取得され、後段の処理機能に伝達される。   FIG. 21 shows another example of the common processing specification 1B. In this example, the common processing specification 1B defines initial processing from 1000 to 1010 and defines end processing from 1012 to 1022. The content is slightly different from the common processing specification shown in FIG. These initial processing and end processing are acquired by the common processing specification input unit 1012 and transmitted to the subsequent processing function.

また図10はプログラムスケルトンの一例である。この例のプログラムスケルトン1001は、ある特定のプログラミング言語で記述されたプログラムを仕様により変化する部分と、仕様により変化しない部分とに分類し、仕様により変化しない部分は、プログラム文として持ち、仕様により変化する部分は、仕様から作成されたプログラムの断片の挿入位置を持つように構成されている。図10の例では、このプログラムの断片の挿入位置として、プログラム名挿入位置1002と、カーソル定義文挿入位置1003と、作業変数定義文列挿入位置1004と、" 初期処理" 挿入位置1005と、出力処理文列挿入位置1006と、" 終了処理" 挿入位置1007を持っている。   FIG. 10 is an example of a program skeleton. The program skeleton 1001 in this example classifies a program written in a specific programming language into a part that changes according to the specification and a part that does not change according to the specification. The changing part is configured to have an insertion position of a program fragment created from the specification. In the example of FIG. 10, the program name insertion position 1002, the cursor definition sentence insertion position 1003, the work variable definition sentence string insertion position 1004, the “initial processing” insertion position 1005, and the output are inserted as the fragment insertion positions of this program. It has a processing statement string insertion position 1006 and an “end processing” insertion position 1007.

次に本実施形態にかかるデータ処理プログラム自動生成システム10の動作を説明する。   Next, the operation of the data processing program automatic generation system 10 according to the present embodiment will be described.

利用者が、データ処理プログラム自動生成システム10を用いて、データ処理プログラムを自動生成する場合、生成したいデータ処理プログラム固有の仕様1Aを格納したファイルと、生成したいデータ処理プログラムが属するグループについて共通に作成した共通処理仕様1Bを格納したファイルとを、データ処理プログラム自動生成システム10から読み込み可能な記憶装置上に設定する。そして、データ処理プログラム自動生成システム10を起動する。   When a user automatically generates a data processing program using the data processing program automatic generation system 10, a file storing a specification 1A specific to the data processing program to be generated and a group to which the data processing program to be generated belongs are commonly used. The file storing the created common processing specification 1B is set on a storage device that can be read from the data processing program automatic generation system 10. Then, the data processing program automatic generation system 10 is activated.

まず、データ処理プログラム自動生成システム10は、仕様入力手段101の個別仕様入力部1011により個別仕様1Aを入力し、後段の処理機能に伝達する。また、共通処理仕様入力部1012により共通処理仕様1Bを入力し、後段の処理機能に伝達する。   First, the data processing program automatic generation system 10 inputs the individual specification 1A from the individual specification input unit 1011 of the specification input means 101, and transmits it to the subsequent processing function. Further, the common processing specification 1B is input by the common processing specification input unit 1012 and transmitted to the processing function at the subsequent stage.

次にデータ処理プログラム自動生成システム10は、後段の処理機能により個別仕様1Aに基づいて、プログラムスケルトンに挿入する、プログラム名、カーソル定義文、作業変数定義文、出力処理文を生成する。また、データ処理プログラム自動生成システム10は、後段の処理機能により共通処理仕様1Bからプログラムスケルトンに挿入する、初期処理、終了処理を取得する。   Next, the data processing program automatic generation system 10 generates a program name, a cursor definition statement, a work variable definition statement, and an output processing statement to be inserted into the program skeleton based on the individual specification 1A by the processing function at the subsequent stage. In addition, the data processing program automatic generation system 10 acquires initial processing and end processing to be inserted into the program skeleton from the common processing specification 1B by the subsequent processing function.

次に、データ処理プログラム自動生成システム10は、プログラムスケルトンの該当する箇所に、それらを挿入して生成プログラム2を生成する。具体的には、図10のプルグラムスケルトン1001のプログラム名挿入位置1002にプログラム名を、カーソル定義文挿入位置1003にカーソル定義文を、作業変数定義文列挿入位置1004に作業変数定義文を、" 初期処理" 挿入位置1005に初期処理を、出力処理文列挿入位置1006に出力処理文を、そして、" 終了処理" 挿入位置1007に終了処理を、それぞれ挿入する。   Next, the data processing program automatic generation system 10 generates the generation program 2 by inserting them into the corresponding portions of the program skeleton. Specifically, in the program skeleton 1001 of FIG. 10, the program name is inserted at the program name insertion position 1002, the cursor definition sentence is inserted at the cursor definition sentence insertion position 1003, and the work variable definition sentence is inserted at the work variable definition sentence string insertion position 1004. Initial processing “Initial processing is inserted at the insertion position 1005, output processing text is inserted at the output processing statement string insertion position 1006, and“ end processing ”is terminated at the insertion position 1007.

最後に、データ処理プログラム自動生成システム10は、生成プログラム2を出力する。   Finally, the data processing program automatic generation system 10 outputs the generation program 2.

このように本実施形態によれば、仕様の作成および保存に要するコストを軽減することができる。その理由は、仕様のうち、データ処理プログラムが属するグループ毎に異なる仕様である共通仕様1Bは、個々のデータ処理プログラム毎でなくグループ単位で作成し、保存しておけば済むためである。   As described above, according to the present embodiment, it is possible to reduce the cost required for creating and storing the specification. The reason is that, among the specifications, the common specification 1B, which is a different specification for each group to which the data processing program belongs, needs to be created and saved in units of groups, not for each individual data processing program.

[第2の実施形態]
図22を参照すると、本発明の第2の実施形態にかかるデータ処理プログラム自動生成システム10は、図19に示した第1の実施形態と比較して、仕様入力手段101が展開手段1013を更に有する点で相違する。また、共通処理仕様1Bは、キーワードを付与した共通処理記述と、この共通処理記述を挿入する箇所に上記キーワードを挿入してある複数の処理記述とが含まれている。
[Second Embodiment]
Referring to FIG. 22, in the data processing program automatic generation system 10 according to the second embodiment of the present invention, compared with the first embodiment shown in FIG. It is different in having. The common process specification 1B includes a common process description to which a keyword is assigned and a plurality of process descriptions in which the keyword is inserted at a position where the common process description is inserted.

展開部1013は、共通処理仕様入力部1012から共通処理仕様1Bを受け取り、その共通処理仕様1Bに含まれる複数の処理記述中におけるキーワードの挿入位置に、そのキーワードが付与された共通処理記述を展開する機能を有する。展開部1013による展開処理が施された共通処理仕様1Bは、データ処理プログラム自動生成システム10における後段の処理機能に伝達され、プログラムの生成に利用される。   The expansion unit 1013 receives the common processing specification 1B from the common processing specification input unit 1012, and expands the common processing description to which the keyword is assigned at the keyword insertion position in the plurality of processing descriptions included in the common processing specification 1B. It has the function to do. The common processing specification 1B subjected to the expansion processing by the expansion unit 1013 is transmitted to a subsequent processing function in the data processing program automatic generation system 10 and used for generating a program.

図23は共通処理仕様1Bの一例である。この例の共通処理仕様1Bは、1000行から1005行まで初期処理を定義し、1007行から1013行まで終了処理を定義し、1015行から1020行まで共通エラー処理を定義している。定義された共通エラー処理には、「共通エラー処理」というキーワードが付与されている。そして、初期処理と終了処理とには、共通エラー処理を挿入する箇所に、上記キーワードが予め定められた特殊な記号($など)により括られて、挿入されている。   FIG. 23 is an example of the common processing specification 1B. In this example, the common processing specification 1B defines initial processing from lines 1000 to 1005, defines end processing from lines 1007 to 1013, and defines common error processing from lines 1015 to 1020. The keyword “common error processing” is assigned to the defined common error processing. In the initial process and the end process, the keyword is enclosed by a special symbol ($ or the like) determined in advance at the position where the common error process is inserted.

すなわち、図23の共通処理仕様1Bは、初期処理中では開始ログ出力処理だけを個別に記述し、終了処理では終了ログ出力処理だけを個別に記述し、初期処理と終了処理とで共通な共通変数定義処理と共通エラーハンドル処理とは個別に記述せずに、共通処理としてまとめている。これによって、図20と全く同一の処理をコンパクトにまとめている。   That is, the common process specification 1B of FIG. 23 describes only the start log output process individually during the initial process, and describes only the end log output process individually during the end process, and is common to both the initial process and the end process. The variable definition process and the common error handle process are not described separately, but are combined as a common process. As a result, the same process as in FIG.

次に本実施形態にかかるデータ処理プログラム自動生成システム10の動作を説明する。   Next, the operation of the data processing program automatic generation system 10 according to the present embodiment will be described.

利用者が、データ処理プログラム自動生成システム10を用いて、データ処理プログラムを自動生成する場合、生成したいデータ処理プログラム固有の仕様1Aを格納したファイルと、生成したいデータ処理プログラムが属するグループについて共通に作成した共通処理仕様1Bを格納したファイルとを、データ処理プログラム自動生成システム10から読み込み可能な記憶装置上に設定する。そして、データ処理プログラム自動生成システム10を起動する。   When a user automatically generates a data processing program using the data processing program automatic generation system 10, a file storing a specification 1A specific to the data processing program to be generated and a group to which the data processing program to be generated belongs are commonly used. The file storing the created common processing specification 1B is set on a storage device that can be read from the data processing program automatic generation system 10. Then, the data processing program automatic generation system 10 is activated.

まず、データ処理プログラム自動生成システム10は、仕様入力手段101の個別仕様入力部1011により個別仕様1Aを入力し、後段の処理機能に伝達する。また、共通処理仕様入力部1012により共通処理仕様1Bを入力し、展開部1013に伝達する。   First, the data processing program automatic generation system 10 inputs the individual specification 1A from the individual specification input unit 1011 of the specification input means 101, and transmits it to the subsequent processing function. Further, the common processing specification 1B is input by the common processing specification input unit 1012 and transmitted to the expansion unit 1013.

次に展開部1013は、共通処理仕様1Bに含まれる複数の処理記述中におけるキーワードの挿入位置に、そのキーワードが付与された共通処理記述を展開する。そして、展開処理後の共通処理仕様1Bを後段の処理機能に伝達する。   Next, the expansion unit 1013 expands the common process description to which the keyword is assigned at the insertion position of the keyword in the plurality of process descriptions included in the common process specification 1B. Then, the common processing specification 1B after the expansion processing is transmitted to the subsequent processing function.

これ以降の動作は第1の実施形態と同様である。   The subsequent operations are the same as those in the first embodiment.

このように本実施形態によれば、仕様の作成および保存に要するコストを軽減することができる。その理由は、仕様のうち、データ処理プログラムが属するグループ毎に異なる仕様である共通仕様1Bは、個々のデータ処理プログラム毎でなくグループ単位で作成し、保存しておけば済むためである。   As described above, according to the present embodiment, it is possible to reduce the cost required for creating and storing the specification. The reason is that, among the specifications, the common specification 1B, which is a different specification for each group to which the data processing program belongs, needs to be created and saved in units of groups, not for each individual data processing program.

また本実施形態によれば、第1の実施形態に比べてより一層、仕様の作成および保存に要するコストを軽減することができる。その理由は、共通仕様1Bに同じ共通処理を含む複数の処理が存在する場合、それら複数の処理のそれぞれに共通処理を個別に記述する必要がないためである。   Further, according to the present embodiment, it is possible to further reduce the cost required for creating and storing the specifications as compared with the first embodiment. The reason is that when there are a plurality of processes including the same common process in the common specification 1B, it is not necessary to individually describe the common process in each of the plurality of processes.

また、共通仕様1Bに同じ共通処理を含む複数の処理が存在する場合、それら複数の処理のそれぞれに共通処理を個別に記述する構成では、後に共通処理を変更する必要が生じた場合、複数箇所を同時に変更する必要があるために作業量が多くなり、また変更漏れによる不整合が発生し易くなる。これに対して、本実施形態によれば、1箇所だけの修正で済むためにメンテナンスに要するコストが低減し、また変更漏れによる不整合の発生も防止することができる。   In addition, when there are a plurality of processes including the same common process in the common specification 1B, in the configuration in which the common process is individually described in each of the plurality of processes, if there is a need to change the common process later, Therefore, the amount of work increases, and inconsistency due to omission of changes tends to occur. On the other hand, according to the present embodiment, since only one point needs to be corrected, the cost required for maintenance can be reduced, and the occurrence of inconsistency due to omission of changes can be prevented.

[第3の実施形態]
図1は本発明のデータ処理プログラム自動生成システムの第3の実施の形態の構成例を示したブロック図、図17はその処理の概略を示すフローチャートである。まず、図1及び図17を参照して第3の実施の形態の概要を説明する。
[Third embodiment]
FIG. 1 is a block diagram showing a configuration example of a third embodiment of the data processing program automatic generation system of the present invention, and FIG. 17 is a flowchart showing an outline of the processing. First, the outline of the third embodiment will be described with reference to FIGS.

図1において、業務要件を示す仕様1は、第1および第2の実施形態における個別仕様1Aおよび共通処理仕様1Bを合わせたものに相当する。仕様1は、開発するプログラムが満足すべき仕様として、プログラム名と入力表項目定義とセレクト項目定義と出力表項目定義と出力表処理定義とセレクト条件定義とプログラムカスタマイズ情報とを含んでいる。まず、図17の1701において、仕様入力手段101はこのような仕様1を入力する。次に、プログラムスケルトンカスタマイズ情報取得手段102は、入力された仕様のうち、プログラムスケルトンをカスタマイズするために必要な情報として、プログラム名とプログラムカスタマイズ情報を取り出し、プログラム自動合成手段109に渡す(1702)。また、カーソル定義情報取得手段103は、入力された仕様のうち、カーソル定義文を生成するのに必要な情報として、入力表項目定義とセレクト項目定義とセレクト条件定義を取り出し、カーソル定義文生成手段105に渡す(1703)。更に、出力項目処理情報取得手段104は、入力された仕様のうち、作業変数定義文と出力処理文を生成するのに必要な情報として、出力表項目定義と出力表処理定義とを出力項目処理情報として取り出し、作業変数定義文生成手段106と出力処理文生成手段107に渡す(1704)。   In FIG. 1, a specification 1 indicating business requirements corresponds to a combination of the individual specification 1A and the common processing specification 1B in the first and second embodiments. Specification 1 includes a program name, an input table item definition, a select item definition, an output table item definition, an output table processing definition, a select condition definition, and program customization information as specifications that the program to be developed should satisfy. First, in 1701 of FIG. 17, the specification input means 101 inputs such a specification 1. Next, the program skeleton customization information acquisition unit 102 extracts the program name and program customization information as information necessary for customizing the program skeleton from the input specifications, and passes it to the automatic program synthesis unit 109 (1702). . Also, the cursor definition information acquisition unit 103 takes out the input table item definition, the select item definition, and the select condition definition as information necessary for generating the cursor definition statement from the input specifications, and the cursor definition statement generation unit Pass to 105 (1703). Furthermore, the output item processing information acquisition means 104 outputs the output table item definition and the output table processing definition as information necessary for generating the work variable definition statement and the output processing statement from the input specifications. It is taken out as information and passed to the work variable definition statement generation means 106 and the output processing statement generation means 107 (1704).

次にカーソル定義文生成手段105は、カーソル定義情報取得手段103から受けとった情報を加工し、データベースの表の内、仕様で指定された処理において参照される表と項目の定義を行なう、カーソル定義文を生成し、プログラム自動合成手段109に渡す(1705)。また、作業変数定義文生成手段106は、出力項目処理情報取得手段104から受けとった情報を加工し、生成プログラム中の、処理種別が挿入である全ての出力表の各項目の計算結果を保存するための変数定義文を生成し、プログラム自動合成手段109に渡す(1706)。更に、出力処理文生成手段107は、出力項目処理情報取得手段104から受けとった情報を加工し、生成プログラム中の全ての出力表のうち、処理種別が挿入の出力表に対しては処理条件文と項目計算文と挿入文とからなる出力処理文を生成し、処理種別が更新の出力表に対しては処理条件と更新文とからなる出力処理文を生成し、処理種別が削除の出力表に対しては処理条件文と項目計算文と削除文とからなる出力処理文を生成し、プログラム自動合成手段109に渡す(1707)。   Next, the cursor definition statement generation unit 105 processes the information received from the cursor definition information acquisition unit 103, and defines a table and an item to be referred to in the process specified by the specification in the database table. A sentence is generated and passed to the automatic program synthesis means 109 (1705). Further, the work variable definition sentence generation unit 106 processes the information received from the output item processing information acquisition unit 104, and stores the calculation results of each item of all output tables in which the processing type is insertion in the generation program. A variable definition statement is generated and passed to the automatic program synthesis means 109 (1706). Further, the output processing statement generation means 107 processes the information received from the output item processing information acquisition means 104, and among all the output tables in the generation program, the processing condition statement for the output table whose processing type is insertion. An output processing statement consisting of a field calculation statement and an insertion statement, and an output processing statement consisting of processing conditions and an update statement for an output table whose processing type is update, and an output table whose processing type is deletion In response to this, an output processing statement composed of a processing condition statement, an item calculation statement, and a deletion statement is generated and passed to the automatic program synthesis means 109 (1707).

また図1において、プログラムスケルトン108は、生成プログラムのうち、仕様としてどのような業務要件が与えられても変化しない部分を、プログラムの骨組みとして用意したものである。このプログラムの骨組みにはプログラム名、カーソル定義文、作業変数定義文、出力処理文の部分と、さらに必要に応じて1つ以上のプログラムの断片の挿入位置が埋め込まれており、これらの挿入位置に、仕様で与えられた業務要件から生成されたプログラムの断片を挿入することにより、完成したプログラムを得ることを目的としたものである。   In FIG. 1, a program skeleton 108 is prepared by preparing a portion of a generated program that does not change regardless of what business requirements are given as specifications. In the framework of this program, there are embedded the program name, cursor definition statement, work variable definition statement, output processing statement, and one or more program fragment insertion positions as necessary. The purpose is to obtain a completed program by inserting a program fragment generated from the business requirements given in the specification.

プログラム自動合成手段109は、プログラムスケルトン108の挿入位置の内、プログラム名に対応する挿入位置にプログラムスケルトンカスタマイズ情報取得手段102で取得されたプログラム名を挿入し、カーソル定義文に対応する挿入位置にカーソル定義文生成手段105で生成されたカーソル定義文を挿入し、作業変数定義文に対応する挿入位置に作業変数定義文生成手段106で生成された作業変数定義文を挿入し、出力処理文に対応する挿入位置に出力処理文生成手段107で生成された出力処理文を挿入し、その他の挿入位置にプログラムスケルトンカスタマイズ情報取得手段102で取得した対応するプログラム文の断片を挿入することによりプログラムを自動合成する(1708)。   The automatic program synthesis means 109 inserts the program name acquired by the program skeleton customization information acquisition means 102 into the insertion position corresponding to the program name among the insertion positions of the program skeleton 108, and sets the insertion position corresponding to the cursor definition statement. The cursor definition statement generated by the cursor definition statement generation unit 105 is inserted, the work variable definition statement generated by the work variable definition statement generation unit 106 is inserted at the insertion position corresponding to the work variable definition statement, and the output processing statement is inserted. The program is inserted by inserting the output processing statement generated by the output processing statement generation unit 107 into the corresponding insertion position, and inserting the corresponding program statement fragment acquired by the program skeleton customization information acquisition unit 102 into the other insertion position. Automatically synthesize (1708).

次に本発明の第3の実施の形態の詳細を図1から図5を参照して説明する。   Next, details of the third embodiment of the present invention will be described with reference to FIGS.

図2(a)は図1の仕様1の構成例を示した図である。201は仕様1の全体を表しており、図1における仕様1に対応する。図2(a)に示したように、仕様201は、仕様から生成したプログラムが持つべき名前であるプログラム名202と、入力表の名前と各項目の名前と型の情報を含む入力表項目定義203と、入力表項目のうち、本仕様で指定する処理で実際に使用するため、セレクト文内に定義する項目の名前を含むセレクト項目定義204と、出力表の名前と各項目の名前と型の情報を含む出力表項目定義205と、各出力表の処理を行う条件を示す処理条件と、挿入、更新、削除の別を示す処理種別と、処理種別が更新と削除の場合に更新/削除するための条件を示す更新/削除条件と、処理種別が挿入と更新の場合に各項目の値を計算する処理式とを含む出力表処理定義206と、入力表からデータを取得する際の条件を含むセレクト条件定義207と、プログラムスケルトンをカスタマイズするために必要なその他の情報を含むプログラムカスタマイズ情報208とから構成される。   FIG. 2A is a diagram showing a configuration example of the specification 1 of FIG. Reference numeral 201 denotes the entire specification 1 and corresponds to the specification 1 in FIG. As shown in FIG. 2 (a), the specification 201 includes a program name 202 that is a name that a program generated from the specification should have, an input table name definition including the name of the input table, the name and type of each item. 203 and select item definition 204 that includes the name of the item to be defined in the select statement, and the name of the output table, and the name and type of each item. Output table item definition 205 that contains the information, processing conditions that indicate the conditions for processing each output table, processing type that indicates whether to insert, update, or delete, and update / delete when the processing type is update or delete Output table processing definition 206 that includes update / deletion conditions indicating the conditions for processing, processing expressions for calculating the value of each item when the processing type is insert and update, and conditions for acquiring data from the input table Select condition definition 207 including, and program skeleton Composed of program customization information 208. include other information required to customize.

出力表処理定義206に必要な、処理種別毎の情報を図2(b)に一覧表で示す。図2(b)を参照すると、処理種別が挿入の場合には、処理式は必須であり、処理条件は任意であり、更新/削除条件は不要である。処理種別が更新の場合には、処理式と更新条件は必須であり、処理条件は任意である。処理種別が削除の場合には、削除条件は必須であり、処理条件は任意であり、処理式は不要である。なお、処理条件が指定されなかった場合には、常に処理条件が成立するものとして、その処理が行われる。図1の仕様入力手段101は、図2のような構成を持つ仕様を入力し、プログラムスケルトンカスタマイズ情報取得手段102と、カーソル定義情報取得手段103と出力項目処理情報取得手段104に渡す。   Information for each processing type necessary for the output table processing definition 206 is shown in a list in FIG. Referring to FIG. 2B, when the processing type is insertion, the processing formula is essential, the processing condition is arbitrary, and the update / deletion condition is unnecessary. When the processing type is update, the processing formula and the update condition are indispensable, and the process condition is arbitrary. When the processing type is deletion, the deletion condition is indispensable, the processing condition is arbitrary, and the processing formula is unnecessary. If no processing condition is specified, the processing is performed assuming that the processing condition is always satisfied. The specification input unit 101 in FIG. 1 inputs a specification having the configuration shown in FIG. 2 and passes it to the program skeleton customization information acquisition unit 102, the cursor definition information acquisition unit 103, and the output item processing information acquisition unit 104.

プログラムスケルトンカスタマイズ情報取得手段102は、仕様入力手段101から渡された仕様情報から、図2のプログラム名202とプログラムカスタマイズ情報208に対応する部分を取り出し、プログラム自動合成手段109に渡す。カーソル定義情報取得手段103は、仕様入力手段101から渡された仕様情報から、図2の入力表項目定義203とセレクト項目定義204とセレクト条件定義207に対応する部分を取り出し、カーソル定義文生成手段105に渡す。出力項目処理情報取得手段104は、仕様入力手段101から渡された仕様情報から、図2の出力表項目定義205と出力表処理定義206に対応する部分を取り出し、作業変数定義文生成手段106と出力処理文生成手段107に渡す。   The program skeleton customization information acquisition unit 102 extracts the part corresponding to the program name 202 and the program customization information 208 in FIG. 2 from the specification information passed from the specification input unit 101 and passes it to the automatic program synthesis unit 109. The cursor definition information acquisition unit 103 extracts the portions corresponding to the input table item definition 203, the select item definition 204, and the select condition definition 207 in FIG. 2 from the specification information passed from the specification input unit 101, and generates a cursor definition statement generation unit. Pass to 105. The output item processing information acquisition unit 104 extracts the parts corresponding to the output table item definition 205 and the output table processing definition 206 in FIG. 2 from the specification information passed from the specification input unit 101, and the work variable definition statement generation unit 106 It is passed to the output processing statement generation means 107.

次にカーソル定義文生成手段105の動作について、図3を用いて説明する。図3は、カーソル定義文生成手段105の動作を表す流れ図である。図1のカーソル定義文生成手段105は、図3の301でカーソル定義情報取得手段103から入力表項目定義情報とセレクト項目定義情報とセレクト条件定義情報をカーソル定義情報として受けとる。302では、入力表項目定義情報のうち、セレクト項目定義情報内に指定された項目名だけを抜きだし、生成するプログラミング言語の構文に従った形式でセレクト項目列を作成する。303 では、入力表項目定義情報内に指定された入力表のうち、セレクト項目定義情報で使用されている入力表の名前だけを抜きだし、生成するプログラミング言語の構文に従った形式でセレクト表列を作成する。304では、セレクト条件定義情報を、生成するプログラム言語の構文に従った形式に加工し、セレクト条件文を作成する。305では、302、303、304でそれぞれ作成した、セレクト項目列、セレクト表列、セレクト条件をカーソル定義スケルトンの対応する挿入位置に挿入し、カーソル定義文を作成する。306 でこのカーソル定義文を出力し、図1のプログラム自動合成手段109に渡す。   Next, the operation of the cursor definition sentence generation unit 105 will be described with reference to FIG. FIG. 3 is a flowchart showing the operation of the cursor definition sentence generation unit 105. 1 receives input table item definition information, select item definition information, and select condition definition information as cursor definition information from the cursor definition information acquisition unit 103 in 301 of FIG. In 302, only the item name specified in the select item definition information is extracted from the input table item definition information, and a select item string is created in a format according to the syntax of the programming language to be generated. In 303, only the name of the input table used in the select item definition information is extracted from the input table specified in the input table item definition information, and the select table column is formatted according to the syntax of the programming language to be generated. Create In 304, the selection condition definition information is processed into a format according to the syntax of the program language to be generated, and a selection condition statement is created. In 305, the select item string, select table string, and select condition created in 302, 303, and 304, respectively, are inserted into the corresponding insertion positions of the cursor definition skeleton to create a cursor definition statement. At 306, this cursor definition sentence is output and passed to the automatic program synthesis means 109 of FIG.

図7にカーソル定義スケルトンの構成例を示す。図7を参照すると、カーソル定義文スケルトン701は、特定のプログラミング言語に依存したスケルトンで、セレクト項目列挿入位置702、入力表列挿入位置703、セレクト条件挿入位置704を持って構成されている。これらの空白部分に、図1のカーソル定義文生成手段で作成した、それぞれ、セレクト項目列、入力表列、セレクト条件が挿入され、カーソル定義文となる。   FIG. 7 shows a configuration example of the cursor definition skeleton. Referring to FIG. 7, a cursor definition sentence skeleton 701 is a skeleton that depends on a specific programming language, and has a select item string insertion position 702, an input table string insertion position 703, and a select condition insertion position 704. In these blank portions, a select item string, an input table string, and a select condition, respectively, created by the cursor definition sentence generation unit of FIG. 1, are inserted to form a cursor definition sentence.

次に作業変数定義文生成手段106の動作について、図4を用いて説明する。図4は、作業変数定義文生成手段106の動作を表す流れ図である。図1の作業変数定義文生成手段106は、図4の401で出力項目処理情報取得手段104から出力表項目定義情報を受けとる。出力表は一般に1つ以上指定可能だが、処理種別が更新や削除である出力表については、作業変数定義が不要なため、処理種別が挿入である出力表について、402が繰り返される。402の中では、ステップ403から405が行なわれる。403において、出力表のレコード型を定義する型定義文を作成する。404において、作業領域変数を403で定義された型で定義する文を作成する。405では、403で作成した型定義文と404で作成した変数定義文を作業変数定義スケルトンの対応する挿入位置に挿入する。406ステップでは、402の繰り返しによって完成した作業変数定義文列を出力し、図1のプログラム自動生成手段109に渡す。   Next, the operation of the work variable definition sentence generation unit 106 will be described with reference to FIG. FIG. 4 is a flowchart showing the operation of the work variable definition sentence generation means 106. 1 receives the output table item definition information from the output item processing information acquisition unit 104 in 401 of FIG. In general, one or more output tables can be specified. However, for an output table whose process type is update or delete, no work variable definition is required, so 402 is repeated for an output table whose process type is insertion. In 402, steps 403 to 405 are performed. In 403, a type definition statement that defines the record type of the output table is created. In 404, a statement that defines the work area variable with the type defined in 403 is created. In 405, the type definition statement created in 403 and the variable definition statement created in 404 are inserted into the corresponding insertion positions of the work variable definition skeleton. In step 406, the work variable definition sentence string completed by repeating 402 is output and passed to the automatic program generation means 109 in FIG.

図8に作業変数定義スケルトンの構成例を示す。図8を参照すると、作業変数定義スケルトン801は、型定義文挿入位置802と変数定義文挿入位置803を持って構成されている。図4の405では、これらの挿入位置にそれぞれ、型定義文、変数定義文を挿入し、作業変数定義文を完成させる。作業変数定義文が複数ある場合には、完成した複数の作業変数定義文をまとめて作業変数定義文列とする。   FIG. 8 shows a configuration example of the work variable definition skeleton. Referring to FIG. 8, the work variable definition skeleton 801 has a type definition sentence insertion position 802 and a variable definition sentence insertion position 803. In 405 of FIG. 4, a type definition sentence and a variable definition sentence are inserted at these insertion positions, respectively, to complete the work variable definition sentence. When there are a plurality of work variable definition statements, a plurality of completed work variable definition statements are combined into a work variable definition statement string.

次に出力処理文生成手段107の動作について、図5を用いて説明する。図5は、出力処理文生成手段107の動作を表す流れ図である。図1の出力処理文生成手段107は、図5の501で出力項目処理情報取得手段104から出力表項目定義情報と出力表処理定義情報を受けとる。出力表は一般に1つ以上指定可能なので、全ての出力表について、502が繰り返される。503において、501で受け取った出力表処理定義情報のうち、処理条件情報から処理条件文が作成される。504では、501で受け取った出力表処理定義情報のうち、処理種別情報が検査され、その値によって以後の処理が分岐する。処理種別情報が挿入の場合には、ステップ505から507が、処理種別情報が更新の場合には、ステップ508から509が、処理種別情報が削除の場合には、ステップ510から511が、実行される。   Next, the operation of the output processing statement generation means 107 will be described with reference to FIG. FIG. 5 is a flowchart showing the operation of the output processing statement generation means 107. 1 receives the output table item definition information and the output table processing definition information from the output item processing information acquisition unit 104 in 501 of FIG. Since generally one or more output tables can be specified, 502 is repeated for all output tables. In 503, a processing condition sentence is created from the processing condition information in the output table processing definition information received in 501. In 504, the processing type information in the output table processing definition information received in 501 is checked, and the subsequent processing branches depending on the value. Steps 505 to 507 are executed when the process type information is inserted, steps 508 to 509 are executed when the process type information is updated, and steps 510 to 511 are executed when the process type information is deleted. The

505では、出力表処理定義情報のうち、各項目の処理式を加工し、項目計算文を作成する。506では、出力表項目定義情報を加工し、挿入文を作成する。507では、503で作成した処理条件文と、505で作成した項目計算文と、506で作成した挿入文を出力処理スケルトンの対応する挿入位置に挿入し、出力処理文を完成する。   In 505, the processing formula of each item in the output table processing definition information is processed to create an item calculation sentence. In 506, the output table item definition information is processed to create an insertion statement. In 507, the processing condition statement created in 503, the item calculation statement created in 505, and the insertion statement created in 506 are inserted into the corresponding insertion positions of the output processing skeleton to complete the output processing statement.

508では、出力表処理定義情報のうちの各項目の処理式と、出力表項目定義情報とを加工し、更新文を作成する。509では、503で作成した処理条件文と、508で作成した更新文と出力処理文スケルトンの対応する挿入位置に挿入し、出力処理文を完成する。   In 508, the processing expression of each item in the output table process definition information and the output table item definition information are processed to create an update sentence. In 509, the processing condition statement created in 503, the update statement created in 508, and the output processing statement skeleton are inserted into corresponding insertion positions to complete the output processing statement.

510では、出力表項目定義情報を加工し、削除文を作成する。511では、503で作成した処理条件文と、510で作成した削除文を出力処理文スケルトンの対応する挿入位置に挿入し、出力処理文を完成する。なお、出力種別が更新と削除の場合には、出力処理文スケルトンの項目計算文挿入位置には何も挿入しない。   In 510, the output table item definition information is processed to create a deletion statement. In 511, the processing condition statement created in 503 and the deletion statement created in 510 are inserted into the corresponding insertion positions of the output processing statement skeleton to complete the output processing statement. If the output type is update or delete, nothing is inserted at the item calculation sentence insertion position of the output process sentence skeleton.

512では、502の繰り返しによって完成した全ての出力処理文列を出力し、図1のプログラム自動生成手段109に渡す。   In 512, all output processing sentence strings completed by repeating 502 are output and passed to the automatic program generation means 109 in FIG.

図9(a)に出力処理文スケルトンの構成例を示す。図9(a)を参照すると、出力処理文スケルトン901は、処理条件文挿入位置902と項目計算文列挿入位置903と出力文挿入位置904を持って構成されている。図5の507、509、511では、これらの挿入位置にそれぞれ、処理条件文、項目計算文、挿入文/更新文/削除文を挿入し、出力処理文を完成させる。図9(a)を参照すると、処理条件文挿入位置902 に挿入された処理条件がif文の条件節になっており、この条件が満足する場合だけ、項目計算文挿入位置903に挿入された出力項目の計算処理と出力文挿入位置904に挿入された出力表への出力処理が実行されることがわかる。   FIG. 9A shows a configuration example of the output processing sentence skeleton. Referring to FIG. 9A, the output processing sentence skeleton 901 has a processing condition sentence insertion position 902, an item calculation sentence string insertion position 903, and an output sentence insertion position 904. In 507, 509, and 511 in FIG. 5, a processing condition sentence, an item calculation sentence, an insertion sentence / update sentence / deletion sentence are inserted at these insertion positions, respectively, and the output processing sentence is completed. Referring to FIG. 9A, the processing condition inserted at the processing condition sentence insertion position 902 is a conditional clause of the if sentence. Only when this condition is satisfied, it is inserted at the item calculation sentence insertion position 903. It can be seen that the output item calculation process and the output process to the output table inserted at the output sentence insertion position 904 are executed.

図9(b)から図9(d)に図9(a)の出力文挿入位置904に挿入される、挿入文、更新文、削除文のPL/SQL言語におけるテンプレートの例をそれぞれ示す。図9(b)を参照すると、処理種別が挿入の場合、出力表項目定義情報から、出力表の名前を取り出して<<出力表名>>に代入し、項目の名前を取り出して、”,”でつないで項目名のリストを作成し、<<項目名リスト>>に代入し、項目の名前を取り出し、これをもとに、ある決まった方法で変数名を作成し、”,”でつないで変数名のリストを作成、<<変数名リスト>>に代入することで、挿入文を作成する。   FIGS. 9B to 9D show examples of templates in the PL / SQL language for inserted sentences, updated sentences, and deleted sentences inserted at the output sentence insertion position 904 in FIG. 9A. Referring to FIG. 9B, when the processing type is insertion, the output table name is extracted from the output table item definition information and assigned to << output table name >>, the item name is extracted, and ", ”To create a list of item names, assign it to << item name list >>, extract the name of the item, create a variable name in a certain way based on this, and use“, ” Connect to create a list of variable names and create an insert statement by substituting it into << variable name list >>.

図9(c)を参照すると、処理種別が更新の場合、出力表項目定義情報から、出力表の名前を取り出して<<出力表名>>に代入し、出力表処理定義情報から処理式を取り出して、”,”でつないで更新文リストを作成し、<<更新文リスト>>に代入し、出力表処理定義情報から更新条件を取り出して<<更新条件>>に代入することで、更新文を作成する。   Referring to FIG. 9 (c), when the processing type is update, the name of the output table is extracted from the output table item definition information and assigned to << output table name >>, and the processing expression is calculated from the output table processing definition information. Take out, connect with "," to create an update statement list, assign it to << update statement list >>, extract the update condition from the output table processing definition information, and assign it to << update condition >> Create an update statement.

図9(d)を参照すると、処理種別が削除の場合、出力表項目定義情報から、出力表の名前を取り出して<<出力表名>>に代入し、出力表処理定義情報から削除条件を取り出して<<削除条件>>に代入することで、削除文を作成する。   Referring to FIG. 9D, when the processing type is deletion, the name of the output table is extracted from the output table item definition information and assigned to << output table name >>, and the deletion condition is set from the output table processing definition information. Create a delete statement by taking it out and assigning it to << deletion condition >>.

次に図1のプログラム自動合成手段109の動作について、図10と図6を用いて説明する。図10は既に説明したようにプログラムスケルトンの構成例を示した図である。   Next, the operation of the automatic program synthesizing means 109 shown in FIG. 1 will be described with reference to FIGS. FIG. 10 is a diagram showing a configuration example of a program skeleton as already described.

図6は、プログラム自動合成手段109の動作を表す流れ図である。プログラム自動合成手段109は、プログラムスケルトン108のうち、プログラムの断片の挿入位置に、仕様から作成したプログラムの断片を挿入することによりプログラムを完成させるものである。図6を参照すると、まず601ステップで、図1のプログラムスケルトン108を取り出す。602では、プログラムカスタマイズ情報とカーソル定義文と作業変数定義文列と出力処理文列を、それぞれ、図1のプログラムスケルトンカスタマイズ情報取得手段102、カーソル定義文生成手段105、作業変数定義文生成手段106、出力処理文生成手段107から受けとる。ステップ603では、602で受けとったカーソル定義文をプログラムスケルトンのカーソル定義文挿入位置に挿入する。604では、602で受けとった作業変数定義文列をプログラムスケルトンの作業変数定義文列挿入位置に挿入する。605では、602で受けとった出力処理文列をプログラムスケルトンの出力処理文列挿入位置に挿入する。606では、602で受けとったプログラム名をプログラムスケルトンのプログラム名挿入位置に挿入し、プログラムスケルトンカスタマイズ情報を、名前で対応が示された挿入位置に挿入する。図10のプログラムスケルトンでは、" 初期処理" と" 終了処理" がこれに当たる。ただし、仕様の記述とプログラムスケルトンが対応する限り、いくつの挿入位置を設けることも可能である。607では、全てのプログラム断片が挿入され、完成したプログラムを出力する。   FIG. 6 is a flowchart showing the operation of the automatic program synthesis means 109. The program automatic synthesizing means 109 completes the program by inserting a program fragment created from the specification into the program fragment 108 at the position where the program fragment is inserted. Referring to FIG. 6, the program skeleton 108 of FIG. In 602, the program customization information, the cursor definition statement, the work variable definition statement sequence, and the output processing statement sequence are respectively converted into the program skeleton customization information acquisition unit 102, the cursor definition statement generation unit 105, and the work variable definition statement generation unit 106 in FIG. , Received from the output processing statement generation means 107. In step 603, the cursor definition statement received in 602 is inserted into the cursor definition statement insertion position of the program skeleton. In 604, the work variable definition statement string received in 602 is inserted at the work variable definition statement string insertion position of the program skeleton. In 605, the output processing statement string received in 602 is inserted into the output processing statement string insertion position of the program skeleton. In 606, the program name received in 602 is inserted into the program name insertion position of the program skeleton, and the program skeleton customization information is inserted into the insertion position indicated by the name. In the program skeleton of FIG. 10, “initial processing” and “end processing” correspond to this. However, as long as the description of the specification corresponds to the program skeleton, any number of insertion positions can be provided. In 607, all program fragments are inserted and a completed program is output.

以上により、仕様からプログラムを自動的に作成し、出力できる。   As described above, a program can be automatically created and output from a specification.

なお、本説明では、カーソル定義スケルトン、作業変数定義スケルトン、出力処理文スケルトン、プログラムスケルトンは、PL/SQL言語に従って記述し、説明しているが、他のプログラミング言語のプログラムを自動生成する場合には、生成するプログラミング言語に従ったスケルトンを用意することで、他のプログラミング言語のプログラムを生成することが可能である。   In this description, the cursor definition skeleton, the work variable definition skeleton, the output processing statement skeleton, and the program skeleton are described according to the PL / SQL language. However, when a program of another programming language is automatically generated. Can generate a program of another programming language by preparing a skeleton according to the programming language to be generated.

また、図3、図4、図5、図6の処理流れ図において、横に並列して記述されている部分は、その間の処理順序がどのような順序であっても良いことを表している。例えば、図3において、302と303と304は、この順序で処理しても良いし、304、303、302の順序で処理しても良いし、あるいは、これらを合わせて一緒に処理しても良いことを表している。   Further, in the processing flow charts of FIGS. 3, 4, 5, and 6, the portions described in parallel in the horizontal direction indicate that the processing order between them may be any order. For example, in FIG. 3, 302, 303, and 304 may be processed in this order, may be processed in the order of 304, 303, and 302, or may be processed together. It represents a good thing.

このように、本実施の形態では、プログラム開発者は、仕様として、プログラム名と入力表項目定義とセレクト項目定義と出力表項目定義と出力表項目計算処理定義とセレクト条件定義を個別仕様、プログラムカスタマイズ情報を共通処理仕様として指定するだけで、データ処理プログラムを自動生成させることができる。したがって、従来、プログラミング工程において混入していたミスを無くすことができ、またプログラム開発の生産性も大幅に向上させることができる。   As described above, in this embodiment, the program developer specifies the program name, the input table item definition, the select item definition, the output table item definition, the output table item calculation processing definition, and the select condition definition as individual specifications, programs A data processing program can be automatically generated simply by specifying customization information as a common processing specification. Therefore, it is possible to eliminate mistakes that have conventionally been mixed in the programming process, and it is possible to greatly improve the productivity of program development.

[第4の実施の形態]
次に本発明の第4の実施の形態について、第3の実施の形態との相違点を中心に説明する。
[Fourth embodiment]
Next, a fourth embodiment of the present invention will be described focusing on differences from the third embodiment.

第3の実施の形態において、図2の仕様201は、プログラム名202と入力表項目定義203とセレクト項目定義204と出力表項目定義205と出力表項目計算処理206とセレクト条件207とプログラムカスタマイズ情報208から構成されていた。第4の実施の形態では、このうち、セレクト項目定義204を持たずに構成される。すなわち、図11に示したように、プログラム名1102と入力表項目定義1103と出力表項目定義1104と出力表処理定義1105とセレクト条件定義1106と(以上、個別仕様)、プログラムカスタマイズ情報1107(共通処理仕様)とから構成されている。   In the third embodiment, the specification 201 in FIG. 2 includes a program name 202, an input table item definition 203, a select item definition 204, an output table item definition 205, an output table item calculation process 206, a selection condition 207, and program customization information. It consisted of 208. Of these, the fourth embodiment is configured without the select item definition 204. That is, as shown in FIG. 11, program name 1102, input table item definition 1103, output table item definition 1104, output table processing definition 1105, select condition definition 1106 (above, individual specification), program customization information 1107 (common) Processing specifications).

第4の実施の形態では、図1の仕様入力手段101は、図11のような構成を持つ仕様を入力し、プログラムスケルトンカスタマイズ情報取得手段102とカーソル定義情報取得手段103と出力項目処理情報取得手段104に渡す。第4の実施の形態における図1のカーソル定義情報取得手段103は、仕様入力手段101から渡された仕様情報から、入力表項目定義1103と出力表処理定義1105とセレクト条件定義1106に対応する部分を取り出し、カーソル定義文生成手段105に渡す。   In the fourth embodiment, the specification input means 101 in FIG. 1 inputs specifications having the configuration as shown in FIG. 11, and program skeleton customization information acquisition means 102, cursor definition information acquisition means 103, and output item processing information acquisition. Passed to means 104. The cursor definition information acquisition unit 103 in FIG. 1 according to the fourth embodiment is a part corresponding to the input table item definition 1103, the output table processing definition 1105, and the selection condition definition 1106 from the specification information passed from the specification input unit 101. Is taken out and passed to the cursor definition sentence generation means 105.

次に第4の実施の形態におけるカーソル定義文生成手段105の詳細な処理を図12に示す。図12の1201では、カーソル定義情報取得手段103から入力表項目定義情報とセレクト条件定義情報と出力表処理定義情報をカーソル定義情報として受けとる。1202では、入力表項目定義情報と出力表処理定義情報から、図13に示すようにして、セレクト項目定義情報を作成する。以後は、図3に示した第3の実施の形態におけるカーソル定義文生成手段105の処理方式と同一である。   Next, detailed processing of the cursor definition statement generation means 105 in the fourth exemplary embodiment is shown in FIG. In 1201 of FIG. 12, input table item definition information, select condition definition information, and output table processing definition information are received from the cursor definition information acquisition unit 103 as cursor definition information. At 1202, select item definition information is created from input table item definition information and output table process definition information as shown in FIG. Subsequent processing is the same as the processing method of the cursor definition statement generation means 105 in the third embodiment shown in FIG.

図13を参照すると、1301でまず、セレクト表列とセレクト項目列を空とする。1302では、全ての入力表<<表>>の全ての項目<<項目>>について1303から1306を繰り返す。1303では、<<表>>と<<項目>>の組が、つまり注目している入力表の項目が、出力表処理定義内の処理条件または処理式または更新/削除条件で使用されているかどうかをテストしている。使用されていない場合には次の繰り返し要素に移る。使用されている場合には、1304で<<表>>と<<項目>>の組をセレクト項目列に追加する。次いで1305で<<表>>がセレクト表列内にあるかどうかをテストしている。既にあった場合には、次の繰り返し要素に移る。無い場合には、1306で<<表>>をセレクト表列に追加する。全ての入力表の全ての項目について以上を繰り返した後、1307でセレクト表列とセレクト項目列を合わせてセレクト項目定義情報として出力する。   Referring to FIG. 13, first in 1301, the select table column and the select item column are made empty. In 1302, 1303 to 1306 are repeated for all items << item >> of all input tables << table >>. In 1303, whether the pair of << table >> and << item >>, that is, the item of the input table of interest, is used in the processing condition or processing expression or update / delete condition in the output table processing definition I'm testing it. If not used, move to the next repeating element. If used, in 1304, a set of << table >> and << item >> is added to the select item string. Then 1305 tests whether << table >> is in the select table column. If already, move to next repeating element. If not, << Table >> is added to the select table column in 1306. After repeating the above for all items in all input tables, in 1307, the select table column and the select item column are combined and output as select item definition information.

以上により、本発明の第3の実施の形態におけるセレクト項目定義情報を自動的に作成することができた。したがって、図12の1203から1207の処理において、第3の実施の形態における図3と同一の動作でカーソル定義文を作成することができる。   As described above, the select item definition information in the third embodiment of the present invention can be automatically created. Therefore, in the processing from 1203 to 1207 in FIG. 12, a cursor definition sentence can be created by the same operation as that in FIG. 3 in the third embodiment.

他の構成要素の動作は第3の実施の形態と同一である。   The operation of the other components is the same as that of the third embodiment.

本実施の形態では、利用者は仕様内にセレクト項目情報を指定することなく、第3の実施の形態と同じプログラムを自動生成ことができるため、第3の実施の形態と比較して、より容易に仕様を作成することができる、という効果がある。   In the present embodiment, the user can automatically generate the same program as in the third embodiment without specifying select item information in the specification. There is an effect that the specification can be easily created.

[第5の実施の形態]
次に本発明の第5の実施の形態について第3の実施の形態との相違点を中心に説明する。
[Fifth embodiment]
Next, a fifth embodiment of the present invention will be described focusing on differences from the third embodiment.

図14に本発明の第5の実施の形態における構成図を示す。図14を図1と比較すると、プログラムスケルトンを一つ含む図1のプログラムスケルトン108の代わりにプログラムスケルトンを1種類以上いくつでも保持できるプログラムスケルトンライブラリ1411を持ち、プログラムスケルトン特定情報取得手段1404とプログラムスケルトン選択手段1412が追加されている。   FIG. 14 shows a configuration diagram according to the fifth embodiment of the present invention. Comparing FIG. 14 with FIG. 1, instead of the program skeleton 108 of FIG. 1 including one program skeleton, it has a program skeleton library 1411 that can hold any number of one or more types of program skeletons. A skeleton selection means 1412 is added.

仕様1401は、図1の仕様1と比較して、プログラムスケルトン特定情報を合わせ持って構成される。この仕様の構成を図15に示す。図15を参照すると、仕様1501は、プログラム名1502と入力表項目定義1503とセレクト項目定義1504と出力表項目定義1505と出力表処理定義1506とセレクト条件定義1507と(以上、個別仕様)、プログラムカスタマイズ情報1509(共通処理仕様)と、プログラムスケルトン特定情報1508とから構成されている。プログラムスケルトン特定情報1508は、個別仕様および共通処理仕様の何れに含まれていても良い。   The specification 1401 is configured by combining program skeleton specifying information as compared with the specification 1 of FIG. The configuration of this specification is shown in FIG. Referring to FIG. 15, a specification 1501 includes a program name 1502, an input table item definition 1503, a select item definition 1504, an output table item definition 1505, an output table processing definition 1506, a select condition definition 1507 (and above, individual specifications), a program It consists of customization information 1509 (common processing specifications) and program skeleton identification information 1508. The program skeleton identification information 1508 may be included in either the individual specification or the common processing specification.

図14の仕様入力手段1403は、図15のような構成を持つ仕様を入力し、プログラムスケルトン特定情報取得手段1404と、スケルトンカスタマイズ情報取得手段1405と、カーソル定義情報取得手段1406と、出力項目処理情報取得手段1407に渡す。図14のプログラムスケルトン特定情報取得手段1404は、仕様入力手段1403で入力された仕様からプログラムスケルトン特定情報を取り出し、プログラムスケルトン選択手段1412に渡す。プログラムスケルトン選択手段1412は、プログラムスケルトン特定情報を用いて特定されたプログラムスケルトンをプログラムスケルトンライブラリ1411から取り出し、このプログラムスケルトンをプログラム自動合成手段1413に渡す。プログラムスケルトン特定情報を用いてプログラムが特定できない場合には、仕様のエラーとして利用者にその旨通知する。プログラム自動合成手段1413は、プログラムスケルトン選択手段1412から受けとったプログラムスケルトン中の、プログラム断片の挿入位置に、プログラムスケルトンカスタマイズ情報取得手段1405から受け取ったプログラム名とプログラムカスタマイズ情報と、カーソル定義文生成手段1408から受け取ったカーソル定義文と、作業変数定義文生成手段1409から受け取った作業変数定義文列と、出力処理文生成手段1410から受け取った出力処理文列とを、第3の実施形態と同一の方式で挿入し、プログラムを完成して出力する。   The specification input unit 1403 in FIG. 14 inputs the specification having the configuration as shown in FIG. 15, and program skeleton identification information acquisition unit 1404, skeleton customization information acquisition unit 1405, cursor definition information acquisition unit 1406, output item processing Passed to information acquisition means 1407. The program skeleton specifying information acquisition unit 1404 in FIG. 14 takes out the program skeleton specifying information from the specification input by the specification input unit 1403 and passes it to the program skeleton selecting unit 1412. The program skeleton selecting unit 1412 takes out the program skeleton specified by using the program skeleton specifying information from the program skeleton library 1411 and passes this program skeleton to the program automatic synthesizing unit 1413. If the program cannot be identified using the program skeleton identification information, the user is notified as a specification error. The program automatic synthesizing unit 1413 includes the program name received from the program skeleton customization information acquisition unit 1405, the program customization information, and the cursor definition statement generation unit at the insertion position of the program fragment in the program skeleton received from the program skeleton selection unit 1412. The cursor definition statement received from 1408, the work variable definition statement sequence received from the work variable definition statement generation unit 1409, and the output processing statement sequence received from the output processing statement generation unit 1410 are the same as those in the third embodiment. Insert by the method, complete the program and output.

他の構成要素の動作は第3の実施の形態と同一である。   The operation of the other components is the same as that of the third embodiment.

本実施の形態では、様々な処理形態を実装したプログラムスケルトンを複数用意することにより、様々なデータ処理プログラムを自動生成することができる。例えば、複数のプログラミング言語によるプログラムや、異なるアルゴリズムに基づくプログラム、異なる異常処理方式に基づくプログラムを自動生成できる。より広範なプログラムを自動生成できるため、第3の実施の形態と比較して適用範囲が広くなる、という効果がある。   In the present embodiment, various data processing programs can be automatically generated by preparing a plurality of program skeletons in which various processing forms are implemented. For example, a program based on a plurality of programming languages, a program based on different algorithms, and a program based on different abnormality processing methods can be automatically generated. Since a wider range of programs can be automatically generated, there is an effect that the application range is widened as compared with the third embodiment.

[第6の実施の形態]
次に本発明の第6の実施の形態について第3の実施の形態との相違点を中心に説明する。
[Sixth embodiment]
Next, a sixth embodiment of the present invention will be described focusing on differences from the third embodiment.

本実施の形態では、図1の仕様入力手段101が仕様を入力する際にデータベース定義情報を参照して仕様を入力する点が第3の実施の形態と異なる。なお、データベース定義情報は、自動生成しようとするデータ処理プログラムが処理の対象とするデータベースの定義情報であり、図1には図示しない記憶部に格納されており、仕様入力手段101によって参照可能になっている。図16に第6の実施の形態における図1の仕様入力手段101の処理の流れ図を示す。   This embodiment is different from the third embodiment in that the specification is input by referring to the database definition information when the specification input unit 101 in FIG. 1 inputs the specification. The database definition information is the definition information of the database to be processed by the data processing program to be automatically generated. The database definition information is stored in a storage unit (not shown in FIG. 1) and can be referred to by the specification input means 101. It has become. FIG. 16 shows a flowchart of the processing of the specification input means 101 of FIG. 1 in the sixth embodiment.

図16を参照すると、図1の仕様入力手段101は、1601と1602でまず、処理で使用する入力表と出力表の名前だけを取得する。次いで、1603と1604とで、それぞれ、入力表と出力表の名前からデータベース定義情報を検索し、該当する入力表と出力表の項目定義情報を取得する。項目定義情報には、項目名、型、項目へのコメント等がある。1605では、1603と1604で取得した入力表と出力表の項目定義情報を画面上に提示する。1606では、1605で提示した入力表と出力表の項目定義情報を画面上で仕様入力者に利用させることにより、プログラム名、セレクト項目定義、出力表処理定義、セレクト条件定義、プログラムカスタマイズ情報を指定させ、取得する。入力表項目定義と出力表項目定義は、仕様入力手段101がデータベース定義情報から検索したものが使用されるため、利用者は作成する必要はない。なお、第4の実施の形態に適用する場合には、セレクト項目定義の作成は不要である。   Referring to FIG. 16, the specification input means 101 of FIG. 1 first acquires only the names of the input table and output table used in the processing at 1601 and 1602. Next, in 1603 and 1604, the database definition information is searched from the names of the input table and the output table, respectively, and the item definition information of the corresponding input table and output table is acquired. Item definition information includes item names, types, comments on items, and the like. In 1605, the item definition information of the input table and output table acquired in 1603 and 1604 is presented on the screen. In 1606, specify the program name, select item definition, output table process definition, select condition definition, and program customization information by letting the specification input person use the input table and output table item definition information presented in 1605 on the screen. Let and get. Since the input table item definition and the output table item definition are retrieved from the database definition information by the specification input means 101, the user need not create them. When applied to the fourth embodiment, it is not necessary to create a select item definition.

なお、図16の1605と1606で入力表と出力表の項目定義情報を仕様入力者に提示し、これを利用させることによって、プログラム名、セレクト項目定義、出力表処理定義、セレクト条件定義、プログラムカスタマイズ情報を指定させ、取得する方法としては、以下の(1)と(2)の二種類がある。   In addition, the item definition information of the input table and the output table is presented to the specification input person at 1605 and 1606 in FIG. 16, and the program name, the select item definition, the output table process definition, the select condition definition, the program are used. There are the following two methods (1) and (2) for specifying and acquiring the customization information.

(1)入力表と出力表の名前と各項目の項目名と型をマトリクスの一つの軸に沿って並べ、セレクト条件定義とプログラムカスタマイズ情報と出力表の各項目の名前および型をマトリクスの他の軸に沿って並べ、仕様内のセレクト項目定義とセレクト条件定義とプログラムカスタマイズ情報と出力表処理定義の指定の際に、入力表の各項目の情報を参照する時、マトリクスの対応するセルに記号をつけることによって、入力項目の値を参照可能とする。
(2)入力表と出力表の名前と各項目の項目名、型を一覧表の形式で画面上に表示し、仕様入力者がセレクト項目定義とセレクト条件定義とプログラムカスタマイズ情報と出力表処理定義を指定する際に、画面上の表示領域の表名や項目名の上をマウスでクリックすることにより、該当する項目名や表名を文字情報として指定の領域に展開することで、表名や項目名を再度入力することなく仕様を入力可能とする。
(1) Input table and output table names, item names and types of each item are arranged along one axis of the matrix, select condition definition, program customization information, and output table name and type other than matrix When referring to the information of each item in the input table when specifying the select item definition, select condition definition, program customization information and output table processing definition in the specification, it is displayed in the corresponding cell of the matrix. By adding a symbol, the value of the input item can be referred to.
(2) The input table name, output table name, item name and type of each item are displayed on the screen in the form of a list, and the specification input user selects the selection item definition, selection condition definition, program customization information, and output table processing definition. When specifying the table name or item name in the display area on the screen by clicking with the mouse, the corresponding item name or table name is expanded to the specified area as character information. Specification can be entered without re-entering the item name.

図1の仕様1において、図2の入力表項目定義203および出力表項目定義205については、データベースの表定義と同一の情報であり、データベースを作成する際に既に作成され、データベース内に格納されていることが普通である。本実施の形態では、処理の仕様として、改めて入力表項目定義および出力表項目定義を利用者に指定させるのではなく、利用者には、入力表と出力表の名前だけを指定させ、入力表項目定義と出力表項目定義はデータベース内に既に格納されている情報から自動的に検索し、取得することにより、利用者の仕様記述のための手間を削減し、また、人手で指定することによるミスを削減することができる、という効果がある。   In the specification 1 of FIG. 1, the input table item definition 203 and the output table item definition 205 of FIG. 2 are the same information as the database table definition, and are already created when the database is created and stored in the database. It is normal. In this embodiment, the user does not specify the input table item definition and the output table item definition again as the processing specifications, but the user specifies only the names of the input table and the output table. Item definitions and output table item definitions are automatically retrieved from the information already stored in the database and obtained, thereby reducing the time and labor required for user specification descriptions and by manually specifying them. There is an effect that mistakes can be reduced.

[第7の実施の形態]
次に本発明の第7の実施の形態について第3の実施の形態との相違点を中心に説明する。
[Seventh embodiment]
Next, a seventh embodiment of the present invention will be described focusing on differences from the third embodiment.

本実施の形態では、図1のプログラムスケルトン108は、デバグ用トレース文をその挿入箇所が明確に識別できるように例えば特殊な記号で囲んで挿入されている。また、仕様1には、デバグ用のプログラムを生成するのか、本番用のプログラムを生成するのかの別を示す生成プログラム識別情報が、個別仕様および共通処理仕様の何れかに含まれている。この生成プログラム識別情報は、他の仕様情報と一緒に仕様入力手段101により入力され、プログラム自動合成手段109に渡される。プログラム自動合成手段109は、この生成プログラム識別情報に従って、プログラムスケルトン108中のデバグ用トレース文を取り去るか、残すかを切りわける。即ち、本番用のプログラムを生成する場合には、プログラムスケルトン108中の特殊な記号で囲まれたデバグ用トレース文をその特殊な記号とともに取り去り、デバグ用のプログラムを生成する場合には、プログラムスケルトン108中の特殊な記号で囲まれたデバグ用トレース文をそのまま残す。このとき、特殊な記号は取り去っても良く、あっても支障ない場合には残しておいても良い。   In the present embodiment, the program skeleton 108 of FIG. 1 is inserted, for example, surrounded by special symbols so that the insertion trace can be clearly identified. The specification 1 includes generation program identification information indicating whether to generate a debugging program or a production program in either the individual specification or the common processing specification. This generated program identification information is input by the specification input means 101 together with other specification information, and passed to the automatic program synthesis means 109. The automatic program synthesizing means 109 switches between removing or leaving the debugging trace statement in the program skeleton 108 in accordance with the generated program identification information. In other words, when generating a production program, the debugging trace statement enclosed by special symbols in the program skeleton 108 is removed together with the special symbols, and when generating a debugging program, a program skeleton is generated. The debug trace sentence surrounded by special symbols in 108 is left as it is. At this time, special symbols may be removed, or may be left if there is no problem.

本実施の形態によれば、仕様1中の生成プログラム識別情報によって、デバグ用のプログラムの生成と本番用のプログラムの生成とを切り替えることができるという効果がある。   According to the present embodiment, it is possible to switch between the generation of the debugging program and the generation of the production program by the generated program identification information in the specification 1.

[第8の実施の形態]
次に本発明の第8の実施の形態について図18を用いて説明する。図18を参照すると、本発明の第8の実施の形態は、CPU、主記憶、各種の入出力装置を含むコンピュータ1800と、記録媒体1803とから構成される。なお、仕様1801は第3の実施形態の個別仕様1Aおよび共通処理仕様1Bをあわせた仕様に相当し、生成プログラム1802は生成プログラム2に相当する。
[Eighth embodiment]
Next, an eighth embodiment of the present invention will be described with reference to FIG. Referring to FIG. 18, the eighth embodiment of the present invention includes a computer 1800 including a CPU, main memory, various input / output devices, and a recording medium 1803. The specification 1801 corresponds to a specification combining the individual specification 1A and the common processing specification 1B of the third embodiment, and the generation program 1802 corresponds to the generation program 2.

記録媒体1803は、磁気ディスク、半導体メモリ、CD−ROMその他の機械読み取り可能な記録媒体であり、データ処理プログラム自動生成プログラムが記録されている。記録媒体1803に記録されたデータ処理プログラム自動生成プログラムは、コンピュータ1800の立ち上げ時などにコンピュータ1800に読み込まれ、コンピュータ1800の動作を制御することにより、コンピュータ1800上に、仕様入力手段1804と、プログラムスケルトンカスタマイズ情報取得手段1805と、カーソル定義情報取得手段1806と、出力項目処理情報取得手段1807と、カーソル定義文生成手段1808と、作業変数定義文生成手段1809と、出力処理生成手段1810と、プログラムスケルトン1811と、プログラム自動合成手段1812とを実現する。これらの機能部は図1に示した同一名称のものと同じ機能を果たす。   A recording medium 1803 is a machine-readable recording medium such as a magnetic disk, a semiconductor memory, a CD-ROM, and the like. A data processing program automatic generation program is recorded on the recording medium 1803. The data processing program automatic generation program recorded in the recording medium 1803 is read into the computer 1800 when the computer 1800 is started up, etc., and by controlling the operation of the computer 1800, the specification input means 1804 on the computer 1800, Program skeleton customization information acquisition unit 1805, cursor definition information acquisition unit 1806, output item processing information acquisition unit 1807, cursor definition statement generation unit 1808, work variable definition statement generation unit 1809, output processing generation unit 1810, A program skeleton 1811 and automatic program synthesis means 1812 are realized. These functional units perform the same functions as those having the same names shown in FIG.

なお、本説明では、第3の実施の形態に適用した場合について説明したが、他の実施の形態についても同様に、対応するデータ処理プログラム自動生成プログラムを記録媒体1803に記録しておくことができる。   In this description, the case where the present invention is applied to the third embodiment has been described. However, in the other embodiments as well, the corresponding data processing program automatic generation program may be recorded on the recording medium 1803. it can.

本発明の活用例として、バッチ系プログラムの自動生成ツールを構築し、バッチ系システム開発の生産性および品質および保守性を向上することが可能である。また、バッチ系に限らず、帳票系や画面系プログラムにも同様の活用ができる。いずれにしろ共通処理は存在し、また共通処理中に重複する部分が多いからである。   As an application example of the present invention, it is possible to build a batch system automatic generation tool and improve the productivity, quality and maintainability of batch system development. In addition to the batch system, the same application can be made to a form system and a screen system program. In any case, there is a common process, and there are many overlapping parts in the common process.

1A…個別仕様
1B…共通処理仕様
2…生成プログラム
10…データ処理プログラム自動生成システム
101…仕様入力手段
1011…個別仕様入力部
1012…共通処理仕様入力部
1013…展開部
DESCRIPTION OF SYMBOLS 1A ... Individual specification 1B ... Common process specification 2 ... Generation program 10 ... Data processing program automatic generation system 101 ... Specification input means 1011 ... Individual specification input part 1012 ... Common process specification input part 1013 ... Expanding part

Claims (7)

データベースの表のデータを参照し、表中に新たなデータを挿入したり、表中のデータを更新したり、表中のデータを削除したりするプログラムにおいて、前段処理部分と繰り返し処理部分と後段処理部分を備えたプログラム全体を、プログラムスケルトンと仕様とに基づいて、自動的に生成するデータ処理プログラム自動生成システムであって、
作成するデータ処理プログラム毎に異なる仕様である個別仕様を入力する機能と、作成するデータ処理プログラムが属するグループ毎に異なる仕様である共通処理仕様を入力する機能とを有する仕様入力手段を備え、
前記プログラムスケルトンは、仕様の如何に関わらず固定の部分のプログラムとして、前段処理部分と、前記前段処理部分に続く繰り返し処理部分と、前記繰り返し処理部分に続く後段処理部分を含み、仕様によって変化する部分のプログラム断片の挿入位置として、前段処理部分内にプログラム名挿入位置と、カーソル定義文挿入位置と、作業変数定義文列挿入位置と、初期処理挿入位置を含み、繰り返し処理部分内に出力処理文列挿入位置を含み、後段処理部分に終了処理位置を含んで構成され、
前記個別仕様は、生成したプログラムに付与するプログラム名と、入力表の名前とその入力表の各項目の名前および型の情報を含む入力表項目定義と、セレクト文内に定義する入力表項目の名前を含むセレクト項目定義と、出力表の名前とその出力表の各項目の名前および型の情報を含む出力表項目定義と、各出力表の処理を行う条件を示す処理条件と、挿入、更新、削除の別を示す処理種別と、処理種別が更新と削除の場合に更新、削除するための条件を示す更新、削除条件と、処理種別が挿入と更新の場合に各項目の値を計算する処理式とを含む出力表処理定義と、入力表からデータを取得する際の条件を含むセレクト条件定義を含んで構成され、
前記共通処理仕様は、プログラムスケルトンをカスタマイズするためのその他の情報を含むプログラムカスタマイズ情報を含んで構成され、
且つ、
前記プログラムスケルトンを、複数種類格納するための記憶装置に格納されたプログラムスケルトンライブラリと、
前記仕様入力手段で入力された個別仕様から前記プログラム名を取り出し、前記仕様入力手段で入力された共通処理仕様から前記プログラムカスタマイズ情報を取り出すプログラムスケルトンカスタマイズ情報取得手段と、
前記仕様入力手段で入力された個別仕様から入力表項目定義とセレクト項目定義とセレクト条件定義を取り出すカーソル定義情報取得手段と、
前記仕様入力手段で入力された個別仕様から出力表項目定義と出力表処理定義を取り出す出力項目処理情報取得手段と、
前記カーソル定義情報取得手段で取得された情報からカーソル定義文を生成するカーソル定義文生成手段であって、入力表項目定義のうちセレクト項目定義内に指定された項目名だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト項目列を生成し、入力表項目定義内に指定された入力表のうち、セレクト項目定義で使用されている入力表の名前だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト表列を生成し、セレクト条件定義を、生成するプログラミング言語の構文に従った形式に加工してセレクト条件文を生成し、セレクト項目列挿入位置、入力表列挿入位置およびセレクト条件挿入位置を持つ、生成するプログラミング言語に依存したカーソル定義スケルトンの該当挿入位置に、前記生成したセレクト項目列、セレクト表列およびセレクト条件を挿入してカーソル定義文を生成するカーソル定義文生成手段と、
前記出力項目処理情報取得手段で取得された出力表項目定義のうち、処理種別が挿入である出力表に対応するものから作業変数定義文を生成する作業変数定義文生成手段であって、処理種別が挿入である出力表について、その出力表のレコード型を定義する型定義文を生成し、その定義された型で作業領域変数を定義する変数定義文を生成し、型定義文挿入位置および変数定義文挿入位置を持つ作業変数定義スケルトンの該当挿入位置に、前記生成した型定義文および変数定義文を挿入して作業変数定義文を生成する作業変数定義文生成手段と、
前記出力項目処理情報取得手段で取得された出力表項目定義と出力表処理定義から、処理種別が挿入の場合は処理条件文と項目計算文と挿入文とを含む出力処理文を生成し、処理種別が更新の場合には処理条件文と更新文とを含む出力処理文を生成し、処理種別が削除の場合には処理条件文と削除文とを含む出力処理文を生成する出力処理文生成手段であって、出力表処理定義の処理条件から処理条件文を生成し、出力表処理定義の処理種別が挿入、更新、削除の何れであるかを判別し、処理種別が挿入の場合、出力表処理定義の各項目の処理式から項目計算文を生成し、出力表項目定義から出力表名、項目名リストおよび変数名リストを含む挿入文を生成し、処理条件文挿入位置、項目計算文挿入位置および出力文挿入位置を持つ出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、項目計算文挿入位置に前記生成した項目計算文を、出力文挿入位置に前記生成した挿入文をそれぞれ挿入して出力処理文を生成し、処理種別が更新の場合、出力表処理定義の各項目の処理式と出力表項目定義とから出力表名、更新文リストおよび更新条件を含む更新文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した更新文をそれぞれ挿入して出力処理文を生成し、処理種別が削除の場合、出力表項目定義から出力表名および削除条件を含む削除文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した削除文をそれぞれ挿入して出力処理文を生成する出力処理文生成手段と、
前記プログラムスケルトンライブラリから利用者の指定した1つのプログラムスケルトンを選択するプログラムスケルトン選択手段と、
前記データ処理プログラムのうち、前記プログラムスケルトン選択手段で選択されたプログラムスケルトンの該当挿入位置に、前記プログラムスケルトンカスタマイズ情報取得手段で取得したプログラム名とプログラムカスタマイズ情報と、前記カーソル定義文生成手段で生成したカーソル定義文と、前記作業変数定義文生成手段で生成した作業変数定義文と、前記出力処理文生成手段で生成した出力処理文とを挿入することによってプログラムを完成させ、出力するプログラム自動合成手段とを備えることを特徴とするデータ処理プログラム自動生成システム。
In a program that references data in a database table and inserts new data into the table, updates data in the table, or deletes data in the table, the pre-processing part, the iterative processing part, and the post-processing part A data processing program automatic generation system that automatically generates an entire program including a processing part based on a program skeleton and specifications,
A specification input means having a function of inputting individual specifications that are different specifications for each data processing program to be created and a function of inputting common processing specifications that are different specifications for each group to which the data processing program to be created belongs,
The program skeleton includes a pre-processing portion, a repetitive processing portion following the pre-processing portion, and a post-processing portion following the repetitive processing portion as a fixed portion program regardless of the specification, and varies depending on the specification. The program fragment insertion position includes the program name insertion position, the cursor definition statement insertion position, the work variable definition statement string insertion position, and the initial process insertion position in the preceding processing portion, and the output processing in the iteration processing portion It includes a sentence string insertion position and is configured to include an end processing position in the subsequent processing part.
The individual specification includes the program name to be given to the generated program, the input table name including the name of the input table and the name and type information of each item of the input table, and the input table item defined in the select statement. Select item definition including name, output table name and output table item definition including name and type information of each item of the output table, processing condition indicating conditions for processing each output table, insertion, update , The processing type that indicates the type of deletion, update when the processing type is update and deletion, update that indicates the conditions for deleting, and the deletion condition, and the value of each item when the processing type is insertion and update An output table processing definition including a processing expression and a selection condition definition including a condition for acquiring data from the input table are configured.
The common processing specification includes program customization information including other information for customizing the program skeleton,
and,
A program skeleton library stored in a storage device for storing a plurality of types of the program skeleton;
Program skeleton customization information acquisition means for extracting the program name from the individual specification input by the specification input means, and for extracting the program customization information from the common processing specification input by the specification input means;
Cursor definition information acquisition means for extracting an input table item definition, a selection item definition, and a selection condition definition from the individual specification input by the specification input means;
Output item processing information acquisition means for extracting output table item definitions and output table processing definitions from the individual specifications input by the specification input means;
A cursor definition statement generation unit that generates a cursor definition statement from information acquired by the cursor definition information acquisition unit, and extracts and generates only the item name specified in the select item definition from the input table item definition A select item string is generated in a format according to the syntax of the language, and only the name of the input table used in the select item definition is extracted from the input table specified in the input table item definition. Generate a select table column in a format according to the syntax, process the select condition definition into a format according to the syntax of the programming language to be generated, generate a select condition statement, select item column insertion position, input table column insertion position And the insertion position of the cursor definition skeleton that depends on the programming language to be generated, The resulting selection item column, and the cursor definition statement generating means for generating a cursor definition statement by inserting the select table column and the select condition,
A work variable definition statement generation unit that generates a work variable definition statement from an output table item definition acquired by the output item processing information acquisition unit and that corresponds to an output table whose processing type is insertion. For an output table that is an insert, generate a type definition statement that defines the record type of the output table, generate a variable definition statement that defines a work area variable with the defined type, and insert the type definition statement insertion position and variable A work variable definition statement generating means for generating a work variable definition statement by inserting the generated type definition statement and variable definition statement at a corresponding insertion position of a work variable definition skeleton having a definition statement insertion position;
From the output table item definition and output table processing definition acquired by the output item processing information acquisition means, if the processing type is insertion, an output processing statement including a processing condition statement, an item calculation statement, and an insertion statement is generated and processed. If the type is update, an output process statement including a processing condition statement and an update statement is generated. If the type is deletion, an output process statement including a processing condition statement and a deletion statement is generated. A means to generate a processing condition statement from the processing conditions of the output table processing definition, determine whether the processing type of the output table processing definition is insertion, update, or deletion. If the processing type is insertion, output An item calculation statement is generated from the processing expression of each item in the table processing definition, an insertion statement including the output table name, item name list, and variable name list is generated from the output table item definition, the processing condition statement insertion position, the item calculation statement Output processing with insertion position and output statement insertion position Generate the output processing statement by inserting the generated processing condition statement at the skeleton processing condition statement insertion position, the generated item calculation statement at the item calculation statement insertion position, and the generated insertion statement at the output statement insertion position. If the processing type is update, an update statement including an output table name, an update statement list, and an update condition is generated from the processing expression of each item of the output table processing definition and the output table item definition, and the output processing statement skeleton When the generated processing condition statement is inserted at the processing condition statement insertion position and the generated update statement is inserted at the output statement insertion position, respectively, and an output processing statement is generated. A deletion statement including a name and a deletion condition is generated, and the generated processing condition statement is inserted at the processing condition statement insertion position of the output processing statement skeleton, and the generated deletion statement is inserted at the output statement insertion position. An output processing statement generating means for generating Driven,
Program skeleton selection means for selecting one program skeleton designated by the user from the program skeleton library;
Of the data processing program, generated at the corresponding insertion position of the program skeleton selected by the program skeleton selection unit, the program name and program customization information acquired by the program skeleton customization information acquisition unit, and generated by the cursor definition statement generation unit The program is completed by inserting the cursor definition statement, the work variable definition statement generated by the work variable definition statement generating means, and the output processing statement generated by the output processing statement generating means, and the program is automatically synthesized. Means for automatically generating a data processing program.
データベースの表のデータを参照し、表中に新たなデータを挿入したり、表中のデータを更新したり、表中のデータを削除したりするプログラムにおいて、前段処理部分と繰り返し処理部分と後段処理部分を備えたプログラム全体を、プログラムスケルトンと仕様とに基づいて、自動的に生成するデータ処理プログラム自動生成システムであって、
作成するデータ処理プログラム毎に異なる仕様である個別仕様を入力する機能と、作成するデータ処理プログラムが属するグループ毎に異なる仕様である共通処理仕様を入力する機能とを有する仕様入力手段を備え、
前記プログラムスケルトンは、仕様の如何に関わらず固定の部分のプログラムとして、前段処理部分と、前記前段処理部分に続く繰り返し処理部分と、前記繰り返し処理部分に続く後段処理部分を含み、仕様によって変化する部分のプログラム断片の挿入位置として、前段処理部分内にプログラム名挿入位置と、カーソル定義文挿入位置と、作業変数定義文列挿入位置と、初期処理挿入位置を含み、繰り返し処理部分内に出力処理文列挿入位置を含み、後段処理部分に終了処理位置を含んで構成され、
前記個別仕様は、生成したプログラムに付与するプログラム名と、入力表の名前とその入力表の各項目の名前および型の情報を含む入力表項目定義と、出力表の名前とその出力表の各項目の名前および型の情報を含む出力表項目定義と、各出力表の処理を行う条件を示す処理条件と、挿入、更新、削除の別を示す処理種別と、処理種別が更新と削除の場合に更新、削除するための条件を示す更新、削除条件と、処理種別が挿入と更新の場合に各項目の値を計算する処理式とを含む出力表処理定義と、入力表からデータを取得する際の条件を含むセレクト条件定義を含んで構成され、
前記共通処理仕様は、プログラムスケルトンをカスタマイズするためのその他の情報を含むプログラムカスタマイズ情報を含んで構成され、
且つ、
前記プログラムスケルトンを、複数種類格納するための記憶装置に格納されたプログラムスケルトンライブラリと、
前記仕様入力手段で入力された個別仕様から前記プログラム名を取り出し、前記仕様入力手段で入力された共通処理仕様から前記プログラムカスタマイズ情報を取り出すプログラムスケルトンカスタマイズ情報取得手段と、
前記仕様入力手段で入力された個別仕様から入力表項目定義とセレクト条件定義と出力表処理定義を取り出すカーソル定義情報取得手段と、
前記仕様入力手段で入力された個別仕様から出力表項目定義と出力表処理定義を取り出す出力項目処理情報取得手段と、
前記カーソル定義情報取得手段で取得された入力表項目定義とセレクト条件定義と出力表処理定義とからセレクト項目定義を作成し、該作成したセレクト項目定義と前記カーソル定義情報取得手段で取得されたセレクト条件定義とからカーソル定義文を生成するカーソル定義文生成手段であって、入力表項目定義と出力表処理定義から、セレクト文内に定義する入力表項目の名前を含むセレクト項目定義を生成し、入力表項目定義のうちセレクト項目定義内に指定された項目名だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト項目列を生成し、入力表項目定義内に指定された入力表のうち、セレクト項目定義で使用されている入力表の名前だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト表列を生成し、セレクト条件定義を、生成するプログラミング言語の構文に従った形式に加工してセレクト条件文を生成し、セレクト項目列挿入位置、入力表列挿入位置およびセレクト条件挿入位置を持つ、生成するプログラミング言語に依存したカーソル定義スケルトンの該当挿入位置に、前記生成したセレクト項目列、セレクト表列およびセレクト条件を挿入してカーソル定義文を生成するカーソル定義文生成手段と、
前記出力項目処理情報取得手段で取得された出力表項目定義のうち、処理種別が挿入である出力表に対応するものから作業変数定義文を生成する作業変数定義文生成手段であって、処理種別が挿入である出力表について、その出力表のレコード型を定義する型定義文を生成し、その定義された型で作業領域変数を定義する変数定義文を生成し、型定義文挿入位置および変数定義文挿入位置を持つ作業変数定義スケルトンの該当挿入位置に、前記生成した型定義文および変数定義文を挿入して作業変数定義文を生成する作業変数定義文生成手段と、
前記出力項目処理情報取得手段で取得された出力表項目定義と出力表処理定義から、処理種別が挿入の場合は処理条件文と項目計算文と挿入文とを含む出力処理文を生成し、処理種別が更新の場合には処理条件文と更新文とを含む出力処理文を生成し、処理種別が削除の場合には処理条件文と削除文とを含む出力処理文を生成する出力処理文生成手段であって、出力表処理定義の処理条件から処理条件文を生成し、出力表処理定義の処理種別が挿入、更新、削除の何れであるかを判別し、処理種別が挿入の場合、出力表処理定義の各項目の処理式から項目計算文を生成し、出力表項目定義から出力表名、項目名リストおよび変数名リストを含む挿入文を生成し、処理条件文挿入位置、項目計算文挿入位置および出力文挿入位置を持つ出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、項目計算文挿入位置に前記生成した項目計算文を、出力文挿入位置に前記生成した挿入文をそれぞれ挿入して出力処理文を生成し、処理種別が更新の場合、出力表処理定義の各項目の処理式と出力表項目定義とから出力表名、更新文リストおよび更新条件を含む更新文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した更新文をそれぞれ挿入して出力処理文を生成し、処理種別が削除の場合、出力表項目定義から出力表名および削除条件を含む削除文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した削除文をそれぞれ挿入して出力処理文を生成する出力処理文生成手段と、
前記プログラムスケルトンライブラリから利用者の指定した1つのプログラムスケルトンを選択するプログラムスケルトン選択手段と、
前記データ処理プログラムのうち、前記プログラムスケルトン選択手段で選択されたプログラムスケルトンの該当挿入位置に、前記プログラムスケルトンカスタマイズ情報取得手段で取得したプログラム名とプログラムカスタマイズ情報と、前記カーソル定義文生成手段で生成したカーソル定義文と、前記作業変数定義文生成手段で生成した作業変数定義文と、前記出力処理文生成手段で生成した出力処理文とを挿入することによってプログラムを完成させ、出力するプログラム自動合成手段とを備えることを特徴とするデータ処理プログラム自動生成システム。
In a program that references data in a database table and inserts new data into the table, updates data in the table, or deletes data in the table, the pre-processing part, the iterative processing part, and the post-processing part A data processing program automatic generation system that automatically generates an entire program including a processing part based on a program skeleton and specifications,
A specification input means having a function of inputting individual specifications that are different specifications for each data processing program to be created and a function of inputting common processing specifications that are different specifications for each group to which the data processing program to be created belongs,
The program skeleton includes a pre-processing portion, a repetitive processing portion following the pre-processing portion, and a post-processing portion following the repetitive processing portion as a fixed portion program regardless of the specification, and varies depending on the specification. The program fragment insertion position includes the program name insertion position, the cursor definition statement insertion position, the work variable definition statement string insertion position, and the initial process insertion position in the preceding processing portion, and the output processing in the iteration processing portion It includes a sentence string insertion position and is configured to include an end processing position in the subsequent processing part.
The individual specifications are the program name to be given to the generated program, the input table name and the input table item definition including the name and type information of each item of the input table, the name of the output table and each of the output table Output table item definition that includes information on the item name and type, processing conditions that indicate the conditions for processing each output table, processing type that indicates whether to insert, update, or delete, and when the processing type is update or delete Get the data from the input table and the output table process definition that includes the update and delete conditions that indicate the conditions for updating and deleting, and the processing formula that calculates the value of each item when the process type is insert and update It includes a selection condition definition that includes conditions when
The common processing specification includes program customization information including other information for customizing the program skeleton,
and,
A program skeleton library stored in a storage device for storing a plurality of types of the program skeleton;
Program skeleton customization information acquisition means for extracting the program name from the individual specification input by the specification input means, and for extracting the program customization information from the common processing specification input by the specification input means;
Cursor definition information acquisition means for extracting an input table item definition, a selection condition definition, and an output table processing definition from the individual specifications input by the specification input means;
Output item processing information acquisition means for extracting output table item definitions and output table processing definitions from the individual specifications input by the specification input means;
A selection item definition is created from the input table item definition, the selection condition definition, and the output table processing definition acquired by the cursor definition information acquisition unit, and the selection item definition and the selection acquired by the cursor definition information acquisition unit are created. A cursor definition statement generating means for generating a cursor definition statement from a condition definition, generating a select item definition including the name of an input table item to be defined in a select statement from an input table item definition and an output table processing definition, Extracts only the item name specified in the select item definition from the input table item definition, generates a select item string in a format according to the syntax of the programming language to be generated, and creates the input table specified in the input table item definition. Of these, only the name of the input table used in the select item definition is extracted and selected in the format according to the syntax of the programming language to be generated. The table condition is generated, the select condition definition is processed into a format according to the syntax of the programming language to be generated, and the select condition statement is generated, and the select item string insertion position, the input table string insertion position and the select condition insertion position are set. A cursor definition statement generating means for generating a cursor definition statement by inserting the generated select item column, select table column and select condition at a corresponding insertion position of a cursor definition skeleton depending on a programming language to be generated;
A work variable definition statement generation unit that generates a work variable definition statement from an output table item definition acquired by the output item processing information acquisition unit and that corresponds to an output table whose processing type is insertion. For an output table that is an insert, generate a type definition statement that defines the record type of the output table, generate a variable definition statement that defines a work area variable with the defined type, and insert the type definition statement insertion position and variable A work variable definition statement generating means for generating a work variable definition statement by inserting the generated type definition statement and variable definition statement at a corresponding insertion position of a work variable definition skeleton having a definition statement insertion position;
From the output table item definition and output table processing definition acquired by the output item processing information acquisition means, if the processing type is insertion, an output processing statement including a processing condition statement, an item calculation statement, and an insertion statement is generated and processed. If the type is update, an output process statement including a processing condition statement and an update statement is generated. If the type is deletion, an output process statement including a processing condition statement and a deletion statement is generated. A means to generate a processing condition statement from the processing conditions of the output table processing definition, determine whether the processing type of the output table processing definition is insertion, update, or deletion. If the processing type is insertion, output An item calculation statement is generated from the processing expression of each item in the table processing definition, an insertion statement including the output table name, item name list, and variable name list is generated from the output table item definition, the processing condition statement insertion position, the item calculation statement Output processing with insertion position and output statement insertion position Generate the output processing statement by inserting the generated processing condition statement at the skeleton processing condition statement insertion position, the generated item calculation statement at the item calculation statement insertion position, and the generated insertion statement at the output statement insertion position. If the processing type is update, an update statement including an output table name, an update statement list, and an update condition is generated from the processing expression of each item of the output table processing definition and the output table item definition, and the output processing statement skeleton When the generated processing condition statement is inserted at the processing condition statement insertion position and the generated update statement is inserted at the output statement insertion position, respectively, and an output processing statement is generated. A deletion statement including a name and a deletion condition is generated, and the generated processing condition statement is inserted at the processing condition statement insertion position of the output processing statement skeleton, and the generated deletion statement is inserted at the output statement insertion position. An output processing statement generating means for generating Driven,
Program skeleton selection means for selecting one program skeleton designated by the user from the program skeleton library;
Of the data processing program, generated at the corresponding insertion position of the program skeleton selected by the program skeleton selection unit, the program name and program customization information acquired by the program skeleton customization information acquisition unit, and generated by the cursor definition statement generation unit The program is completed by inserting the cursor definition statement, the work variable definition statement generated by the work variable definition statement generating means, and the output processing statement generated by the output processing statement generating means, and the program is automatically synthesized. Means for automatically generating a data processing program.
前記共通処理仕様は、キーワードを付与した共通処理記述と、該共通処理記述を挿入する箇所に前記キーワードを挿入してある複数の処理記述とを含み、
前記仕様入力手段は、前記複数の処理記述中における前記キーワードの挿入位置に前記共通処理記述を展開する展開手段を備えることを特徴とする請求項1または2に記載のデータ処理プログラム自動生成システム。
The common process specification includes a common process description to which a keyword is assigned, and a plurality of process descriptions in which the keyword is inserted at a position where the common process description is inserted.
3. The data processing program automatic generation system according to claim 1, wherein the specification input unit includes an expansion unit that expands the common process description at an insertion position of the keyword in the plurality of process descriptions.
仕様入力手段とプログラムスケルトンカスタマイズ情報取得手段とカーソル定義情報取得手段と出力項目処理情報取得手段とカーソル定義文生成手段と作業変数定義文生成手段と出力処理文生成手段とプログラムスケルトン選択手段とプログラム自動合成手段とを備え、データベースの表のデータを参照し、表中に新たなデータを挿入したり、表中のデータを更新したり、表中のデータを削除したりするプログラムにおいて、前段処理部分と繰り返し処理部分と後段処理部分を備えたプログラム全体を、プログラムスケルトンと仕様とに基づいて、自動的に生成するデータ処理プログラム自動生成システムが実行する方法であって、
前記プログラムスケルトンは、仕様の如何に関わらず固定の部分のプログラムとして、前段処理部分と、前記前段処理部分に続く繰り返し処理部分と、前記繰り返し処理部分に続く後段処理部分を含み、仕様によって変化する部分のプログラム断片の挿入位置として、前段処理部分内にプログラム名挿入位置と、カーソル定義文挿入位置と、作業変数定義文列挿入位置と、初期処理挿入位置を含み、繰り返し処理部分内に出力処理文列挿入位置を含み、後段処理部分に終了処理位置を含んで構成され、
前記仕様入力手段が、作成するデータ処理プログラム毎に異なる仕様である個別仕様と、作成するデータ処理プログラムが属するグループ毎に異なる仕様である共通処理仕様とを入力し、
前記個別仕様は、生成したプログラムに付与するプログラム名と、入力表の名前とその入力表の各項目の名前および型の情報を含む入力表項目定義と、セレクト文内に定義する入力表項目の名前を含むセレクト項目定義と、出力表の名前とその出力表の各項目の名前および型の情報を含む出力表項目定義と、各出力表の処理を行う条件を示す処理条件と、挿入、更新、削除の別を示す処理種別と、処理種別が更新と削除の場合に更新、削除するための条件を示す更新、削除条件と、処理種別が挿入と更新の場合に各項目の値を計算する処理式とを含む出力表処理定義と、入力表からデータを取得する際の条件を含むセレクト条件定義を含んで構成され、
前記共通処理仕様は、プログラムスケルトンをカスタマイズするためのその他の情報を含むプログラムカスタマイズ情報を含んで構成され、
記プログラムスケルトンカスタマイズ情報取得手段が、前記仕様入力手段で入力された個別仕様から前記プログラム名を取り出し、前記仕様入力手段で入力された共通処理仕様から前記プログラムカスタマイズ情報を取り出し、
前記カーソル定義情報取得手段が、前記仕様入力手段で入力された個別仕様から入力表項目定義とセレクト項目定義とセレクト条件定義を取り出し、
前記出力項目処理情報取得手段が、前記仕様入力手段で入力された個別仕様から出力表項目定義と出力表処理定義を取り出し、
前記カーソル定義文生成手段が、入力表項目定義のうちセレクト項目定義内に指定された項目名だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト項目列を生成し、入力表項目定義内に指定された入力表のうち、セレクト項目定義で使用されている入力表の名前だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト表列を生成し、セレクト条件定義を、生成するプログラミング言語の構文に従った形式に加工してセレクト条件文を生成し、セレクト項目列挿入位置、入力表列挿入位置およびセレクト条件挿入位置を持つ、生成するプログラミング言語に依存したカーソル定義スケルトンの該当挿入位置に、前記生成したセレクト項目列、セレクト表列およびセレクト条件を挿入してカーソル定義文を生成し、
前記作業変数定義文生成手段が、前記出力項目処理情報取得手段で取得された出力表項目定義のうち、処理種別が挿入である出力表に対応するものから作業変数定義文を生成し、該生成では、処理種別が挿入である出力表について、その出力表のレコード型を定義する型定義文を生成し、その定義された型で作業領域変数を定義する変数定義文を生成し、型定義文挿入位置および変数定義文挿入位置を持つ作業変数定義スケルトンの該当挿入位置に、前記生成した型定義文および変数定義文を挿入して作業変数定義文を生成し、
前記出力処理文生成手段が、前記出力項目処理情報取得手段で取得された出力表項目定義と出力表処理定義から、処理種別が挿入の場合は処理条件文と項目計算文と挿入文とを含む出力処理文を生成し、処理種別が更新の場合には処理条件文と更新文とを含む出力処理文を生成し、処理種別が削除の場合には処理条件文と削除文とを含む出力処理文を生成し、前記生成では、出力表処理定義の処理条件から処理条件文を生成し、出力表処理定義の処理種別が挿入、更新、削除の何れであるかを判別し、処理種別が挿入の場合、出力表処理定義の各項目の処理式から項目計算文を生成し、出力表項目定義から出力表名、項目名リストおよび変数名リストを含む挿入文を生成し、処理条件文挿入位置、項目計算文挿入位置および出力文挿入位置を持つ出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、項目計算文挿入位置に前記生成した項目計算文を、出力文挿入位置に前記生成した挿入文をそれぞれ挿入して出力処理文を生成し、処理種別が更新の場合、出力表処理定義の各項目の処理式と出力表項目定義とから出力表名、更新文リストおよび更新条件を含む更新文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した更新文をそれぞれ挿入して出力処理文を生成し、処理種別が削除の場合、出力表項目定義から出力表名および削除条件を含む削除文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した削除文をそれぞれ挿入して出力処理文を生成し、
前記プログラムスケルトン選択手段が、前記プログラムスケルトンを、複数種類格納するための記憶装置に格納されたプログラムスケルトンライブラリから利用者の指定した1つのプログラムスケルトンを選択し、
前記プログラム自動合成手段が、前記データ処理プログラムのうち、前記プログラムスケルトン選択手段で選択されたプログラムスケルトンの該当挿入位置に、前記プログラムスケルトンカスタマイズ情報取得手段で取得したプログラム名とプログラムカスタマイズ情報と、前記カーソル定義文生成手段で生成したカーソル定義文と、前記作業変数定義文生成手段で生成した作業変数定義文と、前記出力処理文生成手段で生成した出力処理文とを挿入することによってプログラムを完成させ、出力する
データ処理プログラム自動生成方法。
Specification input means, program skeleton customization information acquisition means, cursor definition information acquisition means, output item processing information acquisition means, cursor definition statement generation means, work variable definition statement generation means, output processing statement generation means, program skeleton selection means, and program automatic In a program comprising a synthesis means, referring to data in a database table, inserting new data into the table, updating data in the table, or deleting data in the table And a data processing program automatic generation system that automatically generates an entire program including a repetitive processing portion and a subsequent processing portion based on a program skeleton and specifications,
The program skeleton includes a pre-processing portion, a repetitive processing portion following the pre-processing portion, and a post-processing portion following the repetitive processing portion as a fixed portion program regardless of the specification, and varies depending on the specification. The program fragment insertion position includes the program name insertion position, the cursor definition statement insertion position, the work variable definition statement string insertion position, and the initial process insertion position in the preceding processing portion, and the output processing in the iteration processing portion It includes a sentence string insertion position and is configured to include an end processing position in the subsequent processing part.
The specification input means inputs individual specifications that are different specifications for each data processing program to be created, and common processing specifications that are different specifications for each group to which the data processing program to be created belongs,
The individual specification includes the program name to be given to the generated program, the input table name including the name of the input table and the name and type information of each item of the input table, and the input table item defined in the select statement. Select item definition including name, output table name and output table item definition including name and type information of each item of the output table, processing condition indicating conditions for processing each output table, insertion, update , The processing type that indicates the type of deletion, update when the processing type is update and deletion, update that indicates the conditions for deleting, and the deletion condition, and the value of each item when the processing type is insertion and update An output table processing definition including a processing expression and a selection condition definition including a condition for acquiring data from the input table are configured.
The common processing specification includes program customization information including other information for customizing the program skeleton ,
Previous SL program skeleton customize information obtaining means retrieves the program name from the individual specification input by the specification input means, taking out the program customization information from the common process specification input by the specification input means,
The cursor definition information acquisition unit extracts an input table item definition, a selection item definition, and a selection condition definition from the individual specification input by the specification input unit,
The output item processing information acquisition unit takes out the output table item definition and the output table processing definition from the individual specification input by the specification input unit,
The cursor definition statement generation means extracts only the item name specified in the select item definition from the input table item definition, generates a select item string in a format according to the syntax of the programming language to be generated, and inputs table item definition Extracts only the name of the input table used in the select item definition from the input table specified in, generates a select table column in a format according to the syntax of the programming language to be generated, and generates a select condition definition Generate a select condition statement by processing it into a format that conforms to the syntax of the programming language to be used. Insert the generated select item column, select table column, and select condition at the corresponding insertion position and place the cursor To generate a Yoshifumi,
The work variable definition statement generation unit generates a work variable definition statement from an output table item definition acquired by the output item processing information acquisition unit, corresponding to an output table whose processing type is insertion, and the generation Then, for an output table whose processing type is insert, generate a type definition statement that defines the record type of the output table, generate a variable definition statement that defines a work area variable with the defined type, and type definition statement Insert the generated type definition statement and variable definition statement at the corresponding insertion position of the work variable definition skeleton having the insertion position and the variable definition statement insertion position, and generate a work variable definition statement.
The output processing statement generation unit includes a processing condition statement, an item calculation statement, and an insertion statement when the processing type is insertion from the output table item definition and the output table processing definition acquired by the output item processing information acquisition unit. An output processing statement is generated. If the processing type is update, an output processing statement including a processing condition statement and an update statement is generated. If the processing type is deletion, an output processing including a processing condition statement and a deletion statement is generated. A statement is generated, and in the generation, a processing condition statement is generated from the processing conditions of the output table processing definition, it is determined whether the processing type of the output table processing definition is insertion, update, or deletion, and the processing type is inserted In the case of, an item calculation statement is generated from the processing expression of each item of the output table processing definition, an insertion statement including the output table name, item name list, and variable name list is generated from the output table item definition, and the processing condition statement insertion position , Item calculation statement insertion position and output statement insertion position The output processing statement skeleton inserts the generated processing condition statement at the processing statement insertion position, inserts the generated item calculation statement at the item calculation statement insertion position, and outputs the generated insertion statement at the output statement insertion position. If a processing statement is generated and the processing type is update, an update statement including an output table name, an update statement list, and an update condition is generated from the processing expression of each item of the output table processing definition and the output table item definition, and the output When the generated processing condition statement is inserted at the processing statement insertion position of the processing statement skeleton and the generated update statement is inserted at the output statement insertion position, an output processing statement is generated. A delete statement including an output table name and a delete condition is generated from the definition, the generated process condition statement at the processing condition statement insertion position of the output processing statement skeleton, and the generated delete statement at the output statement insertion position, respectively. Input to generate the output processing statement,
The program skeleton selection means selects one program skeleton designated by a user from a program skeleton library stored in a storage device for storing a plurality of types of the program skeleton,
The program automatic synthesizing means includes a program name and program customization information acquired by the program skeleton customization information acquisition means at a corresponding insertion position of the program skeleton selected by the program skeleton selection means in the data processing program, The program is completed by inserting the cursor definition statement generated by the cursor definition statement generation unit, the work variable definition statement generated by the work variable definition statement generation unit, and the output processing statement generated by the output processing statement generation unit. A method for automatically generating a data processing program to be output.
仕様入力手段とプログラムスケルトンカスタマイズ情報取得手段とカーソル定義情報取得手段と出力項目処理情報取得手段とカーソル定義文生成手段と作業変数定義文生成手段と出力処理文生成手段とプログラムスケルトン選択手段とプログラム自動合成手段とを備え、データベースの表のデータを参照し、表中に新たなデータを挿入したり、表中のデータを更新したり、表中のデータを削除したりするプログラムにおいて、前段処理部分と繰り返し処理部分と後段処理部分を備えたプログラム全体を、プログラムスケルトンと仕様とに基づいて、自動的に生成するデータ処理プログラム自動生成システムが実行するデータ処理プログラム自動生成方法であって、
前記プログラムスケルトンは、仕様の如何に関わらず固定の部分のプログラムとして、前段処理部分と、前記前段処理部分に続く繰り返し処理部分と、前記繰り返し処理部分に続く後段処理部分を含み、仕様によって変化する部分のプログラム断片の挿入位置として、前段処理部分内にプログラム名挿入位置と、カーソル定義文挿入位置と、作業変数定義文列挿入位置と、初期処理挿入位置を含み、繰り返し処理部分内に出力処理文列挿入位置を含み、後段処理部分に終了処理位置を含んで構成され、
前記仕様入力手段が、作成するデータ処理プログラム毎に異なる仕様である個別仕様と、作成するデータ処理プログラムが属するグループ毎に異なる仕様である共通処理仕様とを入力し、
前記個別仕様は、生成したプログラムに付与するプログラム名と、入力表の名前とその入力表の各項目の名前および型の情報を含む入力表項目定義と、出力表の名前とその出力表の各項目の名前および型の情報を含む出力表項目定義と、各出力表の処理を行う条件を示す処理条件と、挿入、更新、削除の別を示す処理種別と、処理種別が更新と削除の場合に更新、削除するための条件を示す更新、削除条件と、処理種別が挿入と更新の場合に各項目の値を計算する処理式とを含む出力表処理定義と、入力表からデータを取得する際の条件を含むセレクト条件定義を含んで構成され、
前記共通処理仕様は、プログラムスケルトンをカスタマイズするためのその他の情報を含むプログラムカスタマイズ情報を含んで構成され、
記プログラムスケルトンカスタマイズ情報取得手段が、前記仕様入力手段で入力された個別仕様から前記プログラム名を取り出し、前記仕様入力手段で入力された共通処理仕様から前記プログラムカスタマイズ情報を取り出し、
前記カーソル定義情報取得手段が、前記仕様入力手段で入力された個別仕様から入力表項目定義とセレクト条件定義と出力表処理定義を取り出し、
前記出力項目処理情報取得手段が、前記仕様入力手段で入力された個別仕様から出力表項目定義と出力表処理定義を取り出し、
前記カーソル定義文生成手段が、前記カーソル定義情報取得手段で取得された入力表項目定義とセレクト条件定義と出力表処理定義とからセレクト項目定義を作成し、該作成したセレクト項目定義と前記カーソル定義情報取得手段で取得されたセレクト条件定義とからカーソル定義文を生成し、前記生成では、入力表項目定義と出力表処理定義から、セレクト文内に定義する入力表項目の名前を含むセレクト項目定義を生成し、入力表項目定義のうちセレクト項目定義内に指定された項目名だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト項目列を生成し、入力表項目定義内に指定された入力表のうち、セレクト項目定義で使用されている入力表の名前だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト表列を生成し、セレクト条件定義を、生成するプログラミング言語の構文に従った形式に加工してセレクト条件文を生成し、セレクト項目列挿入位置、入力表列挿入位置およびセレクト条件挿入位置を持つ、生成するプログラミング言語に依存したカーソル定義スケルトンの該当挿入位置に、前記生成したセレクト項目列、セレクト表列およびセレクト条件を挿入してカーソル定義文を生成し、
前記作業変数定義文生成手段が、前記出力項目処理情報取得手段で取得された出力表項目定義のうち、処理種別が挿入である出力表に対応するものから作業変数定義文を生成し、前記生成では、処理種別が挿入である出力表について、その出力表のレコード型を定義する型定義文を生成し、その定義された型で作業領域変数を定義する変数定義文を生成し、型定義文挿入位置および変数定義文挿入位置を持つ作業変数定義スケルトンの該当挿入位置に、前記生成した型定義文および変数定義文を挿入して作業変数定義文を生成し、
前記出力処理文生成手段が、前記出力項目処理情報取得手段で取得された出力表項目定義と出力表処理定義から、処理種別が挿入の場合は処理条件文と項目計算文と挿入文とを含む出力処理文を生成し、処理種別が更新の場合には処理条件文と更新文とを含む出力処理文を生成し、処理種別が削除の場合には処理条件文と削除文とを含む出力処理文を生成し、前記生成では、出力表処理定義の処理条件から処理条件文を生成し、出力表処理定義の処理種別が挿入、更新、削除の何れであるかを判別し、処理種別が挿入の場合、出力表処理定義の各項目の処理式から項目計算文を生成し、出力表項目定義から出力表名、項目名リストおよび変数名リストを含む挿入文を生成し、処理条件文挿入位置、項目計算文挿入位置および出力文挿入位置を持つ出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、項目計算文挿入位置に前記生成した項目計算文を、出力文挿入位置に前記生成した挿入文をそれぞれ挿入して出力処理文を生成し、処理種別が更新の場合、出力表処理定義の各項目の処理式と出力表項目定義とから出力表名、更新文リストおよび更新条件を含む更新文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した更新文をそれぞれ挿入して出力処理文を生成し、処理種別が削除の場合、出力表項目定義から出力表名および削除条件を含む削除文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した削除文をそれぞれ挿入して出力処理文を生成し、
前記プログラムスケルトン選択手段が、前記プログラムスケルトンを、複数種類格納するための記憶装置に格納されたプログラムスケルトンライブラリから利用者の指定した1つのプログラムスケルトンを選択し、
前記プログラム自動合成手段が、前記データ処理プログラムのうち、前記プログラムスケルトン選択手段で選択されたプログラムスケルトンの該当挿入位置に、前記プログラムスケルトンカスタマイズ情報取得手段で取得したプログラム名とプログラムカスタマイズ情報と、前記カーソル定義文生成手段で生成したカーソル定義文と、前記作業変数定義文生成手段で生成した作業変数定義文と、前記出力処理文生成手段で生成した出力処理文とを挿入することによってプログラムを完成させ、出力する
データ処理プログラム自動生成方法。
Specification input means, program skeleton customization information acquisition means, cursor definition information acquisition means, output item processing information acquisition means, cursor definition statement generation means, work variable definition statement generation means, output processing statement generation means, program skeleton selection means, and program automatic In a program comprising a synthesis means, referring to data in a database table, inserting new data into the table, updating data in the table, or deleting data in the table A data processing program automatic generation method executed by a data processing program automatic generation system that automatically generates an entire program including a repetitive processing portion and a subsequent processing portion based on a program skeleton and specifications,
The program skeleton includes a pre-processing portion, a repetitive processing portion following the pre-processing portion, and a post-processing portion following the repetitive processing portion as a fixed portion program regardless of the specification, and varies depending on the specification. The program fragment insertion position includes the program name insertion position, the cursor definition statement insertion position, the work variable definition statement string insertion position, and the initial process insertion position in the preceding processing portion, and the output processing in the iteration processing portion It includes a sentence string insertion position and is configured to include an end processing position in the subsequent processing part.
The specification input means inputs individual specifications that are different specifications for each data processing program to be created, and common processing specifications that are different specifications for each group to which the data processing program to be created belongs,
The individual specifications are the program name to be given to the generated program, the input table name and the input table item definition including the name and type information of each item of the input table, the name of the output table and each of the output table Output table item definition that includes information on the item name and type, processing conditions that indicate the conditions for processing each output table, processing type that indicates whether to insert, update, or delete, and when the processing type is update or delete Get the data from the input table and the output table process definition that includes the update and delete conditions that indicate the conditions for updating and deleting, and the processing formula that calculates the value of each item when the process type is insert and update It includes a selection condition definition that includes conditions when
The common processing specification includes program customization information including other information for customizing the program skeleton ,
Previous SL program skeleton customize information obtaining means retrieves the program name from the individual specification input by the specification input means, taking out the program customization information from the common process specification input by the specification input means,
The cursor definition information acquisition unit takes out an input table item definition, a selection condition definition, and an output table processing definition from the individual specification input by the specification input unit,
The output item processing information acquisition unit takes out the output table item definition and the output table processing definition from the individual specification input by the specification input unit,
The cursor definition statement generating unit creates a select item definition from the input table item definition, the select condition definition, and the output table processing definition acquired by the cursor definition information acquiring unit, and the generated select item definition and the cursor definition The cursor definition statement is generated from the selection condition definition acquired by the information acquisition means, and in the generation, the selection item definition including the name of the input table item to be defined in the select statement from the input table item definition and the output table processing definition Is generated, only the item name specified in the select item definition is extracted from the input table item definition, the select item string is generated in a format according to the syntax of the programming language to be generated, and specified in the input table item definition. Extract the name of the input table used in the select item definition from the input table and follow the syntax of the programming language to be generated. Generate a select table column in the format, process the select condition definition into a format according to the syntax of the programming language to be generated, generate a select condition statement, select item column insertion position, input table column insertion position, and select condition insertion A cursor definition statement is generated by inserting the generated select item column, select table column and select condition at the corresponding insertion position of the cursor definition skeleton having a position and depending on the programming language to be generated,
The work variable definition statement generation unit generates a work variable definition statement from an output table item definition acquired by the output item processing information acquisition unit, corresponding to an output table whose processing type is insertion, and the generation Then, for an output table whose processing type is insert, generate a type definition statement that defines the record type of the output table, generate a variable definition statement that defines a work area variable with the defined type, and type definition statement Insert the generated type definition statement and variable definition statement at the corresponding insertion position of the work variable definition skeleton having the insertion position and the variable definition statement insertion position, and generate a work variable definition statement.
The output processing statement generation unit includes a processing condition statement, an item calculation statement, and an insertion statement when the processing type is insertion from the output table item definition and the output table processing definition acquired by the output item processing information acquisition unit. An output processing statement is generated. If the processing type is update, an output processing statement including a processing condition statement and an update statement is generated. If the processing type is deletion, an output processing including a processing condition statement and a deletion statement is generated. A statement is generated, and in the generation, a processing condition statement is generated from the processing conditions of the output table processing definition, it is determined whether the processing type of the output table processing definition is insertion, update, or deletion, and the processing type is inserted In the case of, an item calculation statement is generated from the processing expression of each item of the output table processing definition, an insertion statement including the output table name, item name list, and variable name list is generated from the output table item definition, and the processing condition statement insertion position , Item calculation statement insertion position and output statement insertion position The output processing statement skeleton inserts the generated processing condition statement at the processing statement insertion position, inserts the generated item calculation statement at the item calculation statement insertion position, and outputs the generated insertion statement at the output statement insertion position. If a processing statement is generated and the processing type is update, an update statement including an output table name, an update statement list, and an update condition is generated from the processing expression of each item of the output table processing definition and the output table item definition, and the output When the generated processing condition statement is inserted at the processing statement insertion position of the processing statement skeleton and the generated update statement is inserted at the output statement insertion position, an output processing statement is generated. A delete statement including an output table name and a delete condition is generated from the definition, the generated process condition statement at the processing condition statement insertion position of the output processing statement skeleton, and the generated delete statement at the output statement insertion position, respectively. Input to generate the output processing statement,
The program skeleton selection means selects one program skeleton designated by a user from a program skeleton library stored in a storage device for storing a plurality of types of the program skeleton,
The program automatic synthesizing means includes a program name and program customization information acquired by the program skeleton customization information acquisition means at a corresponding insertion position of the program skeleton selected by the program skeleton selection means in the data processing program, The program is completed by inserting the cursor definition statement generated by the cursor definition statement generation unit, the work variable definition statement generated by the work variable definition statement generation unit, and the output processing statement generated by the output processing statement generation unit. A method for automatically generating a data processing program to be output.
データベースの表のデータを参照し、表中に新たなデータを挿入したり、表中のデータを更新したり、表中のデータを削除したりするプログラムにおいて、前段処理部分と繰り返し処理部分と後段処理部分を備えたプログラム全体を、プログラムスケルトンと仕様とに基づいて、自動的に生成するコンピュータを、
作成するデータ処理プログラム毎に異なる仕様である個別仕様を入力する機能と、作成するデータ処理プログラムが属するグループ毎に異なる仕様である共通処理仕様を入力する機能とを有する仕様入力手段として機能させ、
前記プログラムスケルトンは、仕様の如何に関わらず固定の部分のプログラムとして、前段処理部分と、前記前段処理部分に続く繰り返し処理部分と、前記繰り返し処理部分に続く後段処理部分を含み、仕様によって変化する部分のプログラム断片の挿入位置として、前段処理部分内にプログラム名挿入位置と、カーソル定義文挿入位置と、作業変数定義文列挿入位置と、初期処理挿入位置を含み、繰り返し処理部分内に出力処理文列挿入位置を含み、後段処理部分に終了処理位置を含んで構成され、
前記個別仕様は、生成したプログラムに付与するプログラム名と、入力表の名前とその入力表の各項目の名前および型の情報を含む入力表項目定義と、セレクト文内に定義する入力表項目の名前を含むセレクト項目定義と、出力表の名前とその出力表の各項目の名前および型の情報を含む出力表項目定義と、各出力表の処理を行う条件を示す処理条件と、挿入、更新、削除の別を示す処理種別と、処理種別が更新と削除の場合に更新、削除するための条件を示す更新、削除条件と、処理種別が挿入と更新の場合に各項目の値を計算する処理式とを含む出力表処理定義と、入力表からデータを取得する際の条件を含むセレクト条件定義を含んで構成され、
前記共通処理仕様は、プログラムスケルトンをカスタマイズするためのその他の情報を含むプログラムカスタマイズ情報を含んで構成され、
且つ、前記コンピュータを、
前記仕様入力手段で入力された個別仕様から前記プログラム名を取り出し、前記仕様入力手段で入力された共通処理仕様から前記プログラムカスタマイズ情報を取り出すプログラムスケルトンカスタマイズ情報取得手段と、
前記仕様入力手段で入力された個別仕様から入力表項目定義とセレクト項目定義とセレクト条件定義を取り出すカーソル定義情報取得手段と、
前記仕様入力手段で入力された個別仕様から出力表項目定義と出力表処理定義を取り出す出力項目処理情報取得手段と、
前記カーソル定義情報取得手段で取得された情報からカーソル定義文を生成するカーソル定義文生成手段であって、入力表項目定義のうちセレクト項目定義内に指定された項目名だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト項目列を生成し、入力表項目定義内に指定された入力表のうち、セレクト項目定義で使用されている入力表の名前だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト表列を生成し、セレクト条件定義を、生成するプログラミング言語の構文に従った形式に加工してセレクト条件文を生成し、セレクト項目列挿入位置、入力表列挿入位置およびセレクト条件挿入位置を持つ、生成するプログラミング言語に依存したカーソル定義スケルトンの該当挿入位置に、前記生成したセレクト項目列、セレクト表列およびセレクト条件を挿入してカーソル定義文を生成するカーソル定義文生成手段と、
前記出力項目処理情報取得手段で取得された出力表項目定義のうち、処理種別が挿入である出力表に対応するものから作業変数定義文を生成する作業変数定義文生成手段であって、処理種別が挿入である出力表について、その出力表のレコード型を定義する型定義文を生成し、その定義された型で作業領域変数を定義する変数定義文を生成し、型定義文挿入位置および変数定義文挿入位置を持つ作業変数定義スケルトンの該当挿入位置に、前記生成した型定義文および変数定義文を挿入して作業変数定義文を生成する作業変数定義文生成手段と、
前記出力項目処理情報取得手段で取得された出力表項目定義と出力表処理定義から、処理種別が挿入の場合は処理条件文と項目計算文と挿入文とを含む出力処理文を生成し、処理種別が更新の場合には処理条件文と更新文とを含む出力処理文を生成し、処理種別が削除の場合には処理条件文と削除文とを含む出力処理文を生成する出力処理文生成手段であって、出力表処理定義の処理条件から処理条件文を生成し、出力表処理定義の処理種別が挿入、更新、削除の何れであるかを判別し、処理種別が挿入の場合、出力表処理定義の各項目の処理式から項目計算文を生成し、出力表項目定義から出力表名、項目名リストおよび変数名リストを含む挿入文を生成し、処理条件文挿入位置、項目計算文挿入位置および出力文挿入位置を持つ出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、項目計算文挿入位置に前記生成した項目計算文を、出力文挿入位置に前記生成した挿入文をそれぞれ挿入して出力処理文を生成し、処理種別が更新の場合、出力表処理定義の各項目の処理式と出力表項目定義とから出力表名、更新文リストおよび更新条件を含む更新文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した更新文をそれぞれ挿入して出力処理文を生成し、処理種別が削除の場合、出力表項目定義から出力表名および削除条件を含む削除文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した削除文をそれぞれ挿入して出力処理文を生成する出力処理文生成手段と、
前記プログラムスケルトンを、複数種類格納するための記憶装置に格納されたプログラムスケルトンライブラリから利用者の指定した1つのプログラムスケルトンを選択するプログラムスケルトン選択手段と、
前記データ処理プログラムのうち、前記プログラムスケルトン選択手段で選択されたプログラムスケルトンの該当挿入位置に、前記プログラムスケルトンカスタマイズ情報取得手段で取得したプログラム名とプログラムカスタマイズ情報と、前記カーソル定義文生成手段で生成したカーソル定義文と、前記作業変数定義文生成手段で生成した作業変数定義文と、前記出力処理文生成手段で生成した出力処理文とを挿入することによってプログラムを完成させ、出力するプログラム自動合成手段と
して機能させるためのプログラム。
In a program that references data in a database table and inserts new data into the table, updates data in the table, or deletes data in the table, the pre-processing part, the iterative processing part, and the post-processing part A computer that automatically generates the entire program with processing parts based on the program skeleton and specifications,
Function as a specification input means having a function of inputting individual specifications which are different specifications for each data processing program to be created and a function of inputting common processing specifications which are different specifications for each group to which the data processing program to be created belongs,
The program skeleton includes a pre-processing portion, a repetitive processing portion following the pre-processing portion, and a post-processing portion following the repetitive processing portion as a fixed portion program regardless of the specification, and varies depending on the specification. The program fragment insertion position includes the program name insertion position, the cursor definition statement insertion position, the work variable definition statement string insertion position, and the initial process insertion position in the preceding processing portion, and the output processing in the iteration processing portion It includes a sentence string insertion position and is configured to include an end processing position in the subsequent processing part.
The individual specification includes the program name to be given to the generated program, the input table name including the name of the input table and the name and type information of each item of the input table, and the input table item defined in the select statement. Select item definition including name, output table name and output table item definition including name and type information of each item of the output table, processing condition indicating conditions for processing each output table, insertion, update , The processing type that indicates the type of deletion, update when the processing type is update and deletion, update that indicates the conditions for deleting, and the deletion condition, and the value of each item when the processing type is insertion and update An output table processing definition including a processing expression and a selection condition definition including a condition for acquiring data from the input table are configured.
The common processing specification includes program customization information including other information for customizing the program skeleton,
And the computer
Program skeleton customization information acquisition means for extracting the program name from the individual specification input by the specification input means, and for extracting the program customization information from the common processing specification input by the specification input means;
Cursor definition information acquisition means for extracting an input table item definition, a selection item definition, and a selection condition definition from the individual specification input by the specification input means;
Output item processing information acquisition means for extracting output table item definitions and output table processing definitions from the individual specifications input by the specification input means;
A cursor definition statement generation unit that generates a cursor definition statement from information acquired by the cursor definition information acquisition unit, and extracts and generates only the item name specified in the select item definition from the input table item definition A select item string is generated in a format according to the syntax of the language, and only the name of the input table used in the select item definition is extracted from the input table specified in the input table item definition. Generate a select table column in a format according to the syntax, process the select condition definition into a format according to the syntax of the programming language to be generated, generate a select condition statement, select item column insertion position, input table column insertion position And the insertion position of the cursor definition skeleton that depends on the programming language to be generated, The resulting selection item column, and the cursor definition statement generating means for generating a cursor definition statement by inserting the select table column and the select condition,
A work variable definition statement generation unit that generates a work variable definition statement from an output table item definition acquired by the output item processing information acquisition unit and that corresponds to an output table whose processing type is insertion. For an output table that is an insert, generate a type definition statement that defines the record type of the output table, generate a variable definition statement that defines a work area variable with the defined type, and insert the type definition statement insertion position and variable A work variable definition statement generating means for generating a work variable definition statement by inserting the generated type definition statement and variable definition statement at a corresponding insertion position of a work variable definition skeleton having a definition statement insertion position;
From the output table item definition and output table processing definition acquired by the output item processing information acquisition means, if the processing type is insertion, an output processing statement including a processing condition statement, an item calculation statement, and an insertion statement is generated and processed. If the type is update, an output process statement including a processing condition statement and an update statement is generated. If the type is deletion, an output process statement including a processing condition statement and a deletion statement is generated. A means to generate a processing condition statement from the processing conditions of the output table processing definition, determine whether the processing type of the output table processing definition is insertion, update, or deletion. If the processing type is insertion, output An item calculation statement is generated from the processing expression of each item in the table processing definition, an insertion statement including the output table name, item name list, and variable name list is generated from the output table item definition, the processing condition statement insertion position, the item calculation statement Output processing with insertion position and output statement insertion position Generate the output processing statement by inserting the generated processing condition statement at the skeleton processing condition statement insertion position, the generated item calculation statement at the item calculation statement insertion position, and the generated insertion statement at the output statement insertion position. If the processing type is update, an update statement including an output table name, an update statement list, and an update condition is generated from the processing expression of each item of the output table processing definition and the output table item definition, and the output processing statement skeleton When the generated processing condition statement is inserted at the processing condition statement insertion position and the generated update statement is inserted at the output statement insertion position, respectively, and an output processing statement is generated. A deletion statement including a name and a deletion condition is generated, and the generated processing condition statement is inserted at the processing condition statement insertion position of the output processing statement skeleton, and the generated deletion statement is inserted at the output statement insertion position. An output processing statement generating means for generating Driven,
Program skeleton selection means for selecting one program skeleton designated by a user from a program skeleton library stored in a storage device for storing a plurality of types of the program skeleton,
Of the data processing program, generated at the corresponding insertion position of the program skeleton selected by the program skeleton selection unit, the program name and program customization information acquired by the program skeleton customization information acquisition unit, and generated by the cursor definition statement generation unit The program is completed by inserting the cursor definition statement, the work variable definition statement generated by the work variable definition statement generating means, and the output processing statement generated by the output processing statement generating means, and the program is automatically synthesized. Program to function as a means.
データベースの表のデータを参照し、表中に新たなデータを挿入したり、表中のデータを更新したり、表中のデータを削除したりするプログラムにおいて、前段処理部分と繰り返し処理部分と後段処理部分を備えたプログラム全体を、プログラムスケルトンと仕様とに基づいて、自動的に生成するコンピュータを、
作成するデータ処理プログラム毎に異なる仕様である個別仕様を入力する機能と、作成するデータ処理プログラムが属するグループ毎に異なる仕様である共通処理仕様を入力する機能とを有する仕様入力手段として機能させ、
前記プログラムスケルトンは、仕様の如何に関わらず固定の部分のプログラムとして、前段処理部分と、前記前段処理部分に続く繰り返し処理部分と、前記繰り返し処理部分に続く後段処理部分を含み、仕様によって変化する部分のプログラム断片の挿入位置として、前段処理部分内にプログラム名挿入位置と、カーソル定義文挿入位置と、作業変数定義文列挿入位置と、初期処理挿入位置を含み、繰り返し処理部分内に出力処理文列挿入位置を含み、後段処理部分に終了処理位置を含んで構成され、
前記個別仕様は、生成したプログラムに付与するプログラム名と、入力表の名前とその入力表の各項目の名前および型の情報を含む入力表項目定義と、出力表の名前とその出力表の各項目の名前および型の情報を含む出力表項目定義と、各出力表の処理を行う条件を示す処理条件と、挿入、更新、削除の別を示す処理種別と、処理種別が更新と削除の場合に更新、削除するための条件を示す更新、削除条件と、処理種別が挿入と更新の場合に各項目の値を計算する処理式とを含む出力表処理定義と、入力表からデータを取得する際の条件を含むセレクト条件定義を含んで構成され、
前記共通処理仕様は、プログラムスケルトンをカスタマイズするためのその他の情報を含むプログラムカスタマイズ情報を含んで構成され、
且つ、前記コンピュータを、
前記仕様入力手段で入力された個別仕様から前記プログラム名を取り出し、前記仕様入力手段で入力された共通処理仕様から前記プログラムカスタマイズ情報を取り出すプログラムスケルトンカスタマイズ情報取得手段と、
前記仕様入力手段で入力された個別仕様から入力表項目定義とセレクト条件定義と出力表処理定義を取り出すカーソル定義情報取得手段と、
前記仕様入力手段で入力された個別仕様から出力表項目定義と出力表処理定義を取り出す出力項目処理情報取得手段と、
前記カーソル定義情報取得手段で取得された入力表項目定義とセレクト条件定義と出力表処理定義とからセレクト項目定義を作成し、該作成したセレクト項目定義と前記カーソル定義情報取得手段で取得されたセレクト条件定義とからカーソル定義文を生成するカーソル定義文生成手段であって、入力表項目定義と出力表処理定義から、セレクト文内に定義する入力表項目の名前を含むセレクト項目定義を生成し、入力表項目定義のうちセレクト項目定義内に指定された項目名だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト項目列を生成し、入力表項目定義内に指定された入力表のうち、セレクト項目定義で使用されている入力表の名前だけを抜き出し、生成するプログラミング言語の構文に従った形式でセレクト表列を生成し、セレクト条件定義を、生成するプログラミング言語の構文に従った形式に加工してセレクト条件文を生成し、セレクト項目列挿入位置、入力表列挿入位置およびセレクト条件挿入位置を持つ、生成するプログラミング言語に依存したカーソル定義スケルトンの該当挿入位置に、前記生成したセレクト項目列、セレクト表列およびセレクト条件を挿入してカーソル定義文を生成するカーソル定義文生成手段と、
前記出力項目処理情報取得手段で取得された出力表項目定義のうち、処理種別が挿入である出力表に対応するものから作業変数定義文を生成する作業変数定義文生成手段であって、処理種別が挿入である出力表について、その出力表のレコード型を定義する型定義文を生成し、その定義された型で作業領域変数を定義する変数定義文を生成し、型定義文挿入位置および変数定義文挿入位置を持つ作業変数定義スケルトンの該当挿入位置に、前記生成した型定義文および変数定義文を挿入して作業変数定義文を生成する作業変数定義文生成手段と、
前記出力項目処理情報取得手段で取得された出力表項目定義と出力表処理定義から、処理種別が挿入の場合は処理条件文と項目計算文と挿入文とを含む出力処理文を生成し、処理種別が更新の場合には処理条件文と更新文とを含む出力処理文を生成し、処理種別が削除の場合には処理条件文と削除文とを含む出力処理文を生成する出力処理文生成手段であって、出力表処理定義の処理条件から処理条件文を生成し、出力表処理定義の処理種別が挿入、更新、削除の何れであるかを判別し、処理種別が挿入の場合、出力表処理定義の各項目の処理式から項目計算文を生成し、出力表項目定義から出力表名、項目名リストおよび変数名リストを含む挿入文を生成し、処理条件文挿入位置、項目計算文挿入位置および出力文挿入位置を持つ出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、項目計算文挿入位置に前記生成した項目計算文を、出力文挿入位置に前記生成した挿入文をそれぞれ挿入して出力処理文を生成し、処理種別が更新の場合、出力表処理定義の各項目の処理式と出力表項目定義とから出力表名、更新文リストおよび更新条件を含む更新文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した更新文をそれぞれ挿入して出力処理文を生成し、処理種別が削除の場合、出力表項目定義から出力表名および削除条件を含む削除文を生成し、前記出力処理文スケルトンの処理条件文挿入位置に前記生成した処理条件文を、出力文挿入位置に前記生成した削除文をそれぞれ挿入して出力処理文を生成する出力処理文生成手段と、
前記プログラムスケルトンを、複数種類格納するための記憶装置に格納されたプログラムスケルトンライブラリから利用者の指定した1つのプログラムスケルトンを選択するプログラムスケルトン選択手段と、
前記データ処理プログラムのうち、前記プログラムスケルトン選択手段で選択されたプログラムスケルトンの該当挿入位置に、前記プログラムスケルトンカスタマイズ情報取得手段で取得したプログラム名とプログラムカスタマイズ情報と、前記カーソル定義文生成手段で生成したカーソル定義文と、前記作業変数定義文生成手段で生成した作業変数定義文と、前記出力処理文生成手段で生成した出力処理文とを挿入することによってプログラムを完成させ、出力するプログラム自動合成手段と
して機能させるためのプログラム。
In a program that references data in a database table and inserts new data into the table, updates data in the table, or deletes data in the table, the pre-processing part, the iterative processing part, and the post-processing part A computer that automatically generates the entire program with processing parts based on the program skeleton and specifications,
Function as a specification input means having a function of inputting individual specifications which are different specifications for each data processing program to be created and a function of inputting common processing specifications which are different specifications for each group to which the data processing program to be created belongs,
The program skeleton includes a pre-processing portion, a repetitive processing portion following the pre-processing portion, and a post-processing portion following the repetitive processing portion as a fixed portion program regardless of the specification, and varies depending on the specification. The program fragment insertion position includes the program name insertion position, the cursor definition statement insertion position, the work variable definition statement string insertion position, and the initial process insertion position in the preceding processing portion, and the output processing in the iteration processing portion It includes a sentence string insertion position and is configured to include an end processing position in the subsequent processing part.
The individual specifications are the program name to be given to the generated program, the input table name and the input table item definition including the name and type information of each item of the input table, the name of the output table and each of the output table Output table item definition that includes information on the item name and type, processing conditions that indicate the conditions for processing each output table, processing type that indicates whether to insert, update, or delete, and when the processing type is update or delete Get the data from the input table and the output table process definition that includes the update and delete conditions that indicate the conditions for updating and deleting, and the processing formula that calculates the value of each item when the process type is insert and update It includes a selection condition definition that includes conditions when
The common processing specification includes program customization information including other information for customizing the program skeleton,
And the computer
Program skeleton customization information acquisition means for extracting the program name from the individual specification input by the specification input means, and for extracting the program customization information from the common processing specification input by the specification input means;
Cursor definition information acquisition means for extracting an input table item definition, a selection condition definition, and an output table processing definition from the individual specifications input by the specification input means;
Output item processing information acquisition means for extracting output table item definitions and output table processing definitions from the individual specifications input by the specification input means;
A selection item definition is created from the input table item definition, the selection condition definition, and the output table processing definition acquired by the cursor definition information acquisition unit, and the selection item definition and the selection acquired by the cursor definition information acquisition unit are created. A cursor definition statement generating means for generating a cursor definition statement from a condition definition, generating a select item definition including the name of an input table item to be defined in a select statement from an input table item definition and an output table processing definition, Extracts only the item name specified in the select item definition from the input table item definition, generates a select item string in a format according to the syntax of the programming language to be generated, and creates the input table specified in the input table item definition. Of these, only the name of the input table used in the select item definition is extracted and selected in the format according to the syntax of the programming language to be generated. The table condition is generated, the select condition definition is processed into a format according to the syntax of the programming language to be generated, and the select condition statement is generated, and the select item string insertion position, the input table string insertion position and the select condition insertion position are set. A cursor definition statement generating means for generating a cursor definition statement by inserting the generated select item column, select table column and select condition at a corresponding insertion position of a cursor definition skeleton depending on a programming language to be generated;
A work variable definition statement generation unit that generates a work variable definition statement from an output table item definition acquired by the output item processing information acquisition unit and that corresponds to an output table whose processing type is insertion. For an output table that is an insert, generate a type definition statement that defines the record type of the output table, generate a variable definition statement that defines a work area variable with the defined type, and insert the type definition statement insertion position and variable A work variable definition statement generating means for generating a work variable definition statement by inserting the generated type definition statement and variable definition statement at a corresponding insertion position of a work variable definition skeleton having a definition statement insertion position;
From the output table item definition and output table processing definition acquired by the output item processing information acquisition means, if the processing type is insertion, an output processing statement including a processing condition statement, an item calculation statement, and an insertion statement is generated and processed. If the type is update, an output process statement including a processing condition statement and an update statement is generated. If the type is deletion, an output process statement including a processing condition statement and a deletion statement is generated. A means to generate a processing condition statement from the processing conditions of the output table processing definition, determine whether the processing type of the output table processing definition is insertion, update, or deletion. If the processing type is insertion, output An item calculation statement is generated from the processing expression of each item in the table processing definition, an insertion statement including the output table name, item name list, and variable name list is generated from the output table item definition, the processing condition statement insertion position, the item calculation statement Output processing with insertion position and output statement insertion position Generate the output processing statement by inserting the generated processing condition statement at the skeleton processing condition statement insertion position, the generated item calculation statement at the item calculation statement insertion position, and the generated insertion statement at the output statement insertion position. If the processing type is update, an update statement including an output table name, an update statement list, and an update condition is generated from the processing expression of each item of the output table processing definition and the output table item definition, and the output processing statement skeleton When the generated processing condition statement is inserted at the processing condition statement insertion position and the generated update statement is inserted at the output statement insertion position, respectively, and an output processing statement is generated. A deletion statement including a name and a deletion condition is generated, and the generated processing condition statement is inserted at the processing condition statement insertion position of the output processing statement skeleton, and the generated deletion statement is inserted at the output statement insertion position. An output processing statement generating means for generating Driven,
Program skeleton selection means for selecting one program skeleton designated by a user from a program skeleton library stored in a storage device for storing a plurality of types of the program skeleton,
Of the data processing program, generated at the corresponding insertion position of the program skeleton selected by the program skeleton selection unit, the program name and program customization information acquired by the program skeleton customization information acquisition unit, and generated by the cursor definition statement generation unit The program is completed by inserting the cursor definition statement, the work variable definition statement generated by the work variable definition statement generating means, and the output processing statement generated by the output processing statement generating means, and the program is automatically synthesized. Program to function as a means.
JP2010189092A 2010-08-26 2010-08-26 Data processing program automatic generation system Active JP5581894B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010189092A JP5581894B2 (en) 2010-08-26 2010-08-26 Data processing program automatic generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010189092A JP5581894B2 (en) 2010-08-26 2010-08-26 Data processing program automatic generation system

Publications (2)

Publication Number Publication Date
JP2012048438A JP2012048438A (en) 2012-03-08
JP5581894B2 true JP5581894B2 (en) 2014-09-03

Family

ID=45903243

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010189092A Active JP5581894B2 (en) 2010-08-26 2010-08-26 Data processing program automatic generation system

Country Status (1)

Country Link
JP (1) JP5581894B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1031586A (en) * 1996-07-15 1998-02-03 Nec Corp Program generation device
JP3871832B2 (en) * 1999-08-20 2007-01-24 日本電気株式会社 Data processing program automatic generation system and method, and computer-readable recording medium
JP4902069B2 (en) * 2000-09-06 2012-03-21 新日鉄ソリューションズ株式会社 Program generation support apparatus, program generation method, and program
JP2006276937A (en) * 2005-03-28 2006-10-12 Nec Corp Program development support device

Also Published As

Publication number Publication date
JP2012048438A (en) 2012-03-08

Similar Documents

Publication Publication Date Title
JP4544473B2 (en) Interface screen design-centric software production process automation method and computer-readable recording medium recording this method as a program
JP3871832B2 (en) Data processing program automatic generation system and method, and computer-readable recording medium
JP5350428B2 (en) Automatic program generation apparatus, method and computer program
US9811449B2 (en) Test scenario generation support device and test scenario generation support method
JP2008197814A (en) Translation verification method, device, and program for resource file
JP3828379B2 (en) Test specification generation support apparatus, method, program, and recording medium
JP6092686B2 (en) Operation workflow creation support method and operation workflow creation support system
JP5747698B2 (en) Requirements management support device
JP2006285707A (en) Business specification creation support system and method
JP4954674B2 (en) Software development support method, software development support device, software development support program, and computer system
JP2008225898A (en) Conversion device, conversion program, and conversion method
JPWO2009011057A1 (en) Application analysis program, application analysis method, and application analysis apparatus
JP5581894B2 (en) Data processing program automatic generation system
JP2006277282A (en) Model evaluation analysis system and model evaluation analysis program
JP5504212B2 (en) Test case automatic generation system, test case automatic generation method, and test case automatic generation program
JP4387324B2 (en) Property conversion device
JP2020115246A (en) Generation device, software robot system, generation method and generation program
KR100656559B1 (en) Program Automatic Generating Tools
JP2004213698A (en) System, method and computer readable storage medium for automatic generation of data processing program
US7882487B2 (en) Method of generating C code on the basis of UML specifications
JP2008009678A (en) Logic diagram display method, program, and device
WO2015030016A1 (en) System for processing unstructured data, method for processing unstructured data, and recording medium
JP2009080681A (en) Program structure parsing method and device
JP2016091081A (en) Document format import system and document format import method
JP2007323371A (en) Data mapping method and data mapping device

Legal Events

Date Code Title Description
RD07 Notification of extinguishment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7427

Effective date: 20120718

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130704

A131 Notification of reasons for refusal

Effective date: 20140128

Free format text: JAPANESE INTERMEDIATE CODE: A131

A977 Report on retrieval

Effective date: 20140129

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A521 Written amendment

Effective date: 20140324

Free format text: JAPANESE INTERMEDIATE CODE: A523

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140408

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140528

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Effective date: 20140617

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Effective date: 20140630

Free format text: JAPANESE INTERMEDIATE CODE: A61

R150 Certificate of patent (=grant) or registration of utility model

Ref document number: 5581894

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150