JP4797378B2 - Data processing program automatic generation system, data processing program automatic generation method, and data processing program automatic generation program - Google Patents

Data processing program automatic generation system, data processing program automatic generation method, and data processing program automatic generation program Download PDF

Info

Publication number
JP4797378B2
JP4797378B2 JP2004370689A JP2004370689A JP4797378B2 JP 4797378 B2 JP4797378 B2 JP 4797378B2 JP 2004370689 A JP2004370689 A JP 2004370689A JP 2004370689 A JP2004370689 A JP 2004370689A JP 4797378 B2 JP4797378 B2 JP 4797378B2
Authority
JP
Japan
Prior art keywords
data
statement
program
variable
data conversion
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.)
Expired - Fee Related
Application number
JP2004370689A
Other languages
Japanese (ja)
Other versions
JP2006178706A (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 JP2004370689A priority Critical patent/JP4797378B2/en
Publication of JP2006178706A publication Critical patent/JP2006178706A/en
Application granted granted Critical
Publication of JP4797378B2 publication Critical patent/JP4797378B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、データ処理プログラム自動生成システム、データ処理プログラム自動生成方法及びデータ処理プログラム自動生成用プログラムに関し、特に、データベースから変数へのデータ取得、及び変数からデータベースへのデータ更新を行うデータ処理プログラムを、データを加工するデータ変換処理を含めて自動生成するデータ処理プログラム自動生成システム、データ処理プログラム自動生成方法およびデータ処理プログラム自動生成用プログラムに関する。   The present invention relates to a data processing program automatic generation system, a data processing program automatic generation method, and a data processing program automatic generation program, and in particular, a data processing program for acquiring data from a database to a variable and updating data from a variable to a database. The present invention relates to a data processing program automatic generation system, a data processing program automatic generation method, and a data processing program automatic generation program.

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

特開2001−60150号公報([0017]〜[0045]、図1〜10)JP 2001-60150 A ([0017] to [0045], FIGS. 1 to 10)

上述した特許文献1に記載されているシステムが生成するデータ処理プログラムでは、データ処理にデータの型や形式を考慮しないので、以下のような問題点がある。   The data processing program generated by the system described in Patent Document 1 described above has the following problems because the data type and format are not considered in the data processing.

すなわち、データを取得して変数に格納するデータ取得処理や、データを変数の内容で更新するデータ更新処理において、データベースと変数とに型や形式の相違がある場合には、型や形式を合わせるためのデータ変換処理が必要となるということである。   In other words, in the data acquisition process that acquires data and stores it in a variable, or in the data update process that updates data with the contents of a variable, if there is a difference in type or format between the database and the variable, the type and format are matched. This means that a data conversion process is required.

例えば、日付を表現するデータでも、データベース上では日付型で格納するが、変数としては文字列で扱う必要がある場合がある。そのような場合には、データベースからデータを取得して変数に格納する際にはデータを日付型から文字列型へ変換するデータ変換処理が必要となり、変数の値でデータベースのデータを更新する際には文字列型から日付型への変換するデータ変換処理が必要となる。   For example, data representing a date may be stored in a date format on the database, but may need to be handled as a character string as a variable. In such a case, when data is acquired from the database and stored in a variable, data conversion processing is required to convert the data from the date type to the character string type. When updating the database data with the value of the variable Requires a data conversion process to convert from a character string type to a date type.

このようなデータ変換処理をユーザー自らに記述させると、記述ミス等で正確なデータ変換処理を記述できない可能性がある。   If such data conversion processing is described by the user himself / herself, there is a possibility that accurate data conversion processing cannot be described due to a description mistake or the like.

本発明の目的は、データベースからデータを取得して変数に格納するデータ取得処理や、変数の値でデータベースのデータを更新するデータ更新処理を行うデータ処理プログラムを、データの型や形式を整合させるデータ変換処理を含めて自動生成するデータ処理プログラム自動生成システム、データ処理プログラム自動生成方法及びデータ処理プログラム自動生成用プログラムを提供することにある。   An object of the present invention is to make a data processing program that performs data acquisition processing for acquiring data from a database and storing the data in a variable, or data updating processing for updating data in the database with the value of the variable, matching the data type and format. An object is to provide a data processing program automatic generation system, a data processing program automatic generation method, and a data processing program automatic generation program that are automatically generated including data conversion processing.

本発明のデータ処理プログラム自動生成システムは、
仕様記憶部に記憶されているデータ取得プログラムの仕様を入力する仕様入力手段と、
前記仕様に応じたデータ変換処理文を生成するデータ変換処理文生成規則を保持するデータ変換処理文生成規則記憶部と、
前記仕様に応じた前記データ変換処理文生成規則を基にデータ変換処理文を生成するデータ変換処理文生成手段と、
前記データ変換処理文生成手段が生成した前記データ変換処理文を基にカーソルを定義するカーソル定義文を生成するカーソル定義文生成手段と、
データベースからデータを取得するデータ取得文を生成するデータ取得文生成手段と、
プログラムの雛形の内容があらかじめ格納されているプログラムスケルトン記憶部と、
前記プログラムスケルトン記憶部の内容に、前記カーソル定義文生成手段から受け取る前記カーソル定義文、及び前記データ取得文生成手段から受け取る前記データ取得文を挿入し、データ取得プログラムを生成して生成プログラム記憶部に保持するプログラム合成手段と
を備える。
The data processing program automatic generation system of the present invention includes:
Specification input means for inputting the specifications of the data acquisition program stored in the specification storage unit;
A data conversion processing statement generation rule storage unit that holds data conversion processing statement generation rules for generating data conversion processing statements according to the specifications;
Data conversion processing statement generation means for generating a data conversion processing statement based on the data conversion processing statement generation rules according to the specifications;
A cursor definition statement generating means for generating a cursor definition statement for defining a cursor based on the data conversion process statement generated by the data conversion process statement generating means;
A data acquisition statement generation means for generating a data acquisition statement for acquiring data from the database;
A program skeleton storage unit in which the contents of the program template are stored in advance;
Inserting the cursor definition statement received from the cursor definition statement generation unit and the data acquisition statement received from the data acquisition statement generation unit into the contents of the program skeleton storage unit to generate a data acquisition program and generating program storage unit And a program synthesizing means.

また、本発明のデータ処理プログラム自動生成方法は、データ取得プログラムの仕様に応じたデータ変換処理文を生成し、
前記仕様に応じた前記データ変換処理文生成規則を基にデータ変換処理文を生成し、
前記データ変換処理文を基にカーソルを定義するカーソル定義文を生成し、
データベースからデータを取得するデータ取得文を生成し、
プログラムの雛形の内容があらかじめ格納されているプログラムスケルトンの内容に、前記カーソル定義文、及び前記データ取得文を挿入し、前記データ取得プログラムを生成することを特徴とする。
In addition, the data processing program automatic generation method of the present invention generates a data conversion processing statement according to the specification of the data acquisition program,
Generate a data conversion processing statement based on the data conversion processing statement generation rules according to the specifications,
Generate a cursor definition statement that defines a cursor based on the data conversion processing statement,
Generate a data acquisition statement that acquires data from the database,
The data acquisition program is generated by inserting the cursor definition statement and the data acquisition statement into the contents of a program skeleton in which the contents of a program template are stored in advance.

さらに、本発明のデータ処理プログラム自動生成用プログラムは、コンピュータに、
データ取得プログラムの仕様に応じたデータ変換処理文を生成し、
前記仕様に応じた前記データ変換処理文生成規則を基にデータ変換処理文を生成し、
前記データ変換処理文を基にカーソルを定義するカーソル定義文を生成し、
前記カーソルを利用してデータベースからデータを取得するデータ取得文を生成し、
プログラムの雛形の内容があらかじめ格納されているプログラムスケルトンの内容に、前記カーソル定義文、及び前記データ取得文を挿入し、前記データ取得プログラムを生成することを実現させる。
Furthermore, the data processing program automatic generation program of the present invention is stored in a computer.
Generate a data conversion processing statement according to the specifications of the data acquisition program,
Generate a data conversion processing statement based on the data conversion processing statement generation rules according to the specifications,
Generate a cursor definition statement that defines a cursor based on the data conversion processing statement,
Generate a data acquisition statement that acquires data from the database using the cursor,
The cursor definition statement and the data acquisition statement are inserted into the contents of the program skeleton in which the contents of the program template are stored in advance, thereby generating the data acquisition program.

さらに、本発明のデータ処理プログラム自動生成システムは、仕様記憶部に記憶されているデータ取得プログラムの仕様を入力する仕様入力手段と、
前記仕様に応じたデータ変換処理文を生成するデータ変換処理文生成規則を保持するデータ変換処理文生成規則記憶部と、
前記仕様に応じた前記データ変換処理文生成規則を基にデータ変換処理文を生成するデータ変換処理文生成手段と、
前記データ変換処理文生成手段が生成した前記データ変換処理文を基にデータを出力するための出力処理文を生成する出力処理文生成手段と、
プログラムの雛形の内容があらかじめ格納されているプログラムスケルトン記憶部と、
前記プログラムスケルトン記憶部の内容に、前記出力処理文生成手段から受け取る前記出力処理文を挿入し、データ取得プログラムを生成して生成プログラム記憶部に保持するプログラム合成手段と
を備える。
Furthermore, the data processing program automatic generation system of the present invention includes specification input means for inputting the specifications of the data acquisition program stored in the specification storage unit,
A data conversion processing statement generation rule storage unit that holds data conversion processing statement generation rules for generating data conversion processing statements according to the specifications;
Data conversion processing statement generation means for generating a data conversion processing statement based on the data conversion processing statement generation rules according to the specifications;
Output processing statement generating means for generating an output processing statement for outputting data based on the data conversion processing statement generated by the data conversion processing statement generating means;
A program skeleton storage unit in which the contents of the program template are stored in advance;
Program synthesizing means for inserting the output processing statement received from the output processing statement generating means into the contents of the program skeleton storage unit, generating a data acquisition program, and holding it in the generated program storage unit;

さらに、本発明のデータ処理プログラム自動生成方法は、データ取得プログラムの仕様に応じたデータ変換処理文を生成し、
前記仕様に応じた前記データ変換処理文生成規則を基にデータ変換処理文を生成し、
前記データ変換処理文を基にデータを出力するための出力処理文を生成し、
プログラムの雛形の内容があらかじめ格納されているプログラムスケルトンの内容に、前記出力処理文を挿入し、データ取得プログラムを生成することを特徴とする。
Furthermore, the data processing program automatic generation method of the present invention generates a data conversion processing statement according to the specification of the data acquisition program,
Generate a data conversion processing statement based on the data conversion processing statement generation rules according to the specifications,
Generate an output processing statement for outputting data based on the data conversion processing statement,
The data processing program is generated by inserting the output processing statement into the contents of a program skeleton in which the contents of a program template are stored in advance.

さらに、本発明のデータ処理プログラム自動生成用プログラムは、コンピュータに、
データ取得プログラムの仕様に応じたデータ変換処理文を生成し、
前記仕様に応じた前記データ変換処理文生成規則を基にデータ変換処理文を生成し、
前記データ変換処理文を基にデータを出力するための出力処理文を生成し、
プログラムの雛形の内容があらかじめ格納されているプログラムスケルトンの内容に、前記出力処理文を挿入し、データ取得プログラムを生成することを実現させる。
Furthermore, the data processing program automatic generation program of the present invention is stored in a computer.
Generate a data conversion processing statement according to the specifications of the data acquisition program,
Generate a data conversion processing statement based on the data conversion processing statement generation rules according to the specifications,
Generate an output processing statement for outputting data based on the data conversion processing statement,
The output processing statement is inserted into the contents of the program skeleton in which the contents of the program template are stored in advance, and the data acquisition program is generated.

本発明は、データベースからデータを取得するデータ処理プログラムを多数開発することが要求されるプロジェクトにおいて、プログラムの品質を安定させることができる、という効果を有している。その理由は、データ変換のためのデータ変換処理文を自動生成することで、規約に従った統一的なデータ変換処理文を実装できるからである。   The present invention has an effect that the quality of a program can be stabilized in a project that requires development of a large number of data processing programs for acquiring data from a database. The reason is that by automatically generating a data conversion processing statement for data conversion, it is possible to implement a uniform data conversion processing statement according to the convention.

また、本発明は、データ変換のためのデータ変換処理文を実装するための規約が、プロジェクト進行中に変更になっても問題が発生しない、という効果を有している。その理由は、データ変換処理文を自動生成するための規約を、データ変換処理文生成規則という容易な形式で保持しているため、変更が容易であり、かつ生成プログラムを変更後の規約に従わせることができるからである。   In addition, the present invention has an effect that a problem does not occur even if a rule for implementing a data conversion processing statement for data conversion is changed during a project. The reason for this is that the rules for automatically generating data conversion processing statements are held in an easy format called data conversion processing statement generation rules, so it is easy to change and the generated program conforms to the changed rules. It is because it can be made.

さらに、本発明は、データ取得の際のデータ変換処理文を実装する工数を削減できる、という効果を有している。その理由は、データ取得の際のデータ変換処理文が自動生成されるため、本システムの利用者はデータ変換処理文を記述する必要が無いからである。プロジェクトの規約に沿ってデータ変換処理文生成規則を定義する必要はあるが、これは容易なものであるため、適用のための負荷は少ないと考えられるからである。   Furthermore, the present invention has the effect of reducing the man-hours for mounting the data conversion processing statement at the time of data acquisition. The reason is that the data conversion processing statement at the time of data acquisition is automatically generated, so that the user of this system does not need to write the data conversion processing statement. This is because it is necessary to define a data conversion processing statement generation rule in accordance with the project rules, but this is easy and the load for application is considered to be small.

次に、本発明の実施の形態について図面を参照して詳細に説明する。   Next, embodiments of the present invention will be described in detail with reference to the drawings.

本発明の第1の実施の形態の構成を示す図1を参照すると、この実施の形態のデータ処理プログラム自動生成システム2は、仕様記憶部1に記憶されている仕様を入力情報として、仕様入力手段21と、データ変換処理文生成規則記憶部22と、データ変換処理文生成手段23と、カーソル定義文生成手段24と、データ取得文生成手段25と、プログラムスケルトン記憶部26と、プログラム合成手段27とから構成され、生成プログラムを作成して生成プログラム記憶部3に出力する。   Referring to FIG. 1 showing the configuration of the first embodiment of the present invention, the data processing program automatic generation system 2 of this embodiment uses a specification stored in the specification storage unit 1 as input information, and inputs a specification. Means 21, data conversion processing statement generation rule storage unit 22, data conversion processing statement generation unit 23, cursor definition statement generation unit 24, data acquisition statement generation unit 25, program skeleton storage unit 26, and program synthesis unit 27, and generates a generation program and outputs it to the generation program storage unit 3.

仕様記憶部1は、本システムで生成すべき仕様として、例えば図2のように、データ取得元表仕様と、データ取得先変数仕様と、セレクト条件仕様とを保持する。   The specification storage unit 1 holds data acquisition source table specifications, data acquisition destination variable specifications, and selection condition specifications as specifications to be generated in the present system, for example, as shown in FIG.

データ取得元表仕様は、データを取得する元表の名称である表名と、表が含む項目名称である項目名と、それら項目の型情報とを含む。   The data acquisition source table specification includes a table name that is a name of a base table from which data is acquired, item names that are item names included in the table, and type information of these items.

データ取得先変数仕様は、データ取得先変数の名称である変数名と、その変数の型と、その変数に対応するデータ取得元である対応項目名の情報を含む。   The data acquisition destination variable specification includes information on a variable name that is a name of the data acquisition destination variable, a type of the variable, and a corresponding item name that is a data acquisition source corresponding to the variable.

例えば、図2において、0211の行を参照すると、表名が商品マスタ、項目名が商品コードであるような項目の型が、′char(9)′型であることを示している。また、0221の行を参照すると、変数名が選択商品区分である変数が、′char(3)′型であり、かつ対応項目名が商品マスタ.商品コードであることを示している。   For example, referring to the row 0221 in FIG. 2, the type of the item whose table name is the product master and whose item name is the product code is the 'char (9)' type. Also, referring to the row 0221, the variable whose variable name is the selected product category is the 'char (3)' type, and the corresponding item name is the product master. Indicates a product code.

仕様入力手段21は、このような仕様記憶部1に記憶されている仕様を入力し、データ変換処理文生成手段23及びデータ取得文生成手段25へ受け渡す。   The specification input unit 21 inputs the specification stored in the specification storage unit 1 and passes it to the data conversion processing statement generation unit 23 and the data acquisition statement generation unit 25.

データ変換処理文生成規則記憶部22は、本システムで自動的に生成するデータ変換処理仕様として、例えば図3のような、データ変換処理文生成規則をあらかじめ保持する。   The data conversion processing statement generation rule storage unit 22 holds in advance a data conversion processing statement generation rule as shown in FIG. 3, for example, as a data conversion processing specification automatically generated by this system.

データ変換処理文生成規則は、データ変換処理文生成規則を適用すべき変数の名称を示す変数名、その型を示す変数型、データ変換処理文生成規則を適用すべき対応項目名、その型を示す対応項目型、及び生成すべきデータ変換処理から構成される。   The data conversion processing statement generation rule includes a variable name indicating the name of a variable to which the data conversion processing statement generation rule is applied, a variable type indicating the type, a corresponding item name to which the data conversion processing statement generation rule is applied, and its type. It consists of the corresponding item type shown and the data conversion process to be generated.

ここで、変数名及び対応項目名の中に、′${<数値>}′(<数値>の部分は任意の数字)という記述を含む場合があるが、このような場合、′${<数値>}′の部分にはどのような文字列が入っても良いという意味となる。ただし、同じ数値のものが複数存在する場合には、同じ文字列を意味するものとする。   Here, the variable name and the corresponding item name may contain the description '$ {<numeric value}}' (where <numeric value> is an arbitrary number). In such a case, ′ $ {< This means that any character string can be entered in the numerical value>} ′ part. However, when there are a plurality of items having the same numerical value, it means the same character string.

例えば、図3において、031の行を参照すると、変数名が′${1}商品区分′で、対応項目名が′${2}商品コード′であるような場合に、′SUBSTRB(${2}商品コード,1,3)′というデータ変換処理文を生成するというデータ変換処理文生成規則を意味する。また、032の行を参照すると、変数型が′char(8)′で、対応項目名が′${1}′で、対応項目型が′date′であるような場合に、′TO_CHAR(${1},′YYYYMMDD′)′というデータ変換処理文を生成するというデータ変換処理文生成規則を意味する。   For example, referring to the row 031 in FIG. 3, when the variable name is' $ {1} product category 'and the corresponding item name is' $ {2} product code', 'SUBSTRB ($ { 2} means a data conversion processing statement generation rule that generates a data conversion processing statement of product code, 1,3) ′. Also, referring to the line 032, when the variable type is' char (8) ', the corresponding item name is' $ {1}', and the corresponding item type is' date ',' TO_CHAR ($ It means a data conversion processing statement generation rule for generating a data conversion processing statement {1}, ′ YYYYMMDD ′) ′.

データ変換処理文生成手段23は、仕様入力手段21から仕様を受け取り、データ変換処理文生成規則記憶部22に格納された情報を基にデータ変換処理文を生成し、仕様に追加し、カーソル定義文生成手段24へ受け渡す。   The data conversion processing statement generation unit 23 receives the specification from the specification input unit 21, generates a data conversion processing statement based on the information stored in the data conversion processing statement generation rule storage unit 22, adds it to the specification, and defines the cursor definition. Delivered to the sentence generator 24.

カーソル定義文生成手段24は、データ変換処理文生成手段23からデータ変換処理を含んだ仕様を受け取り、カーソル定義文を生成し、プログラム合成手段27へ受け渡す。   The cursor definition statement generation unit 24 receives the specification including the data conversion process from the data conversion process statement generation unit 23, generates a cursor definition statement, and passes it to the program synthesis unit 27.

データ取得文生成手段25は、仕様入力手段21から仕様を受け取り、データ取得文を生成し、プログラム合成手段27へ受け渡す。   The data acquisition statement generation unit 25 receives the specification from the specification input unit 21, generates a data acquisition statement, and transfers it to the program synthesis unit 27.

プログラムスケルトン記憶部26は、仕様によらず出力するプログラムの雛形であり、図11のような内容があらかじめ格納されている。本実施の形態では、データベースからカーソルを使用してデータを取得し、そのデータを既存の変数へと格納するようなデータ処理プログラムを生成対象としているが、そのようなプログラムにおいては、カーソルを定義するカーソル定義文、及びカーソルを用いてデータを取得するデータ取得文以外の部分については、常に共通の内容を使用することができる。このプログラムスケルトン記憶部26では、その共通の部分を保持し、カーソル定義文及びデータ取得文については、埋め込む場所を示すのみとなっている(例えば、図11の′<<カーソル定義文挿入箇所>>′、及び′<<データ取得文挿入箇所>>′)。   The program skeleton storage unit 26 is a template of a program to be output regardless of the specifications, and contents as shown in FIG. 11 are stored in advance. In this embodiment, a data processing program that acquires data using a cursor from a database and stores the data in an existing variable is a generation target. In such a program, a cursor is defined. Common contents can always be used for portions other than the cursor definition statement and the data acquisition statement that acquires data using the cursor. The program skeleton storage unit 26 holds the common part, and the cursor definition sentence and the data acquisition sentence only indicate where to embed (for example, “<< cursor definition sentence insertion location in FIG. 11> > 'And' << data acquisition sentence insertion location >> ').

プログラム合成手段27は、プログラムスケルトン記憶部26の内容に、カーソル定義文生成手段24から受け取るカーソル定義文、及びデータ取得文生成手段25から受け取るデータ取得文を挿入し、本システムの出力である生成プログラムを生成して生成プログラム記憶部3に保持する。   The program synthesis means 27 inserts the cursor definition sentence received from the cursor definition sentence generation means 24 and the data acquisition sentence received from the data acquisition sentence generation means 25 into the contents of the program skeleton storage unit 26, and the generation that is the output of this system A program is generated and stored in the generated program storage unit 3.

次に、図5のフローチャートを参照して、この第1の実施の形態の動作について詳細に説明する。この実施の形態においては、図2に示す形式で表現された仕様を入力し、PL/SQL言語で記述されたデータベースからデータを取得するデータ処理プログラム図12を出力する。   Next, the operation of the first embodiment will be described in detail with reference to the flowchart of FIG. In this embodiment, a specification expressed in the format shown in FIG. 2 is input, and a data processing program FIG. 12 for obtaining data from a database described in the PL / SQL language is output.

まず、仕様入力手段21により仕様入力を行う(図5のステップ051)。このステップでは、仕様記憶部1に格納されている図2に示す仕様をシステム内部に読み込み、データ変換処理文生成手段23及びデータ取得文生成手段25へと受け渡す。   First, specification input is performed by the specification input means 21 (step 051 in FIG. 5). In this step, the specification shown in FIG. 2 stored in the specification storage unit 1 is read into the system and transferred to the data conversion processing statement generation unit 23 and the data acquisition statement generation unit 25.

次に、データ変換処理文生成手段23により、データ変換処理生成を行う(図5のステップ052)。このステップの詳細を、図6のフローチャートを参照して説明する。   Next, the data conversion processing statement generation means 23 generates data conversion processing (step 052 in FIG. 5). Details of this step will be described with reference to the flowchart of FIG.

まず、仕様入力を行う(図6のステップ061)。このステップでは、仕様入力手段21から、図2に示す仕様を受け取る。   First, specification input is performed (step 061 in FIG. 6). In this step, the specification shown in FIG.

次に、仕様に含まれる変数の定義すべて、すなわち図2における0221の行、0222の行、0223の行それぞれに対し、図6のステップ062からステップ067の処理を行う。   Next, the processing from step 062 to step 067 in FIG. 6 is performed for all the definitions of variables included in the specification, that is, the 0221 row, the 0222 row, and the 0223 row in FIG.

最初に、図2における0221の行の変数定義についての処理を行う。まず、データ変換処理文生成規則の選択を行う(図6のステップ063)。このステップでは、図3に示すデータ変換処理文生成規則と、現在扱っている変数定義である図2における0221の行における変数名、変数型、対応項目名、対応項目型が一致するものを、適用すべきデータ変換処理文生成規則として選択する。この場合、図3における031の行で定義されるデータ変換処理文生成規則が選択される。この理由は、031の行における変数名′${1}商品区分′は、′${1}′を′選択′とみなすことにより、図2の0221の行における変数名である′選択商品区分′と一致し、かつ031の行における対応項目名′${2}商品コード′は、′${2}′を′商品マスタ.′とみなすことにより、図2の0221の行における対応項目名である′商品マスタ.商品コード′と一致するからである。   First, the variable definition on the line 0221 in FIG. 2 is processed. First, a data conversion process statement generation rule is selected (step 063 in FIG. 6). In this step, the data conversion processing statement generation rule shown in FIG. 3 and the variable name, variable type, corresponding item name, and corresponding item type in the line 0221 in FIG. Select a data conversion processing statement generation rule to be applied. In this case, the data conversion processing statement generation rule defined by the line 031 in FIG. 3 is selected. This is because the variable name '$ {1} product category' in the row 031 is the variable name in the row 0221 in Fig. 2 by considering '$ {1}' as 'selection'. 'And the corresponding item name' $ {2} product code 'in the row 031 corresponds to the corresponding item name in the row 0221 in Fig. 2 by regarding' $ {2} 'as' product master.' 'Product master. This is because it matches the product code '.

次に、データ変換処理が選択されたかどうかで処理の分岐を行う(図6のステップ064)。この場合、ステップ063において、図3における031の行で定義されるデータ変換処理文生成規則が選択されているため、選択されたと判定し、ステップ065へ進む。   Next, the process is branched depending on whether the data conversion process is selected (step 064 in FIG. 6). In this case, since the data conversion process statement generation rule defined in the line 031 in FIG. 3 is selected in step 063, it is determined that it has been selected, and the process proceeds to step 065.

次に、データ変換処理生成を行う(図6のステップ065)。このステップでは、ステップ063において選択された、図3における031の行で定義されるデータ変換処理文生成規則で指定されたデータ変換処理文を生成する。031の行で定義されるデータ変換処理は′SUBSTRB(${2}商品コード,1,3)′となっているが、ステップ063において′${2}′は′商品マスタ.′とみなしているため、′SUBSTRB(商品マスタ.商品コード,1,3)′という文字列となる。これをデータ取得先変数仕様へと書き込む(図4の0421の行におけるデータ変換処理欄)。以上が、図2における0221の行の変数定義についての処理である。   Next, data conversion process generation is performed (step 065 in FIG. 6). In this step, the data conversion processing statement specified in the data conversion processing statement generation rule defined in the line 031 in FIG. 3 selected in step 063 is generated. The data conversion process defined in line 031 is 'SUBSTRB ($ {2} product code, 1,3)', but in step 063, '$ {2}' is regarded as 'product master.' Therefore, the character string is 'SUBSTRB (product master. Product code, 1, 3)'. This is written into the data acquisition destination variable specification (data conversion processing column in the row 0421 in FIG. 4). The above is the processing for the variable definition in the row 0221 in FIG.

次に、図2における0222の行の変数定義についての処理を行う。まず、データ変換処理文生成規則の選択を行う(図6のステップ063)。この場合、データ変換処理文生成規則が選択されない。この理由は、図3に示される変数名や型名が一致する行が存在しないためである。   Next, a process for variable definition in the row 0222 in FIG. 2 is performed. First, a data conversion process statement generation rule is selected (step 063 in FIG. 6). In this case, the data conversion processing statement generation rule is not selected. This is because there is no line having the same variable name or type name as shown in FIG.

次に、データ変換処理が選択されたかどうかで処理の分岐を行う(図6のステップ064)。この場合、ステップ063においてデータ変換処理文生成規則が選択されなかったため、選択されなかったと判断し、ステップ066へ進む。   Next, the process is branched depending on whether the data conversion process is selected (step 064 in FIG. 6). In this case, since the data conversion process statement generation rule is not selected in step 063, it is determined that it has not been selected, and the process proceeds to step 066.

次に、対応項目名のデータ変換処理への転記を行う(図6のステップ066)。このステップでは、もとの仕様に存在した対応項目名の内容を、そのままの内容でデータ変換処理として書き込む。図4における0422の行の変数定義において、対応項目名は′商品マスタ.商品名′であるため、データ変換処理′商品マスタ.商品名′として書き込む(図4の0422の行におけるデータ変換処理欄)。   Next, the corresponding item name is transferred to the data conversion process (step 066 in FIG. 6). In this step, the content of the corresponding item name existing in the original specification is written as the data conversion processing as it is. In the variable definition in the row 0422 in FIG. 4, the corresponding item name is “product master. Since the product name is 'data conversion processing' product master. “Product name” is written (data conversion processing column in the row 0422 in FIG. 4).

以上が、図2における0222の行の変数定義についての処理である。   The above is the processing for the variable definition in the row 0222 in FIG.

次に、図2における0223の行の変数定義についての処理を行う。まず、データ変換処理文生成規則の選択を行う(図6のステップ063)。   Next, a process for defining variables in the line 0223 in FIG. 2 is performed. First, a data conversion process statement generation rule is selected (step 063 in FIG. 6).

この場合、図3における032の行で定義されるデータ変換処理文生成規則が選択される。この理由は、032の行における変数型′char(8)′は、0223の行における型である′char(8)′と一致し、かつ032の行における対応項目型′date′は、0223の行において対応項目として指定されている′商品マスタ.商品更新日′、すなわち0213の行で示される項目の型である′date′と一致し、さらに032の行における対応項目名′${1}′は、′${1}′を′商品マスタ.商品更新日′とみなすことにより、0223の行における対応項目名である′商品マスタ.商品更新日′と一致するからである。   In this case, the data conversion process statement generation rule defined by the line 032 in FIG. 3 is selected. This is because the variable type 'char (8)' in line 032 matches the type 'char (8)' in line 0223, and the corresponding item type 'date' in line 032 is 0223. 'Product master specified as a corresponding item in the row. Product update date ', that is,' date 'which is the type of the item shown in the row 0213, and the corresponding item name' $ {1} 'in the row 032 is' product name master' . By considering “product update date”, the corresponding item name in the line 0223 is “product master. This is because it matches the product update date ′.

次に、データ変換処理が選択されたかどうかで処理の分岐を行う(図6のステップ064)。この場合、ステップ063において、図3における032の行で定義されるデータ変換処理文生成規則が選択されているため、選択されたと判定し、ステップ065へ進む。   Next, the process is branched depending on whether the data conversion process is selected (step 064 in FIG. 6). In this case, since the data conversion process statement generation rule defined in the line 032 in FIG. 3 is selected in Step 063, it is determined that it has been selected, and the process proceeds to Step 065.

次に、データ変換処理生成を行う(図6のステップ065)。このステップでは、ステップ063において選択された、図3における032の行で定義されるデータ変換処理文生成規則で指定されたデータ変換処理文を生成する。032の行で定義されるデータ変換処理は′TO_CHAR(${1},′YYYYMMDD′)′となっているが、ステップ063において′${1}′は′商品マスタ.商品更新日′とみなしているため、′TO_CHAR(商品マスタ.商品更新日,′YYYYMMDD′)′という文字列となる。これをデータ取得先変数仕様に書き込む(図4の0423の行におけるデータ変換処理欄)。
以上が、図2における0223の行の変数定義についての処理である。
Next, data conversion process generation is performed (step 065 in FIG. 6). In this step, the data conversion process statement specified in the data conversion process statement generation rule defined in the line 032 in FIG. 3 selected in step 063 is generated. The data conversion process defined in line 032 is' TO_CHAR ($ {1}, 'YYYYMMDD') '. In step 063,' $ {1} 'is' product master. Since it is regarded as a product update date ', the character string is' TO_CHAR (product master. Product update date,' YYYYMMDD ')'. This is written in the data acquisition destination variable specification (data conversion processing column in the row 0423 in FIG. 4).
The above is the processing for the variable definition in the row 0223 in FIG.

ここまでで、データ取得先変数仕様の含む変数の定義すべてに対して図6のステップ062からステップ067の処理を行うという繰り返しの処理が終了した。   Up to this point, the repetitive processing of performing the processing from step 062 to step 067 in FIG. 6 for all the definitions of the variables included in the data acquisition destination variable specification is completed.

最後に、仕様出力を行う(図6のステップ068)。このステップでは、前述の過程によりデータ変換処理文が生成されたデータ取得先変数仕様である図4の内容を、カーソル定義文生成手段24に対して出力する。   Finally, specification output is performed (step 068 in FIG. 6). In this step, the content of FIG. 4 which is the data acquisition destination variable specification in which the data conversion processing statement is generated by the above-described process is output to the cursor definition statement generating means 24.

データ変換処理生成の詳細は以上である。   The details of the data conversion process generation are as described above.

次に、カーソル定義文生成手段24により、カーソル定義文生成を行う(図5のステップ053)。このステップでは、図9の内容のカーソル定義文を出力するが、その詳細を、図7のフローチャートを参照して説明する。   Next, the cursor definition statement generation means 24 generates a cursor definition statement (step 053 in FIG. 5). In this step, the cursor definition sentence having the contents shown in FIG. 9 is output. The details will be described with reference to the flowchart of FIG.

まず、仕様入力を行う(図7のステップ0701)。このステップでは、データ変換処理文生成手段23から図4で示されるデータ取得先変数仕様を受け取る。   First, specification input is performed (step 0701 in FIG. 7). In this step, the data acquisition destination variable specification shown in FIG.

次に、図7のステップ0702に示すように、′CURSOR cur IS SELECT′という文字列を出力する。これは、図9の0901で示される行に相当する。   Next, as shown in Step 0702 of FIG. 7, a character string “CURSOR cur IS SELECT” is output. This corresponds to the row indicated by 0901 in FIG.

次に、データ取得先変数仕様の含む変数の定義すべて、すなわち図4の0421、0422、0423のそれぞれの行で定義されている変数について、図7のステップ0703から0705の間のステップを繰り返す。   Next, the steps between steps 0703 to 0705 in FIG. 7 are repeated for all the definitions of the variables included in the data acquisition destination variable specification, that is, the variables defined in the respective lines 0421, 0422, and 0423 in FIG.

まず、図4の0421について、SELECT句要素出力を行う(図7のステップ0704)。このステップでは、′<データ変換処理>WORK_<変数名>′という内容を出力する。ただし、繰り返しの最後でないかぎり、末尾にコンマ記号(′,′)を付加する。そして、′<データ変換処理>′の部分にはデータ取得先変数仕様で示されたデータ変換処理が、<変数名>の部分にはデータ取得先変数仕様で示された変数名が挿入される。図4の0421の行の場合、データ変換処理は′SUBSTRB(商品マスタ.商品コード,1,3)′であり、変数名は′選択商品区分′であるので、結果として図9の0902で示される行が出力される。   First, a SELECT phrase element is output for 0421 in FIG. 4 (step 0704 in FIG. 7). In this step, the content '<data conversion process> WORK_ <variable name>' is output. However, unless it is the end of the repetition, a comma symbol (',') is added at the end. Then, the data conversion process indicated by the data acquisition destination variable specification is inserted in the “<data conversion process>” portion, and the variable name indicated in the data acquisition destination variable specification is inserted in the <variable name> portion. . In the case of the row 0421 in FIG. 4, the data conversion process is “SUBSTRB (product master. Product code, 1, 3)” and the variable name is “selected product category”. Will be output.

次に、図4の0422について、SELECT句要素出力を行う(図7のステップ0704)。図4の0422の場合、データ変換処理は′商品名′であり、変数名は′V選択商品名′であるので、結果として図9の0903で示される行が出力される。   Next, a SELECT phrase element is output for 0422 in FIG. 4 (step 0704 in FIG. 7). In the case of 0422 in FIG. 4, the data conversion process is “product name” and the variable name is “V selected product name”. As a result, a line indicated by 0903 in FIG. 9 is output.

次に、図4の0423について、SELECT句要素出力を行う(図7のステップ0704)。図4の0423の場合、データ変換処理は′TO_CHAR(商品更新日,′YYYYMMDD′)′であり、変数名は′V選択商品更新日′であるる。また、繰り返しの最後であるため、末尾にコンマ記号(′,′)は付加されない。これらの結果として、図9の0904で示される行が出力される。   Next, a SELECT phrase element is output for 0423 in FIG. 4 (step 0704 in FIG. 7). In the case of 0423 in FIG. 4, the data conversion process is 'TO_CHAR (product update date,' YYYYMMDD ')', and the variable name is 'V selected product update date'. Moreover, since it is the last of repetition, a comma symbol (',') is not added at the end. As a result of these, the row indicated by 0904 in FIG. 9 is output.

図7のステップ0703から0705までの繰り返しは以上である。   The repetition from step 0703 to 0705 in FIG.

次に、図7のステップ0706に示すように、′FROM′という文字列を出力する。これは、図9の0905で示される行に相当する。   Next, as shown in step 0706 of FIG. 7, a character string “FROM” is output. This corresponds to the row indicated by 0905 in FIG.

次に、表名を出力する(図7のステップ0707)。このステップでは、図4に示す表名である′商品マスタ′を出力する。これは、図9の0906で示される行に相当する。   Next, the table name is output (step 0707 in FIG. 7). In this step, the “product master” which is the table name shown in FIG. 4 is output. This corresponds to the row indicated by 0906 in FIG.

次に、図7のステップ0708に示すように、′WHERE′という文字列を出力する。これは、図9の0907で示される行に相当する。   Next, as shown in step 0708 of FIG. 7, a character string “WHERE” is output. This corresponds to the row indicated by 0907 in FIG.

次に、セレクト条件を出力する(図7のステップ0709)。このステップでは、図4の043に示すセレクト条件を出力する。これは、図9の0908で示される行に相当する。   Next, the selection condition is output (step 0709 in FIG. 7). In this step, the selection condition indicated by 043 in FIG. 4 is output. This corresponds to the row indicated by 0908 in FIG.

最後に、プログラム出力を行う(図7のステップ0710)。このステップでは、図9に示される内容を、カーソル定義文としてプログラム合成手段27へと受け渡す。   Finally, program output is performed (step 0710 in FIG. 7). In this step, the contents shown in FIG. 9 are transferred to the program composition means 27 as a cursor definition sentence.

カーソル定義文生成の詳細は以上である。   The details of the cursor definition statement generation are as described above.

次に、データ取得文生成を行う(図5のステップ054)。このステップでは、図10の内容のデータ取得文を出力するが、その詳細を図8のフローチャートを参照して説明する。   Next, a data acquisition sentence is generated (step 054 in FIG. 5). In this step, the data acquisition sentence having the contents shown in FIG. 10 is output. The details will be described with reference to the flowchart shown in FIG.

まず、仕様入力を行う(図8のステップ081)。このステップでは、仕様入力手段21から図2で示されるデータ取得先変数仕様を受け取る。   First, specification input is performed (step 081 in FIG. 8). In this step, the data acquisition destination variable specification shown in FIG.

次に、データ取得先変数仕様の含む変数の定義すべて、すなわち図2の0221、0222、0223のそれぞれの行で定義されている変数について、図8のステップ082から084の間のステップを繰り返す。   Next, the steps between steps 082 to 084 in FIG. 8 are repeated for all the definitions of the variables included in the data acquisition destination variable specification, that is, the variables defined in the respective lines 0221, 0222, and 0223 in FIG.

まず、図2の0221について、データ取得文出力を行う(図8の083)。このステップでは、′<変数名>(counter):=line.WORK_<変数名>;′という内容を出力する。ただし、<変数名>の部分には仕様で示された変数名が挿入される。図2の0221の場合、変数名は′選択商品区分′であるので、結果として図10の1001で示される行が出力される。   First, a data acquisition sentence is output for 0221 in FIG. 2 (083 in FIG. 8). In this step, the content '<variable name> (counter): = line.WORK_ <variable name>;' is output. However, the variable name indicated in the specification is inserted in the <variable name> part. In the case of 0221 in FIG. 2, since the variable name is “selected product category”, the line indicated by 1001 in FIG. 10 is output as a result.

次に、図2の0222について、データ取得文出力を行う(図8の083)。図2の0221の場合、変数名は′選択商品名′であるので、結果として図10の1002で示される行が出力される。   Next, a data acquisition sentence is output for 0222 in FIG. 2 (083 in FIG. 8). In the case of 0221 in FIG. 2, since the variable name is “selected product name”, as a result, a line indicated by 1002 in FIG. 10 is output.

次に、図2の0223について、データ取得文出力を行う(図8の083)。図2の0223の場合、変数名は′選択商品更新日′であるので、結果として図10の1003で示される行が出力される。   Next, a data acquisition sentence is output for 0223 in FIG. 2 (083 in FIG. 8). In the case of 0223 in FIG. 2, the variable name is “selected product update date”, and as a result, a line indicated by 1003 in FIG. 10 is output.

図8のステップ082から084までの繰り返しは以上である。   The repetition from step 082 to step 084 in FIG.

最後に、プログラム出力を行う(図8のステップ085)。このステップでは、図10に示される内容を、データ取得文としてプログラム合成手段27へと受け渡す。   Finally, program output is performed (step 085 in FIG. 8). In this step, the contents shown in FIG. 10 are transferred to the program synthesis unit 27 as a data acquisition sentence.

データ取得文生成の詳細は以上である。   The details of the data acquisition statement generation are as described above.

次に、プログラム合成を行う(図5のステップ055)。このステップでは、カーソル定義文生成手段24より図9に示すカーソル文定義を受け取り、データ取得文生成手段25より図10に示すデータ取得文を受け取り、プログラムスケルトン記憶部26の内容である図11における′<<カーソル定義文挿入箇所>>′(1102で示す行)及び′<<データ取得文挿入箇所>>′(1109で示す行)へと挿入し、これにより完成した生成プログラムである図12を出力する。
第1の実施の形態の動作の説明は以上である。なお本説明では、仕様記憶部1及びデータ変換処理文生成規則記憶部22及びカーソル定義文生成手段24が生成するカーソル定義文及びデータ取得文生成手段25が生成するデータ取得文及びプログラムスケルトン記憶部26及びシステムによって生成される生成プログラム記憶部3を、PL/SQL言語に従って記述し説明しているが、同様の構成で他のプログラミング言語のプログラムを生成することが可能である。
Next, program synthesis is performed (step 055 in FIG. 5). In this step, the cursor statement definition shown in FIG. 9 is received from the cursor definition statement generator 24, the data acquisition statement shown in FIG. 10 is received from the data acquisition statement generator 25, and the contents of the program skeleton storage unit 26 in FIG. FIG. 12 shows a generated program that is inserted into '<< cursor definition sentence insertion location >>' (line indicated by 1102) and '<< data acquisition statement insertion location >>' (line indicated by 1109). Is output.
The operation of the first embodiment has been described above. In this description, the specification storage unit 1, the data conversion processing statement generation rule storage unit 22, the cursor definition statement generated by the cursor definition statement generation unit 24, and the data acquisition statement and program skeleton storage unit generated by the data acquisition statement generation unit 25. 26 and the generation program storage unit 3 generated by the system are described and explained according to the PL / SQL language, but programs of other programming languages can be generated with the same configuration.

次に、本発明の第2の実施の形態の構成について図面を参照して詳細に説明する。   Next, the configuration of the second exemplary embodiment of the present invention will be described in detail with reference to the drawings.

本発明の第2の実施の形態の構成を示す図13を参照すると、この実施の形態のデータ処理プログラム自動生成システム200は、仕様記憶部100に記憶されているデータ更新プログラム仕様を入力情報として、仕様入力手段221と、データ変換処理文生成規則記憶部222と、データ変換処理文生成手段223と、出力処理文生成手段228と、プログラムスケルトン記憶部226と、プログラム合成手段227とから構成され、生成プログラム記憶部300に生成プログラムを出力する。   Referring to FIG. 13 showing the configuration of the second embodiment of the present invention, the data processing program automatic generation system 200 of this embodiment uses the data update program specification stored in the specification storage unit 100 as input information. , Specification input means 221, data conversion processing statement generation rule storage unit 222, data conversion processing statement generation unit 223, output processing statement generation unit 228, program skeleton storage unit 226, and program synthesis unit 227. The generated program is output to the generated program storage unit 300.

仕様記憶部100は、本システムで生成すべきデータ更新プログラム仕様として、例えば図14のように、データ更新用変数仕様、及びデータ更新先表仕様を保持する。   The specification storage unit 100 holds a data update variable specification and a data update destination table specification as shown in FIG. 14, for example, as data update program specifications to be generated by this system.

仕様入力手段221は、このような仕様記憶部100に保持されているデータ更新プログラム仕様を入力し、データ変換処理文生成手段223へ受け渡す。   The specification input unit 221 inputs the data update program specification held in the specification storage unit 100 and passes it to the data conversion process statement generation unit 223.

データ変換処理文生成規則記憶部222は、本システムで自動で生成するデータ変換処理文生成規則として、例えば図15のようなデータ変換処理文生成規則をあらかじめ保持する。   The data conversion processing statement generation rule storage unit 222 holds in advance a data conversion processing statement generation rule as shown in FIG. 15, for example, as a data conversion processing statement generation rule automatically generated by this system.

データ変換処理文生成規則は、適用すべき項目の名称を示す項目名、その型を示す項目型、適用すべき対応変数名、その型を示す対応変数型、及び生成すべきデータ変換処理から構成される。   The data conversion processing statement generation rule is composed of an item name indicating the name of an item to be applied, an item type indicating the type, a corresponding variable name to be applied, a corresponding variable type indicating the type, and a data conversion process to be generated. Is done.

ここで、項目名及び対応変数名の中に、′${<数値>}′(<数値>の部分は任意の数字)という記述を含む場合があるが、このような場合、′${<数値>}′の部分にはどのような文字列が入っても良いという意味となる。ただし、同じ数値のものが複数存在する場合には、同じ文字列を意味するものとする。   Here, the item name and the corresponding variable name may contain the description '$ {<numeric value}}' (where <numeric value> is an arbitrary number). This means that any character string can be entered in the numerical value>} ′ part. However, when there are a plurality of items having the same numerical value, it means the same character string.

例えば図15において151の行を参照すると、項目名が′${1}商品コード′で、対応変数名が′${2}商品区分,${2}商品番号′であるような場合に、′${2}商品区分||′-′||${3}商品番号′というデータ変換処理文を生成するというデータ変換処理文生成規則を意味する。   For example, referring to the line 151 in FIG. 15, if the item name is '$ {1} product code' and the corresponding variable name is '$ {2} product category, $ {2} product number', This means a data conversion processing statement generation rule for generating a data conversion processing statement of '$ {2} product category ||'-'|| $ {3} product number'.

データ変換処理文生成手段223は、仕様入力手段221からデータ更新プログラム仕様を受け取り、データ変換処理文生成規則記憶部222に格納された情報を元にデータ変換処理文を生成し、データ更新プログラム仕様に追加し、出力処理文生成手段228へ受け渡す。   The data conversion process statement generation unit 223 receives the data update program specification from the specification input unit 221, generates a data conversion process statement based on the information stored in the data conversion process statement generation rule storage unit 222, and generates the data update program specification. To the output processing statement generation means 228.

出力処理文生成手段228は、データ変換処理文生成手段223からデータ変換処理を含んだ仕様を受け取り、出力処理文を生成し、プログラム合成手段227へ受け渡す。   The output processing statement generation unit 228 receives the specification including the data conversion processing from the data conversion processing statement generation unit 223, generates an output processing statement, and transfers it to the program synthesis unit 227.

プログラムスケルトン記憶部226は、データ更新プログラム仕様によらず出力するプログラムの雛形を記憶していて、図21のような内容があらかじめ格納されている。本実施の形態では、データベースの内容を、既存の変数を用いて更新するようなデータ処理プログラムを生成対象としているが、そのようなプログラムにおいては、データベースに対する出力を行う出力処理文以外の部分については、常に共通の内容を使用することができる。このプログラムスケルトン記憶部226では、その共通の部分を保持し、出力処理文については埋め込む場所を示すのみとなっている(図21の′<<出力処理文挿入箇所>>′)。   The program skeleton storage unit 226 stores a template of a program to be output regardless of the data update program specification, and contents as shown in FIG. 21 are stored in advance. In this embodiment, a data processing program that updates the contents of the database using existing variables is targeted for generation, but in such a program, a portion other than an output processing statement that performs output to the database. Can always use common content. The program skeleton storage unit 226 holds the common part and indicates only the place to embed the output processing statement (“<< output processing statement insertion location >>” in FIG. 21).

プログラム合成手段227は、プログラムスケルトン記憶部226の内容に、出力処理文生成手段228から受け取る出力処理文を挿入し、本システムの出力である生成プログラムを生成プログラム記憶部300に出力する。   The program synthesis unit 227 inserts the output processing statement received from the output processing statement generation unit 228 into the contents of the program skeleton storage unit 226, and outputs the generation program that is the output of this system to the generation program storage unit 300.

次に、図17のフローチャートを参照して、本発明の第2の実施の形態の動作について詳細に説明する。この実施の形態においては、図14に示す形式で表現されたデータ更新プログラム仕様を入力し、PL/SQL言語で記述された、データベースのデータを更新するデータ処理プログラム図22を出力する。   Next, the operation of the second exemplary embodiment of the present invention will be described in detail with reference to the flowchart of FIG. In this embodiment, the data update program specification expressed in the format shown in FIG. 14 is input, and the data processing program FIG. 22 for updating the data in the database described in the PL / SQL language is output.

まず、仕様入力手段221により仕様入力を行う(図17のステップ171)。このステップでは、仕様記憶部100に格納されている図14に示すデータをシステム内部に読み込み、データ変換処理文生成手段223へ受け渡す。   First, specification input is performed by the specification input means 221 (step 171 in FIG. 17). In this step, the data shown in FIG. 14 stored in the specification storage unit 100 is read into the system and transferred to the data conversion processing statement generation unit 223.

次に、データ変換処理文生成手段223により、データ変換処理生成を行う(図17のステップ172)。このステップの詳細を、図18のフローチャートを参照して詳細に説明する。   Next, the data conversion processing statement generation means 223 generates data conversion processing (step 172 in FIG. 17). Details of this step will be described in detail with reference to the flowchart of FIG.

まず、仕様入力を行う(図18のステップ181)。このステップでは、仕様入力手段221から図14に示す仕様を受け取る。   First, specification input is performed (step 181 in FIG. 18). In this step, the specification shown in FIG.

次に、データ更新先表仕様の含む変数の定義すべて、すなわち図14における1421の行、1422の行の行それぞれに対し、図18のステップ182からステップ187の処理を行う。   Next, the processing from step 182 to step 187 in FIG. 18 is performed for all the definitions of the variables included in the data update destination table specification, that is, the rows 1421 and 1422 in FIG.

最初に、図14における1421の行の変数定義についての処理を行う。まず、データ変換処理文生成規則の選択を行う(図18のステップ183)。このステップでは、図15に示すデータ変換処理文生成規則と、現在扱っている変数定義である図14における1421における表名、項目名、型、対応変数名が一致するものを、適用すべきデータ変換処理文生成規則として選択する。   First, the variable definition on the line 1421 in FIG. 14 is processed. First, a data conversion process statement generation rule is selected (step 183 in FIG. 18). In this step, the data conversion processing statement generation rule shown in FIG. 15 and the table name, item name, type, and corresponding variable name in 1421 in FIG. Select as a conversion processing statement generation rule.

この場合、図15における151の行で定義されるデータ変換処理文生成規則が選択される。この理由は、151における項目名′${1}商品コード′は、′${1}′を空文字列(′′)とみなすことにより、1421における項目名である′商品コード′と一致し、かつ151における対応変数名′${2}商品区分,${2}商品番号′は、′${2}′を′選択′とみなすことにより、1421における対応項目名である′選択商品区分,選択商品番号′と一致しするからである。   In this case, the data conversion process statement generation rule defined by the line 151 in FIG. 15 is selected. This is because the item name '$ {1} product code' in 151 matches the item name 'product code' in 1421 by regarding '$ {1}' as an empty string ('). And 151, the corresponding variable name '$ {2} product category, $ {2} product number' is the corresponding item name in 1421 by selecting '$ {2}' as 'selected'. This is because it matches the selected item number.

次に、データ変換処理が選択されたかどうかで処理の分岐を行う(図18のステップ184)。この場合、ステップ183において、図15における151の行で定義されるデータ変換処理文生成規則が選択されているため、選択されたと判定し、ステップ185へ進む。   Next, the process branches depending on whether the data conversion process is selected (step 184 in FIG. 18). In this case, in step 183, since the data conversion processing statement generation rule defined in the line 151 in FIG. 15 is selected, it is determined that it has been selected, and the process proceeds to step 185.

次に、データ変換処理生成を行う(図18のステップ185)。このステップでは、ステップ183において選択された、図15における151の行で定義されるデータ変換処理文生成規則で指定されたデータ変換処理文を生成する。151の行で定義されるデータ変換処理は′${2}商品区分||′-′||${2}商品番号′となっているが、ステップ183において′${2}′を′選択′とみなしているため、′選択商品区分||′-′||選択商品番号′という文字列となる。これをデータ登録先表仕様へと書き込む(図16の1621の行におけるデータ変換処理欄)。   Next, data conversion process generation is performed (step 185 in FIG. 18). In this step, the data conversion process statement specified in the data conversion process statement generation rule defined in the line 151 in FIG. 15 selected in step 183 is generated. The data conversion process defined in line 151 is '$ {2} product category ||'-'|| $ {2} product number', but in step 183, '$ {2}' is selected. Since it is regarded as', it becomes a character string of 'selected product category ||'-'|| selected product number'. This is written into the data registration destination table specification (data conversion processing column in the row 1621 in FIG. 16).

以上が、図14における1421の行の変数定義についての処理である。   The above is the processing for the variable definition in the row 1421 in FIG.

次に、図14における1422の行の変数定義についての処理を行う。まず、データ変換処理文生成規則の選択を行う(図18のステップ183)。この場合、データ変換処理文生成規則が選択されない。この理由は、図15に示される変数名や型名が一致する行が存在しないためである。   Next, the process for defining variables in the row 1422 in FIG. 14 is performed. First, a data conversion process statement generation rule is selected (step 183 in FIG. 18). In this case, the data conversion processing statement generation rule is not selected. This is because there is no line having the same variable name or type name as shown in FIG.

次に、データ変換処理が選択されたかどうかで処理の分岐を行う(図18のステップ184)。この場合、ステップ183においてデータ変換処理文生成規則が選択されなかったため、選択されなかったと判断し、ステップ186へ進む。   Next, the process branches depending on whether the data conversion process is selected (step 184 in FIG. 18). In this case, since the data conversion process statement generation rule is not selected in step 183, it is determined that it has not been selected, and the process proceeds to step 186.

次に、対応変数名のデータ変換処理への転記を行う(図18のステップ186)。このステップでは、もとの仕様に存在した対応変数名の内容を、そのままの内容でデータ変換処理として書き込む。図14における1422の行の変数定義において、対応変数名は′選択商品名′であるため、データ変換処理′選択商品名′として書き込む(図16の1622の行におけるデータ変換処理欄)。   Next, the corresponding variable name is transferred to the data conversion process (step 186 in FIG. 18). In this step, the content of the corresponding variable name existing in the original specification is written as the data conversion processing with the content as it is. In the variable definition in the row 1422 in FIG. 14, the corresponding variable name is “selected product name”, so it is written as the data conversion process “selected product name” (data conversion processing column in the row 1622 in FIG. 16).

以上が、図14における1422の行の変数定義についての処理である。   The above is the processing for the variable definition in the row 1422 in FIG.

ここまでで、データ更新先表仕様の含む変数の定義すべてに対して、図18のステップ182からステップ187の処理を行うという繰り返しの処理が終了した。   Up to this point, the repetitive processing of performing the processing from step 182 to step 187 in FIG. 18 for all the definitions of the variables included in the data update destination table specification is completed.

最後に、仕様出力を行う(図18のステップ188)。このステップでは、前述の過程によりデータ変換処理が生成された仕様である図16の内容を、出力処理文生成手段228に対して出力する。   Finally, specification output is performed (step 188 in FIG. 18). In this step, the contents shown in FIG. 16, which is the specification in which the data conversion process is generated by the above-described process, are output to the output process sentence generation unit 228.

データ変換処理生成の詳細は以上である。   The details of the data conversion process generation are as described above.

次に、出力処理文生成手段228により、出力処理文生成を行う(図17のステップ173)。このステップでは、図20の内容の出力処理文を出力するが、その詳細を、図19のフローチャートを参照して説明する。   Next, output processing statement generation is performed by the output processing statement generation means 228 (step 173 in FIG. 17). In this step, the output processing statement having the contents shown in FIG. 20 is output. The details will be described with reference to the flowchart shown in FIG.

まず、仕様入力を行う(図19のステップ1901)。このステップでは、データ変換処理文生成手段228から図16で示されるデータ登録先表仕様を受け取る。   First, specification input is performed (step 1901 in FIG. 19). In this step, the data registration destination table specification shown in FIG.

次に、図19のステップ1902に示すように、′INSERT INTO′という文字列を出力する。これは、図20の2001で示される行に相当する。   Next, as shown in step 1902 of FIG. 19, a character string 'INSERT INTO' is output. This corresponds to the row indicated by 2001 in FIG.

次に、表名を出力する(図19のステップ1903)。このステップでは、図16に示す表名である′商品マスタ′を出力する。これは、図20の2002で示される行に相当する。   Next, the table name is output (step 1903 in FIG. 19). In this step, the “product master” which is the table name shown in FIG. 16 is output. This corresponds to the row indicated by 2002 in FIG.

次に、図19のステップ1904に示すように、′(′という文字列を出力する。これは、図20の2003で示される行に相当する。   Next, as shown in step 1904 in FIG. 19, a character string '(' is output. This corresponds to a line indicated by 2003 in FIG.

次に、データ登録先表仕様の含む変数の定義すべて、すなわち図16の1621、1622のそれぞれの行で定義されている変数について、図19のステップ1905と1907の間のステップを繰り返す。   Next, the steps between steps 1905 and 1907 in FIG. 19 are repeated for all the definitions of the variables included in the data registration destination table specification, that is, the variables defined in the respective rows 1621 and 1622 in FIG.

まず、図16の1621について、項目名出力を行う(図19の1906)。このステップでは、データ登録先表仕様における項目名を出力する。加えて、繰り返しの最後でないかぎり、末尾にコンマ記号(′,′)を付加する。ここでは、図16の1621に示すように項目名が′商品コード′であるため、結果として図20の2004で示される行が出力される。   First, an item name is output for 1621 in FIG. 16 (1906 in FIG. 19). In this step, the item name in the data registration destination table specification is output. In addition, a comma symbol (',') is added at the end unless it is the end of the repetition. Here, since the item name is “product code” as indicated by 1621 in FIG. 16, the row indicated by 2004 in FIG. 20 is output as a result.

次に、図16の1622について、項目名出力を行う(図19の1906)。図16の1622に示すように、項目名は′商品名′である。また、繰り返しの最後であるため、末尾にコンマ記号(′,′)は付加されない。結果として図20の2005で示される行が出力される。   Next, an item name is output for 1622 in FIG. 16 (1906 in FIG. 19). As shown by 1622 in FIG. 16, the item name is “product name”. Moreover, since it is the last of repetition, a comma symbol (',') is not added at the end. As a result, the line indicated by 2005 in FIG. 20 is output.

図19のステップ1905から1907までの繰り返しは以上である。   The repetition from step 1905 to step 1907 in FIG.

次に、図19のステップ1908に示すように、′)VALUES(′という文字列を出力する。これは、図20の2006で示される行に相当する。   Next, as shown in Step 1908 of FIG. 19, a character string ') VALUES (' is output. This corresponds to the line indicated by 2006 in FIG.

次に、データ登録先表仕様の含む変数の定義すべて、すなわち図16の1621、1622のそれぞれの行で定義されている変数について、図19のステップ1909から1911の間のステップを繰り返す。   Next, the steps between steps 1909 to 1911 in FIG. 19 are repeated for all the definitions of the variables included in the data registration destination table specification, that is, the variables defined in the respective rows 1621 and 1622 in FIG.

まず、図16の1621について、データ変換処理出力を行う(図19のステップ1910)。このステップでは、データ登録先表仕様におけるデータ変換処理を出力する。また、データ変換処理を出力する際には、出力処理文をループの中で使用できるようにする目的で、変数名に相当する文字列の直後にはループカウンターとなる文字列′(counter)′を付加する。加えて、繰り返しの最後でないかぎり、末尾にコンマ記号(′,′)を付加する。ここでは、図16の1621に示すようにデータ変換処理が′選択商品区分||′-′||選択商品番号′であるが、変数名に相当する文字列である′選択商品区分′及び′選択商品番号′の直後に文字列′(counter)′を付加すると、′選択商品区分(counter)||′-′||選択商品番号(counter)′という文字列となる。また、繰り返しの最後ではないため末尾にコンマ記号(′,′)を付加するので、結果として図20の2007で示される行が出力される。   First, a data conversion process output is performed for 1621 in FIG. 16 (step 1910 in FIG. 19). In this step, the data conversion process in the data registration destination table specification is output. Also, when outputting the data conversion process, a character string '(counter)' that becomes a loop counter immediately after the character string corresponding to the variable name is used so that the output processing statement can be used in the loop. Is added. In addition, a comma symbol (',') is added at the end unless it is the end of the repetition. Here, as shown by 1621 in FIG. 16, the data conversion process is “selected product category ||”-“| selected product number”, but “selected product category” and “ If a character string '(counter)' is added immediately after the selected product number ', a character string of' selected product category (counter) || '-' || selected product number (counter) 'is obtained. Also, since it is not the end of the repetition, a comma symbol (',') is added at the end, and as a result, the line indicated by 2007 in FIG. 20 is output.

次に、図16の1622について、データ変換処理出力を行う(図19のステップ1910)。図16の1622に示すようにデータ変換処理が′選択商品名′であり、変数名に相当する文字列である′選択商品名′の直後に文字列′(counter)′を付加すると、′選択商品名(counter)′という文字列となる。また、繰り返しの最後なので、コンマ記号(′,′)は付加されない。結果として図20の2008で示される行が出力される。   Next, data conversion processing output is performed for 1622 in FIG. 16 (step 1910 in FIG. 19). As shown by 1622 in FIG. 16, when the data conversion process is “selected product name” and a character string “(counter)” is added immediately after “selected product name” which is a character string corresponding to a variable name, It becomes the character string of product name (counter) ′. Also, since it is the end of the repetition, the comma symbol (',') is not added. As a result, the line indicated by 2008 in FIG. 20 is output.

図19のステップ1909から1911までの繰り返しは以上である。   The repetition from step 1909 to 1911 in FIG. 19 is as described above.

次に、図19のステップ1912に示すように、′);′という文字列を出力する。これは、図20の2009で示される行に相当する。   Next, as shown in step 1912 of FIG. 19, a character string ');' is output. This corresponds to the row indicated by 2009 in FIG.

最後に、プログラム出力を行う(図19のステップ1913)。このステップでは、図20に示される内容を、出力処理文としてプログラム合成手段227へと受け渡す。   Finally, program output is performed (step 1913 in FIG. 19). In this step, the contents shown in FIG. 20 are transferred to the program synthesis means 227 as an output processing statement.

出力処理文生成の詳細は以上である。   The details of the output processing statement generation are as described above.

次に、プログラム合成を行う(図17のステップ174)。このステップでは、出力処理文生成手段228より図20に示す出力処理文を受け取り、プログラムスケルトン記憶部226の内容である図21における′<<出力処理文挿入箇所>>′(2105で示す行)へと挿入し、これにより完成した生成プログラムである図22を出力する。   Next, program synthesis is performed (step 174 in FIG. 17). In this step, the output processing statement shown in FIG. 20 is received from the output processing statement generating means 228, and the contents of the program skeleton storage unit 226 are “<< output processing statement insertion location >>” (line indicated by 2105) in FIG. FIG. 22 which is a completed generation program is output.

第2の実施の形態の動作の説明は以上である。   The operation of the second embodiment has been described above.

以上説明したように、本発明の第2の実施の形態によれば、データベースのデータを更新するデータ処理プログラムを多数開発することが要求されるプロジェクトにおいて、プログラムの品質を安定させることができる。   As described above, according to the second embodiment of the present invention, the quality of a program can be stabilized in a project that requires development of a large number of data processing programs for updating database data.

また、データ変換のためのデータ変換処理を実装するための規約が、プロジェクト進行中に変更になっても問題が発生しない。   In addition, there is no problem even if the rules for implementing the data conversion processing for data conversion are changed during the project.

さらに、データ変化の際のデータ変換処理を実装する工数を削減できる。この理由は、データ更新の際のデータ変換処理が自動生成されるため、本システムの利用者はデータ変換処理を記述する必要が無いからである。   Furthermore, it is possible to reduce the man-hours for implementing the data conversion process when data changes. This is because the data conversion process at the time of data update is automatically generated, and the user of this system does not need to describe the data conversion process.

本発明の第1の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 1st Embodiment of this invention. 第1の実施の形態おける生成すべきデータ取得プログラムの仕様を示す図である。It is a figure which shows the specification of the data acquisition program which should be produced | generated in 1st Embodiment. 第1の実施の形態おけるデータ変換処理文生成規則の仕様を示す図である。It is a figure which shows the specification of the data conversion process sentence production | generation rule in 1st Embodiment. 第1の実施の形態おけるデータ取得元表仕様、データ取得先変数仕様、及びセレクト条件を示す図である。It is a figure which shows the data acquisition origin table | surface specification in 1st Embodiment, data acquisition destination variable specification, and selection conditions. 第1の実施の形態の動作を示す流れ図である。It is a flowchart which shows operation | movement of 1st Embodiment. 第1の実施の形態おけるデータ変換処理生成の詳細を示す図である。It is a figure which shows the detail of the data conversion process production | generation in 1st Embodiment. 第1の実施の形態おけるカーソル定義文出力動作の詳細を示す図である。It is a figure which shows the detail of the cursor definition sentence output operation | movement in 1st Embodiment. 第1の実施の形態おけるデータ取得文生成動作の詳細を説明する流れ図である。It is a flowchart explaining the detail of the data acquisition sentence production | generation operation | movement in 1st Embodiment. 第1の実施の形態おけるカーソル定義文の一例を示す図である。It is a figure which shows an example of the cursor definition sentence in 1st Embodiment. 第1の実施の形態おけるデータ取得文の一例を示す図である。It is a figure which shows an example of the data acquisition sentence in 1st Embodiment. 第1の実施の形態おけるプログラムスケルトン記憶部の内容の一例を示す図である。It is a figure which shows an example of the content of the program skeleton memory | storage part in 1st Embodiment. 第1の実施の形態おける完成した生成プログラムの一例を示す図である。It is a figure which shows an example of the completed production | generation program in 1st Embodiment. 本発明の第2の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 2nd Embodiment of this invention. 第2の実施の形態おける生成すべきデータ取得プログラムの仕様を示す図である。It is a figure which shows the specification of the data acquisition program which should be produced | generated in 2nd Embodiment. 第2の実施の形態おけるデータ変換処理文生成規則の仕様を示す図である。It is a figure which shows the specification of the data conversion process sentence production | generation rule in 2nd Embodiment. 第2の実施の形態おけるデータ登録プログラム仕様、データ登録先表仕様を示す図である。It is a figure which shows the data registration program specification in 2nd Embodiment, and a data registration destination table | surface specification. 第2の実施の形態の動作を示す流れ図である。It is a flowchart which shows operation | movement of 2nd Embodiment. 第2の実施の形態おけるデータ変換処理生成の詳細を示す図である。It is a figure which shows the detail of the data conversion process production | generation in 2nd Embodiment. 第2の実施の形態おける出力処理文生成動作の詳細を示す図である。It is a figure which shows the detail of the output process sentence production | generation operation | movement in 2nd Embodiment. 第2の実施の形態おける出力処理文の一例を示す図である。It is a figure which shows an example of the output process sentence in 2nd Embodiment. 第2の実施の形態おけるプログラムスケルトン記憶部の内容の一例を示す図である。It is a figure which shows an example of the content of the program skeleton memory | storage part in 2nd Embodiment. 第2の実施の形態おける完成した生成プログラムの一例を示す図である。It is a figure which shows an example of the completed production | generation program in 2nd Embodiment.

符号の説明Explanation of symbols

1,100 仕様記憶部
2,200 データ処理プログラム自動生成システム
3,300 生成プログラム記憶部
21,221 仕様入力手段
22,222 データ変換処理文生成規則記憶部
23,223 データ変換処理文生成手段
24 カーソル定義文生成手段
25 データ取得文生成手段
26,226 プログラムスケルトン記憶部
27,227 プログラム合成手段
228 出力処理文生成手段
1,100 Specification Storage Unit 2,200 Data Processing Program Automatic Generation System 3,300 Generation Program Storage Unit 21,221 Specification Input Unit 22,222 Data Conversion Process Statement Generation Rule Storage Unit 23,223 Data Conversion Process Statement Generation Unit 24 Cursor Definition sentence generation means 25 Data acquisition sentence generation means 26,226 Program skeleton storage unit 27,227 Program synthesis means 228 Output processing sentence generation means

Claims (6)

データを取得して数に格納するデータ取得プログラムの、前記変数、当該変数の型と、当該変数に対応する前記データ、及び、当該データの型とを含む仕様を入力する仕様入力手段と、
前記変数、前記変数の型、前記データ、及び、前記データの型に関する条件と、当該条件に対して前記データを前記変数の所定の形式に変換するためのデータ変換処理とを含むデータ変換処理文生成規則を記憶するデータ変換処理文生成規則記憶手段と、
前記データ変換処理文生成規則を基に前記仕様が合致する前記条件に対するデータ変換処理文を生成するデータ変換処理文生成手段と、
前記データ変換処理文生成手段が生成した前記データ変換処理文が追加された前記仕様を基にカーソルを定義するカーソル定義文を生成するカーソル定義文生成手段と、
データベースから前記データを取得するデータ取得文を前記仕様を基に生成するデータ取得文生成手段と、
プログラムの雛形であるプログラムスケルトンを記憶するプログラムスケルトン記憶手段と、
前記プログラムスケルトンに、前記カーソル定義文生成手段から受け取る前記カーソル定義文、及び前記データ取得文生成手段から受け取る前記データ取得文を挿入し、前記データ取得プログラムを生成して生成プログラム記憶手段に保存するプログラム合成手段と
を備えることを特徴とするデータ処理プログラム自動生成システム。
Data acquisition program stored data in the variable acquires the variables, and type of the variables, and the data, and, specification input means for inputting a specification that includes a type of the data corresponding to the variable,
A data conversion processing statement including a condition relating to the variable, the variable type, the data, and the data type, and a data conversion process for converting the data into a predetermined format of the variable for the condition Data conversion processing statement generation rule storage means for storing a generation rule;
Data conversion processing statement generation means for generating a data conversion processing statement for the condition that matches the specifications based on the data conversion processing statement generation rules;
A cursor definition statement generating means for generating a cursor definition statement for defining a cursor based on the specification to which the data conversion process statement generated by the data conversion process statement generating means is added;
Data acquisition statement generation means for generating a data acquisition statement for acquiring the data from the database based on the specifications;
Program skeleton storage means for storing a program skeleton which is a template of the program;
The cursor definition statement received from the cursor definition statement generation unit and the data acquisition statement received from the data acquisition statement generation unit are inserted into the program skeleton, and the data acquisition program is generated and stored in the generation program storage unit. A data processing program automatic generation system comprising program synthesis means.
データを取得して数に格納するデータ取得プログラムの、前記変数、当該変数の型と、当該変数に対応する前記データ、及び、当該データの型とを含む仕様を入力し、
前記変数、前記変数の型、前記データ、及び、前記データの型に関する条件と、当該条件に対して前記データを前記変数の所定の形式に変換するためのデータ変換処理とを含むデータ変換処理文生成規則を記憶し、
前記データ変換処理文生成規則を基に前記仕様が合致する前記条件に対するデータ変換処理文を生成し、
前記データ変換処理文が追加された前記仕様を基にカーソルを定義するカーソル定義文を生成し、
データベースから前記データを取得するデータ取得文を前記仕様を基に生成し、
プログラムの雛形であるプログラムスケルトンに、前記カーソル定義文、及び前記データ取得文を挿入し、前記データ取得プログラムを生成する
ことを特徴とするデータ処理プログラム自動生成方法。
Data acquisition program stored data in the variable acquires, enter the variables, and type of the variable, the data corresponding to the variable, and the specification including the type of the data,
A data conversion processing statement including a condition relating to the variable, the variable type, the data, and the data type, and a data conversion process for converting the data into a predetermined format of the variable for the condition Remember the production rules,
Based on the data conversion processing statement generation rules, generate a data conversion processing statement for the conditions that match the specifications,
Generate a cursor definition statement that defines a cursor based on the specification to which the data conversion processing statement is added,
A data acquisition statement for acquiring the data from the database is generated based on the specification,
An automatic data processing program generation method, wherein the cursor definition statement and the data acquisition statement are inserted into a program skeleton which is a program template to generate the data acquisition program.
コンピュータに、
データを取得して数に格納するデータ取得プログラムの、前記変数、当該変数の型と、当該変数に対応する前記データ、及び、当該データの型とを含む仕様を入力し、
前記変数、前記変数の型、前記データ、及び、前記データの型に関する条件と、当該条件に対して前記データを前記変数の所定の形式に変換するためのデータ変換処理とを含むデータ変換処理文生成規則を記憶し、
前記データ変換処理文生成規則を基に前記仕様が合致する前記条件に対するデータ変換処理文を生成し、
前記データ変換処理文が追加された前記仕様を基にカーソルを定義するカーソル定義文を生成し、
前記カーソルを利用してデータベースから前記データを取得するデータ取得文を前記仕様を基に生成し、
プログラムの雛形であるプログラムスケルトンに、前記カーソル定義文、及び前記データ取得文を挿入し、前記データ取得プログラムを生成する
ことを実現させるためのデータ処理プログラム自動生成用プログラム。
On the computer,
Data acquisition program stored data in the variable acquires, enter the variables, and type of the variable, the data corresponding to the variable, and the specification including the type of the data,
A data conversion processing statement including a condition relating to the variable, the variable type, the data, and the data type, and a data conversion process for converting the data into a predetermined format of the variable for the condition Remember the production rules,
Based on the data conversion processing statement generation rules, generate a data conversion processing statement for the conditions that match the specifications,
Generate a cursor definition statement that defines a cursor based on the specification to which the data conversion processing statement is added,
Generate a data acquisition statement for acquiring the data from the database using the cursor based on the specification,
A data processing program automatic generation program for realizing generation of the data acquisition program by inserting the cursor definition statement and the data acquisition statement into a program skeleton which is a program template.
データを数の内容で更新するデータ更新プログラムの、前記データ、当該データの型と、当該データに対応する前記変数、及び、当該変数の型とを含む仕様を入力する仕様入力手段と、
前記データ、前記データの型、前記変数、及び、前記変数の型に関する条件と、当該条件対して前記変数を前記データの所定の形式に変換するためのデータ変換処理とを含むデータ変換処理文生成規則を記憶するデータ変換処理文生成規則記憶手段と、
前記データ変換処理文生成規則を基に前記仕様が合致する前記条件に対するデータ変換処理文を生成するデータ変換処理文生成手段と、
前記データ変換処理文生成手段が生成した前記データ変換処理文が追加された前記仕様を基にデータを出力するための出力処理文を生成する出力処理文生成手段と、
プログラムの雛形であるプログラムスケルトンを記憶するプログラムスケルトン記憶手段と、
前記プログラムスケルトンに、前記出力処理文生成手段から受け取る前記出力処理文を挿入し、前記データ更新プログラムを生成して生成プログラム記憶手段に保存するプログラム合成手段と
を備えることを特徴とするデータ処理プログラム自動生成システム。
Data update program for updating the data in the contents of the variable, the data, and type of the data, and the variables, and, specification input means for inputting a specification including the type of the variables corresponding to the data,
Data conversion processing statement generation including the data, the data type, the variable, and a condition relating to the variable type, and a data conversion process for converting the variable into the predetermined format of the data for the condition Data conversion processing statement generation rule storage means for storing rules;
Data conversion processing statement generation means for generating a data conversion processing statement for the condition that matches the specifications based on the data conversion processing statement generation rules;
Output processing statement generating means for generating an output processing statement for outputting data based on the specification to which the data conversion processing statement generated by the data conversion processing statement generating means is added;
Program skeleton storage means for storing a program skeleton which is a template of the program;
A data processing program comprising: a program synthesis unit that inserts the output processing statement received from the output processing statement generation unit into the program skeleton, generates the data update program, and stores the generated data update program in a generation program storage unit Automatic generation system.
データを数の内容で更新するデータ更新プログラムの、前記データ、当該データの型と、当該データに対応する前記変数、及び、当該変数の型とを含む仕様を入力し、
前記データ、前記データの型、前記変数、及び、前記変数の型に関する条件と、当該条件対して前記変数を前記データの所定の形式に変換するためのデータ変換処理とを含むデータ変換処理文生成規則を記憶し、
前記データ変換処理文生成規則を基に前記仕様が合致する前記条件に対するデータ変換処理文を生成し、
前記データ変換処理文が追加された前記仕様を基にデータを出力するための出力処理文を生成し、
プログラムの雛形であるプログラムスケルトンに、前記出力処理文を挿入し、前記データ更新プログラムを生成する
ことを特徴とするデータ処理プログラム自動生成方法。
The data update program for updating the data in the contents of the variable, enter the data, and type of the data, the variables corresponding to the data, and the specification including the type of the variable,
Data conversion processing statement generation including the data, the data type, the variable, and a condition relating to the variable type, and a data conversion process for converting the variable into the predetermined format of the data for the condition Remember the rules,
Based on the data conversion processing statement generation rules, generate a data conversion processing statement for the conditions that match the specifications,
Generate an output processing statement for outputting data based on the specification to which the data conversion processing statement is added,
A data processing program automatic generation method, wherein the output processing statement is inserted into a program skeleton which is a program template to generate the data update program.
コンピュータに、
データを数の内容で更新するデータ更新プログラムの、前記データ、当該データの型と、当該データに対応する前記変数、及び、当該変数の型とを含む仕様を入力し、
前記データ、前記データの型、前記変数、及び、前記変数の型に関する条件と、当該条件対して前記変数を前記データの所定の形式に変換するためのデータ変換処理とを含むデータ変換処理文生成規則を記憶し、
前記データ変換処理文生成規則を基に前記仕様が合致する前記条件に対するデータ変換処理文を生成し、
前記データ変換処理文が追加された前記仕様を基にデータを出力するための出力処理文を生成し、
プログラムの雛形であるプログラムスケルトンに、前記出力処理文を挿入し、前記データ更新プログラムを生成する
ことを実現させるためのデータ処理プログラム自動生成用プログラム。
On the computer,
The data update program for updating the data in the contents of the variable, enter the data, and type of the data, the variables corresponding to the data, and the specification including the type of the variable,
Data conversion processing statement generation including the data, the data type, the variable, and a condition relating to the variable type, and a data conversion process for converting the variable into the predetermined format of the data for the condition Remember the rules,
Based on the data conversion processing statement generation rules, generate a data conversion processing statement for the conditions that match the specifications,
Generate an output processing statement for outputting data based on the specification to which the data conversion processing statement is added,
A data processing program automatic generation program for realizing the generation of the data update program by inserting the output processing statement into a program skeleton which is a program template.
JP2004370689A 2004-12-22 2004-12-22 Data processing program automatic generation system, data processing program automatic generation method, and data processing program automatic generation program Expired - Fee Related JP4797378B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004370689A JP4797378B2 (en) 2004-12-22 2004-12-22 Data processing program automatic generation system, data processing program automatic generation method, and data processing program automatic generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004370689A JP4797378B2 (en) 2004-12-22 2004-12-22 Data processing program automatic generation system, data processing program automatic generation method, and data processing program automatic generation program

Publications (2)

Publication Number Publication Date
JP2006178706A JP2006178706A (en) 2006-07-06
JP4797378B2 true JP4797378B2 (en) 2011-10-19

Family

ID=36732771

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004370689A Expired - Fee Related JP4797378B2 (en) 2004-12-22 2004-12-22 Data processing program automatic generation system, data processing program automatic generation method, and data processing program automatic generation program

Country Status (1)

Country Link
JP (1) JP4797378B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4948558B2 (en) * 2009-03-12 2012-06-06 株式会社三菱東京Ufj銀行 Data search apparatus, data search method and program
JP2013206145A (en) * 2012-03-28 2013-10-07 Hitachi Solutions Ltd Server device and data provision system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05108320A (en) * 1991-10-15 1993-04-30 Casio Comput Co Ltd Information processor
JP3871832B2 (en) * 1999-08-20 2007-01-24 日本電気株式会社 Data processing program automatic generation system and method, and computer-readable recording medium
JP2003015920A (en) * 2001-06-28 2003-01-17 Shinsei Kaihatsu Kk Database update system and method that use sheet of spreadsheet software as input screen, database update program that uses sheet of spreadsheet software as input screen and computer-readable recording medium with the program recorded thereon
JP2003256250A (en) * 2002-03-05 2003-09-10 Nippon Steel Corp Transportable program executing device and method, computer readable recording medium and computer program

Also Published As

Publication number Publication date
JP2006178706A (en) 2006-07-06

Similar Documents

Publication Publication Date Title
US10970474B2 (en) Method and system for editing text with a find and replace function leveraging derivations of the find and replace input
EP1211624A2 (en) Methods and apparatus for automatically producing spreadsheet-based models
WO2003098500A1 (en) Method and apparatus for automatically producing spreadsheet-based models
JP6847812B2 (en) Document comprehension support device, document comprehension support method, and program
AU2007200385B2 (en) Re-usuable clauses
JP2001060150A (en) Automatic data processing program generation system, method therefor and computer readable recording medium
JP5747698B2 (en) Requirements management support device
JP4797378B2 (en) Data processing program automatic generation system, data processing program automatic generation method, and data processing program automatic generation program
US6965856B1 (en) Process for the automatic generation of a textual expression from a semantic representation using a computer system
JP2009048259A (en) Program conversion method and program for conversion
JP2008052356A (en) Source code automatic generation device
JP5748118B2 (en) Document creation support method, document creation support device, and document creation support program
JP2009251666A (en) Change history preparation apparatus, method, and program
JP4103791B2 (en) Program generation system and method
JP2008257510A (en) Design support system, method and program
JP2008027340A (en) Web service design method and device
JP6062735B2 (en) Software development support device, software development support method, software development support program
JP2010165205A (en) Template automatic generation system, method and program for model
JP2007094453A (en) Program development support system, program development support method and program
JP5581894B2 (en) Data processing program automatic generation system
JPH05135054A (en) Document processing method
JP2007095027A (en) Software development method
US20070150523A1 (en) Method for the creation of a documentary chain and the updating thereof based on a structured model
JP2007323371A (en) Data mapping method and data mapping device
CN117763639A (en) Process formula configuration method

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20070119

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071114

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20080613

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20090511

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110301

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110413

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110524

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110614

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110705

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20110705

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110718

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140812

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees