JP2006004099A - Method, device and program for reusing program - Google Patents

Method, device and program for reusing program Download PDF

Info

Publication number
JP2006004099A
JP2006004099A JP2004178646A JP2004178646A JP2006004099A JP 2006004099 A JP2006004099 A JP 2006004099A JP 2004178646 A JP2004178646 A JP 2004178646A JP 2004178646 A JP2004178646 A JP 2004178646A JP 2006004099 A JP2006004099 A JP 2006004099A
Authority
JP
Japan
Prior art keywords
program
data
database
data structure
migration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004178646A
Other languages
Japanese (ja)
Inventor
Junko Shimano
淳子 嶋野
Shinichi Akiba
真一 秋庭
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2004178646A priority Critical patent/JP2006004099A/en
Publication of JP2006004099A publication Critical patent/JP2006004099A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technique enabling efficient reuse of a program at the time of transfer between information processors. <P>SOLUTION: This method comprises steps of specifying a program for performing an access to a database; extracting information for data and tables used for the access to the database in the specified program; converting a name and a structure of the data used in the extracted information for the data and the table to a predetermined notation or data structure expression to realize a data structure of a database before transfer; forming a data modal of a database after transfer from the realized database structure of the database before transfer to form a data structure of a database after transfer; forming matching information for matching the data structure of the database before transfer to the data structure of the database after transfer; and correcting the names of the data and the table of the database before transfer in the program to the names of data and tables of the database after transfer according to the formed matching information. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は情報処理装置間での処理システムの移行の際にプログラムを修正して再利用するプログラム再利用技術に関し、特に既存のメインフレームシステムからオープンシステムへの移行の際にデータベース構造の変更に合わせてプログラムを修正して再利用を行うプログラム再利用技術に適用して有効な技術に関するものである。   The present invention relates to a program reuse technique for correcting and reusing a program when a processing system is migrated between information processing apparatuses, and more particularly to changing a database structure when migrating from an existing mainframe system to an open system. The present invention also relates to a technique that is effective when applied to a program reuse technique in which a program is modified and reused.

オープンシステムの構築において、これまでメインフレームシステムによって業務運用を行っていた場合、既存のメインフレームシステムのプログラムを再利用することによって新システムを構築し、オープンシステムのプログラムの開発工数を少なくするということが行われている。この様な既存メインフレームシステムのプログラム再利用において、従来はプログラム中に記述されている業務に直結する処理の部分をそのままオープンシステム環境に移行するという方法で行っている。また、データベースに関係する記述部分のプログラムに関しては、データベースのデータ構造の変更がない場合のみプログラムの再利用を行い、データベースのデータ構造の変更がある場合は対応手段を見出し、その場その場で対策を実施している。そのため、データベースに関係するプログラムは全て新規に作成することもある。   In the construction of an open system, if business operations have been carried out by the mainframe system so far, a new system is constructed by reusing the existing mainframe system program, and the development man-hour of the open system program is reduced. Things have been done. In such a program reuse of the existing mainframe system, conventionally, a process part directly connected to a business described in the program is transferred to an open system environment as it is. In addition, regarding the program of the description part related to the database, the program is reused only when there is no change in the data structure of the database, and when there is a change in the data structure of the database, a corresponding means is found and on the spot Measures are being implemented. Therefore, all programs related to the database may be newly created.

データ構造の変更に伴ってプログラムの修正が必要となった場合、データ構造に依存するプログラムを検出することによってプログラム修正の支援を行う技術もある。例えば、データ構造の変更が生じた場合、プログラムと移植元と移植先のアロケート情報を入力し、構造体、データ構造の相違、配置相違のそれぞれの検出手段を場合に応じて駆動し、配置結果の相違内容と相違が発生した構造体を特定し、データ構造の変化が処理に影響するプログラム中の箇所を検出して、プログラムの移植支援を行う装置がある(特許文献1参照)。アロケート情報とは、データ構造毎にメモリ上の配置領域を決定する規則であり、計算機毎に相違する場合がある。この技術では、データアロケート規則の異なる計算機間でプログラムの移植を実施する際に発生するデータ構造の違いを解析し、データ構造の変更に対する移植を支援している。プログラム上で修正が必要な個所の情報を画面表示で提供し、プログラムの修正箇所を明確にすることで、別システムへの移植支援を行い、プログラムの再利用を可能としている。   There is also a technology for assisting program correction by detecting a program that depends on the data structure when the program needs to be corrected in accordance with the change in the data structure. For example, when the data structure changes, the program, porting source and porting destination allocation information is input, and each detection means of structure, data structure difference, and arrangement difference is driven according to the case, and the arrangement result There is an apparatus for identifying a structure in which a difference content and a difference have occurred, detecting a location in a program where a change in data structure affects processing, and supporting the porting of the program (see Patent Document 1). Allocate information is a rule for determining an arrangement area on a memory for each data structure, and may differ for each computer. In this technology, the difference in data structure that occurs when a program is ported between computers with different data allocation rules is analyzed, and porting for changes in the data structure is supported. By providing on-screen information on locations that need to be corrected in the program, and clarifying the correction location of the program, porting to another system is supported and the program can be reused.

特開平5−233237号公報JP-A-5-233237

かかる従来の技術には次の様な問題がある。すなわち、メインフレームシステムのプログラムを再利用してオープンシステムを構築する際は、プログラム中に記述されている業務に直結する処理の部分をそのままオープンシステム環境に移行するという方法を採り、データベースにデータ構造の変更がある場合は、その都度対応方法を検討し、プログラムの修正による再利用が可能かどうかの判断を行う。既存のメインフレームで稼動しているデータベースの構造が複雑な場合は、プログラムの再利用は難しくなるため新規に作成する場合もある。   Such conventional techniques have the following problems. In other words, when building an open system by reusing a mainframe system program, the processing part directly linked to the work described in the program is transferred to the open system environment as it is, and the data is stored in the database. If there is a change in the structure, examine the response method and determine whether it can be reused by modifying the program. If the structure of the database running on the existing mainframe is complicated, it may be difficult to reuse the program, so it may be created anew.

また、データのアロケート規則の変更によるデータ構造の変化に対しては、データ構造に依存するプログラムを検出し、プログラム中のデータ構造の変更が影響する箇所を明確にすることで別システムへの移植支援を行うという方法もある。しかし、この方法はデータベースの構造の変更に対しては対応していない。   For changes in data structure due to changes in data allocation rules, programs that depend on the data structure are detected, and the location where the change in the data structure in the program is affected is clarified. There is also a method of providing support. However, this method does not deal with changes in the structure of the database.

この様に、従来の方法ではデータベースの移行パターン毎にプログラムの修正方法を策定するため、手順は一定ではなく、構造が複雑な場合にはプログラムの再利用で対応できないという問題があった。   Thus, in the conventional method, since a program correction method is formulated for each database migration pattern, the procedure is not constant, and there is a problem that the program cannot be reused when the structure is complicated.

また、データ構造の変更に伴う影響箇所の検出技術においては、計算機によるアロケート規則の変更に伴う修正支援を行っているが、アロケート規則の変更の他にデータ構造の変更が発生するデータベースの構造変更に関するプログラムの再利用に関しては対応できないという問題があった。   In addition, in the technology to detect the affected part due to the change of the data structure, correction support is provided according to the change of the allocation rule by the computer, but the structure change of the database where the change of the data structure occurs in addition to the change of the allocation rule There was a problem that it was not possible to cope with the reuse of the program.

本発明の目的は上記問題を解決し、情報処理装置間での移行を行う際にプログラムの再利用を効率良く行うことが可能な技術を提供することにある。   An object of the present invention is to solve the above-described problems and provide a technique capable of efficiently reusing a program when migrating between information processing apparatuses.

本発明は、情報処理装置間での処理システムの移行の際にプログラムを修正して再利用するプログラム再利用装置において、移行前のプログラム中のデータ及びテーブルの情報を基に移行後のデータベースを設計し、その設計したデータベースのデータ及びテーブルの情報に従ってプログラムを修正するものである。   The present invention relates to a program reuse apparatus that modifies and reuses a program when a processing system is migrated between information processing apparatuses. The database after migration is based on data and table information in the program before migration. Design and modify the program according to the data and table information of the designed database.

本発明では、情報処理装置間での処理システムの移行、例えばメインフレームシステムからオープンシステムへのデータベース処理システムの移行において、特にデータベースの構造が変更になった際、変更されるデータ構造に着目するのではなく、データ構造が変更になっても変化しないメインフレームのプログラム上のデータベースに関連するデータ及びテーブルを抽出し、その抽出したデータ及びテーブルの情報で用いられているデータの名称やデータの構造を、対応する日本語表記やテーブル表現に変換して移行前のデータベースのデータ構造を具現化する。   In the present invention, attention is paid to the data structure that is changed when the structure of the database is changed in the migration of the processing system between information processing apparatuses, for example, the migration of the database processing system from the mainframe system to the open system. Rather than extracting the data and tables related to the database on the mainframe program that does not change even if the data structure changes, the names and data of the data used in the extracted data and table information are extracted. Convert the structure into the corresponding Japanese notation or table expression to embody the data structure of the database before migration.

そして、オープンシステムで利用するデータベースの構造を考慮に入れたデータモデルを前記具現化したデータ構造から作成し、その作成したデータモデルの情報から新データベースを設計する。作成したデータモデルと設計したデータベースのデータ、集約したデータ及びテーブルから、オープンシステムへ移行した後のデータベースに対応するデータ及びテーブルを作成すると共に、新旧のデータベースに関係するデータ及びテーブルの対応情報をまとめ、この新旧のデータベースに関係するデータ及びテーブルの対応情報を用いてプログラムを修正して、プログラムの再利用を実現する。   Then, a data model taking into consideration the structure of the database used in the open system is created from the embodied data structure, and a new database is designed from the information of the created data model. Create data and tables corresponding to the database after moving to the open system from the created data model and designed database data, aggregated data and tables, as well as data and table correspondence information related to the old and new databases In summary, the program is corrected by using the data and table correspondence information related to the new and old databases, thereby realizing the reuse of the program.

本発明によれば、情報処理装置間での移行を行う際にプログラムの再利用を効率良く行うことが可能である。   According to the present invention, it is possible to efficiently reuse a program when performing a transition between information processing apparatuses.

以下にメインフレームシステムからオープンシステムへの移行の際にプログラムを修正して再利用する一実施形態のプログラム再利用装置について説明する。   A program reuse apparatus according to an embodiment that modifies and reuses a program when shifting from a mainframe system to an open system will be described below.

図1は本実施形態のプログラム移行処理の処理手順を示すフローチャートである。メインフレームシステムからオープンシステムへのデータベース関係のプログラムの移行処理が発生した場合、図1に示す様に本実施形態では、DBアクセスプログラムを特定してデータやテーブルを抽出した後、そのデータ構造を具現化して移行後のデータベースを設計し、新旧DB対応情報に従って移行前のプログラムを修正して移行後のプログラムを生成する処理を行う。   FIG. 1 is a flowchart showing a processing procedure of program migration processing according to the present embodiment. When a database-related program migration process from a mainframe system to an open system occurs, as shown in FIG. 1, in this embodiment, after specifying a DB access program and extracting data and tables, the data structure is changed. The database after migration is designed and the database after migration is designed, and the program before migration is modified according to the old and new DB correspondence information to generate the program after migration.

図10は本実施形態のプログラム再利用装置の概略構成を示す図である。図10に示す様に本実施形態のプログラム再利用装置1000は、DBアクセスプログラム特定処理部1001と、データ/テーブル抽出処理部1002と、データ構造具現化処理部1003と、DB設計処理部1004と、新旧DB対応情報作成処理部1005と、プログラム修正処理部1006とを有し、以下の処理を行う際に、データベースへのアクセスを行う移行前プログラムを磁気ディスク装置から読み出して格納するメモリを備えている。   FIG. 10 is a diagram showing a schematic configuration of the program reuse apparatus of the present embodiment. As shown in FIG. 10, the program reuse apparatus 1000 of this embodiment includes a DB access program identification processing unit 1001, a data / table extraction processing unit 1002, a data structure realization processing unit 1003, and a DB design processing unit 1004. And a new and old DB correspondence information creation processing unit 1005 and a program correction processing unit 1006, and a memory for reading and storing a pre-migration program for accessing a database from the magnetic disk device when performing the following processing. ing.

DBアクセスプログラム特定処理部1001は、データベースへのアクセスを示すプログラム中の記述をメモリ上で検索してデータベースへのアクセスを行うプログラムを特定し、メモリ上のDBアクセス一覧へ格納する処理部である。   The DB access program specifying processing unit 1001 is a processing unit that searches a memory for a description in a program indicating access to a database, specifies a program for accessing the database, and stores it in a DB access list on the memory. .

データ/テーブル抽出処理部1002は、前記特定したプログラムでのデータベースへのアクセスで用いられるデータ及びテーブルの情報をメモリ上の当該プログラムから抽出し、メモリ上のDB関連データ/テーブル一覧へ格納する処理部である。   The data / table extraction processing unit 1002 extracts data and table information used for accessing the database by the specified program from the program on the memory and stores it in the DB related data / table list on the memory Part.

データ構造具現化処理部1003は、前記抽出したデータ及びテーブルの情報の内で類似するデータ及びデーブルをメモリ上で集約し、その情報で用いられているデータの名称及び構造を日本語等の所定の表記やテーブル形式等の所定のデータ構造表現にメモリ上で変換して移行前のデータベースのデータ構造を具現化する処理部である。   The data structure realization processing unit 1003 aggregates similar data and tables in the extracted data and table information on a memory, and sets the name and structure of the data used in the information in a predetermined format such as Japanese. Is a processing unit that realizes the data structure of the database before migration by converting the data into a predetermined data structure expression such as a notation or a table format on the memory.

DB設計処理部1004は、前記具現化した移行前のデータベースのデータ構造から重複するデータ項目を別ファイルとする移行後のデータベースのデータモデルをメモリ上で作成し、そのデータモデルから移行後のデータベースのデータ構造を作成してメモリ中に格納する処理部である。   The DB design processing unit 1004 creates on the memory a data model of the migrated database in which the duplicated data items are separate files from the embodied data structure of the database before migration, and the database after migration from the data model This is a processing unit that creates the data structure of and stores it in the memory.

新旧DB対応情報作成処理部1005は、前記移行前のデータベースのデータ構造と移行後のデータベースのデータ構造とをメモリ上で比較し、それらの対応する情報から新旧DB対応情報を作成してメモリ中に格納する処理部である。   The old and new DB correspondence information creation processing unit 1005 compares the data structure of the database before the migration and the data structure of the database after the migration on the memory, creates the old and new DB correspondence information from the corresponding information, and stores them in the memory. It is a processing part to store in.

プログラム修正処理部1006は、前記プログラム中の移行前のデータベースのデータ及びテーブルの名称を前記作成した新旧DB対応情報に従って移行後のデータベースのデータ及びテーブルの名称に修正して磁気ディスク装置等の記憶装置中に格納する処理部である。   The program correction processing unit 1006 corrects the database data and table names before migration in the program to the database data and table names after migration according to the created new and old DB correspondence information, and stores them in a magnetic disk device or the like. A processing unit stored in the apparatus.

プログラム再利用装置1000をDBアクセスプログラム特定処理部1001、データ/テーブル抽出処理部1002、データ構造具現化処理部1003、DB設計処理部1004、新旧DB対応情報作成処理部1005及びプログラム修正処理部1006として機能させる為のプログラムは、CD−ROM等の記録媒体に記録され磁気ディスク等に格納された後、メモリにロードされて実行されるものとする。なお前記プログラムを記録する記録媒体はCD−ROM以外の他の記録媒体でも良い。また前記プログラムを当該記録媒体から情報処理装置にインストールして使用しても良いし、ネットワークを通じて当該記録媒体にアクセスして前記プログラムを使用するものとしても良い。   The program reuse apparatus 1000 includes a DB access program identification processing unit 1001, a data / table extraction processing unit 1002, a data structure realization processing unit 1003, a DB design processing unit 1004, an old and new DB correspondence information creation processing unit 1005, and a program correction processing unit 1006. It is assumed that a program for functioning as a program is recorded in a recording medium such as a CD-ROM and stored in a magnetic disk, and then loaded into a memory and executed. The recording medium for recording the program may be a recording medium other than the CD-ROM. The program may be used by installing it from the recording medium into the information processing apparatus, or the program may be used by accessing the recording medium through a network.

本実施形態のプログラム再利用装置1000は、データベース関係のプログラムの移行処理が発生した場合にDB関係プログラムの移行作業を開始し、ステップ101でDBアクセスプログラム特定処理部1001は、移行作業の行われる全プログラムを対象としてメモリ上に格納し、そのプログラム中にデータベースへのアクセスを行う命令、例えばDB呼出し命令が記述されているかどうかを調べてデータベースへのアクセスを実施しているかを判定し、データベースへのアクセスがある場合に、そのプログラムの名称等の識別情報をDBアクセスプログラム一覧へ登録する。   The program reuse apparatus 1000 according to the present embodiment starts a DB-related program migration work when a database-related program migration process occurs. In step 101, the DB access program identification processing unit 1001 performs the migration work. All the programs are stored in the memory, and it is determined whether or not an instruction for accessing the database, for example, a DB call instruction is described in the program, and whether or not the database is accessed is determined. When there is access to the database, identification information such as the name of the program is registered in the DB access program list.

ステップ102でデータ/テーブル抽出処理部1002は、前記DBアクセスプログラム一覧の情報をもとに該当プログラムのメモリ上への読込を行い、そのプログラムの内部を1行毎にメモリ上で検索してデータベースへのアクセスを実行している箇所、例えばDB呼出し命令の箇所であるかを判定して、データベースへのアクセス箇所である場合には、データベースへのアクセス時に使用しているデータ及びテーブルを抜き出してDB関連データ/テーブル一覧に登録する。   In step 102, the data / table extraction processing unit 1002 reads the corresponding program into the memory on the basis of the information in the DB access program list, searches the memory for the inside of the program line by line in the database. It is determined whether it is the location where the access to the database is executed, for example, the location of the DB call instruction, and if it is the location where the database is accessed, the data and table used when accessing the database are extracted. Register in DB related data / table list.

次にステップ103でデータ構造具現化処理部1003は、前記DB関連データ/テーブル一覧の内容を読み出して、前記データベースへのアクセスを行う命令が記述されていると特定したプログラム間で類似する類似データ/テーブル、すなわちテーブル中のデータサイズがそれぞれ等しいテーブルが存在するかどうかを調べ、類似データ/テーブルが存在した場合には、類似データ/テーブルの集約を実施し、ある類似テーブルに類似する他のテーブルをその類似テーブルに集約して表現する。そして、テーブル中のデータ項目のアルファベット表記等を対応する日本語表記等に変換して移行前のデータベースのデータ構造を具現化する。   Next, in step 103, the data structure realization processing unit 1003 reads the contents of the DB-related data / table list, and similar data that is similar between programs that are identified as having instructions for accessing the database. / Table, i.e., whether there is a table with the same data size in each table, if similar data / table exists, aggregation of similar data / table is performed, and another similar to a certain similar table is performed. The table is expressed in a similar table. Then, the data structure of the database before migration is realized by converting the alphabetical representation of the data items in the table into the corresponding Japanese representation.

ステップ104でDB設計処理部1004は、前記具現化したデータ構造からそれぞれのデータを分離して各データを比較し、移行前のデータベースのデータ構造間で重複するデータ項目を抽出して別のファイルを新規に作成してまとめた後、その別ファイルを含む移行後のデータモデルを作成する。そして移行後のデータモデルと移行前のデータ構造の情報から、移行後のデータベースのデータ構造を作成する。例えば移行前の受注ファイルと顧客ファイルとで商品に関するデータ項目が重複していた場合、その商品のデータ項目を商品ファイルとしてまとめた後、受注ファイル、顧客ファイル及び商品ファイルからなる移行後のデータモデルを作成する。そして移行前の受注ファイルと顧客ファイルで重複していたデータ項目から移行後の商品ファイルのデータ構造を作成し、移行前の受注ファイルと顧客ファイルから重複するデータ項目を除いて移行後の受注ファイルと顧客ファイルのデータ構造を作成する。   In step 104, the DB design processing unit 1004 separates each data from the embodied data structure, compares each data, extracts data items that overlap between the data structures of the database before migration, and creates another file. After creating and summarizing, create a data model after migration that includes the separate files. Then, the data structure of the database after migration is created from the data model after migration and the data structure information before migration. For example, if data items related to products are duplicated in the order file and customer file before migration, after the data items of the product are collected as product files, the data model after migration consisting of the order file, customer file, and product file Create Then, create the data structure of the migrated product file from the data items that were duplicated in the order file and customer file before migration, and remove the duplicate data items from the order file and customer file before migration. And create customer file data structure.

ステップ105で新旧DB対応情報作成処理部1005は、移行前のデータベースの受注ファイル等のデータ構造と、移行後のデータベースの受注ファイル、商品ファイル及び顧客ファイル等のデータ構造とをメモリ上で比較し、それらを対応付けた新旧DB対応情報、例えば旧DBデータ構造の受注ファイルと、新DBデータ構造の受注ファイル、商品ファイル及び顧客ファイルとを対応付けた新旧DB対応情報を作成する。   In step 105, the new / old DB correspondence information creation processing unit 1005 compares the data structure of the order file of the database before migration with the data structure of the order file, product file, customer file, etc. of the database after migration on the memory. Then, the old and new DB correspondence information in which they are associated, for example, the old and new DB correspondence information in which the order file having the old DB data structure, the order file, the product file and the customer file having the new DB data structure are associated with each other is created.

ステップ106でプログラム修正処理部1006は、データ/テーブル集約情報の関連データ/テーブル名の情報に登録されているプログラム名から該当するプログラムを開き、関連データ/テーブル名に登録されているデータまたはテーブル名から修正箇所を検索した後、その検索した箇所の変更後のテーブルの内容について、データ/テーブル集約情報の集約後の名称から新旧DB対応情報の旧DBデータ構造を検索し、更にその検索した旧DBデータ構造に対応する新DBデータ構造を参照して、新DBデータ構造に登録されている新DBデータ構造に対応するデータまたはテーブルを新データ/テーブル構造から検索し、前記修正箇所を前記検索した新データ/テーブル構造に入れ替えて、プログラムの修正処理を行う。   In step 106, the program correction processing unit 1006 opens the corresponding program from the program name registered in the related data / table name information of the data / table aggregation information, and the data or table registered in the related data / table name. After searching for the corrected part from the name, the old DB data structure of the old and new DB correspondence information is searched from the name after aggregation of the data / table aggregate information for the contents of the table after the change of the searched part, and the search is further performed. Referring to the new DB data structure corresponding to the old DB data structure, the data or table corresponding to the new DB data structure registered in the new DB data structure is searched from the new data / table structure, and the corrected portion is The program is corrected by replacing the searched new data / table structure.

図2は本実施形態のDBアクセスプログラム特定処理の処理手順を示すフローチャートである。図2では図1のステップ101でデータベースにアクセスしているプログラムを特定する処理の一例を表している。   FIG. 2 is a flowchart showing the processing procedure of the DB access program specifying processing of this embodiment. FIG. 2 shows an example of processing for specifying a program accessing a database in step 101 of FIG.

ステップ101でDBアクセスプログラム特定処理を開始すると、ステップ201でDBアクセスプログラム特定処理部1001は、移行作業の行われる全プログラムを対象として読み込みを開始し、磁気ディスク装置等に格納されているプログラムを読み込んでメモリ上に格納する。   When the DB access program specifying process is started in step 101, the DB access program specifying processing unit 1001 starts reading all programs to be migrated in step 201, and loads the programs stored in the magnetic disk device or the like. Read and store in memory.

ステップ202では、前記メモリ上に格納されたプログラム中にデータベースへのアクセスを行う命令が記述されているかどうかを調べてデータベースへのアクセスを実施しているかを判定し、データベースへのアクセスがある場合(ステップ202:YES)にはステップ203へ進み、ステップ203では、プログラムの名称等、当該プログラムを識別する為の情報をDBアクセスプログラム一覧へ登録する処理を行う。   In step 202, it is determined whether or not the database is accessed by checking whether or not an instruction for accessing the database is described in the program stored in the memory. In step 202, the process proceeds to step 203. In step 203, information for identifying the program, such as the name of the program, is registered in the DB access program list.

ステップ202で判定した結果、そのプログラム中にデータベースへのアクセスが無い場合(ステップ202:NO)には何も処理を行わずにステップ204へ進み、ステップ203でのDBアクセスプログラム一覧への登録が終了した場合もステップ204に進む。   If the result of determination in step 202 is that there is no access to the database in the program (step 202: NO), no processing is performed and processing proceeds to step 204, and registration in the DB access program list in step 203 is performed. Also when the process is completed, the process proceeds to step 204.

ステップ204では、まだ読み込みを行ってないプログラムが残っているかどうかを判定し、読み込みを行ってないプログラムが残っている場合(ステップ204:NO)にはステップ201のプログラム読込へと戻る。読み込みを行ってないプログラムが残っていない場合(ステップ204:YES)にはステップ205へ進み、DBアクセスプログラム一覧を磁気ディスク装置等のファイルに出力し、DBアクセスプログラム特定処理を終了する。   In step 204, it is determined whether or not there is a program that has not been read yet. If there is a program that has not been read yet (step 204: NO), the program returns to step 201. If there is no program that has not been read (step 204: YES), the process proceeds to step 205, the DB access program list is output to a file such as a magnetic disk device, and the DB access program specifying process is terminated.

図3は本実施形態のプログラム単位のデータ/テーブル抽出処理の処理手順を示すフローチャートである。図3では図1のステップ102でデータベースに関係しているデータ及びテーブルを抽出する処理手順の一例を表している。   FIG. 3 is a flowchart showing a processing procedure of data / table extraction processing in units of programs according to this embodiment. FIG. 3 shows an example of a processing procedure for extracting data and tables related to the database in step 102 of FIG.

ステップ102でプログラム単位のデータ/テーブル抽出処理が開始されると、ステップ301でデータ/テーブル抽出処理部1002は、ステップ101のDBアクセスプログラム特定処理のステップ205で作成したDBアクセスプログラム一覧の情報をもとに該当プログラムのメモリ上への読込を開始する。   When the data / table extraction processing for each program is started in step 102, the data / table extraction processing unit 1002 in step 301 obtains the DB access program list information created in step 205 of the DB access program specifying processing in step 101. Start reading the program into the memory.

ステップ302では、前記読み込んだプログラムの内部を1行毎にメモリ上で検索してデータベースへのアクセスを実行している箇所であるかを判定する。データベースへのアクセス箇所である場合(ステップ302:YES)にはステップ303へ進み、データベースへのアクセス時に使用しているデータ及びテーブルを抜き出してDB関連データ/テーブル一覧に登録する。   In step 302, the inside of the read program is searched on the memory line by line, and it is determined whether or not it is a location where access to the database is executed. If it is an access location to the database (step 302: YES), the process proceeds to step 303, where the data and tables used when accessing the database are extracted and registered in the DB related data / table list.

ステップ302で判定した結果、データベースへのアクセスが無い場合(ステップ302:NO)には、何も処理をせずにステップ304へ進み、ステップ303でのDB関連データ/テーブル一覧へ登録が終了した場合もステップ304に進む。   If the result of determination in step 302 is that there is no access to the database (step 302: NO), the process proceeds to step 304 without any processing, and the registration to the DB related data / table list in step 303 is completed. In this case, the process proceeds to step 304.

ステップ304では、ステップ302で検索した行がそのプログラムの最終行であるかどうかを判定し、最終行ではない場合(ステップ304:NO)にはステップ302のDBアクセス実行箇所の検索処理へと戻り、プログラムが最終行であった場合(ステップ304:YES)には、ステップ305へ進む。   In step 304, it is determined whether or not the line searched in step 302 is the last line of the program. If it is not the last line (step 304: NO), the process returns to the DB access execution location search process in step 302. If the program is the last line (step 304: YES), the process proceeds to step 305.

ステップ305では、DBアクセスプログラム一覧に登録されたプログラムのデータ及びテーブル抽出処理が全て終了したかを判定する。該当プログラムが残っている場合(ステップ305:NO)には、ステップ301の該当プログラム読込処理へと戻り、該当プログラムが残っていない場合(ステップ305:YES)には、ステップ306でDB関連データ/テーブル一覧をファイルに出力し、プログラム単位のデータ/テーブル抽出処理を終了する。   In step 305, it is determined whether all the program data and table extraction processing registered in the DB access program list have been completed. If the corresponding program remains (step 305: NO), the process returns to the corresponding program reading process in step 301. If the corresponding program does not remain (step 305: YES), the DB related data / The table list is output to a file, and the program / data extraction process is terminated.

図4は本実施形態のDBアクセス箇所の判定とDB関連データ/テーブル一覧への登録の具体例を示す図である。図4では図3のステップ302におけるDBアクセス箇所の判定方法とステップ303のDB関連データ/テーブル一覧への登録方法の一例を表している。   FIG. 4 is a diagram showing a specific example of DB access location determination and DB related data / table list registration according to this embodiment. FIG. 4 shows an example of the DB access location determination method in step 302 in FIG. 3 and the DB related data / table list registration method in step 303.

本実施形態のデータ/テーブル抽出処理部1002は、プログラム例400を読み込み、ステップ302のDBアクセス箇所判定処理を行うと、データベースへのアクセスを行う命令、例えばDBアクセス実行箇所401のDB呼出し命令を検索してDBアクセス箇所であると判定する。   When the data / table extraction processing unit 1002 of the present embodiment reads the program example 400 and performs the DB access location determination processing in step 302, an instruction to access the database, for example, a DB call command of the DB access execution location 401 is issued. The database is searched and determined to be a DB access location.

次にステップ303のDB関連データ/テーブル一覧への登録処理では、データベースへのアクセスを実施しているDBアクセス実行箇所401のDB呼出し命令からDBアクセステーブル402として「JYUTYU-FILE」を抜き出し、DBアクセステーブル402「JYUTYU-FILE」の定義部からDBアクセス関連テーブル403を抽出して、DB関連データ/テーブル一覧へプログラム名404と共に登録する。   Next, in the DB related data / table list registration process in step 303, “JYUTYU-FILE” is extracted as the DB access table 402 from the DB call instruction at the DB access execution location 401 that is accessing the database, and the DB The DB access related table 403 is extracted from the definition part of the access table 402 “JYUTYU-FILE” and registered in the DB related data / table list together with the program name 404.

図5は本実施形態のデータ構造具現化での類似データ及びテーブルの集約化の具体例を示す図である。図5では、図1のステップ103のデータ構造具現化処理で実施する類似データ及びテーブルを集約化する処理の一例を表している。   FIG. 5 is a diagram showing a specific example of aggregation of similar data and tables in the realization of the data structure of this embodiment. FIG. 5 shows an example of a process for aggregating similar data and tables implemented in the data structure realization process in step 103 of FIG.

ステップ103でデータ構造具現化処理部1003は、ステップ306で出力したDB関連データ/テーブル一覧の内容をファイルから読み出して類似データ/テーブル、すなわちテーブル中のデータサイズがそれぞれ等しいテーブルが存在するかどうかを調べる。図5の例では、類似テーブルA501のデータ項目、J-CODE、J-SYOHIN-CODE、J-SYOHINMEI、J-KAKAKU…が、PIC X(4)、PIC X(4)、PIC X(40)、PIC X(9)…と定義され、類似テーブルB502のデータ項目、J-CODE、J-SCODE、J-NAMAEI、J-KINGAKU…が、PIC X(4)、PIC X(4)、PIC X(40)、PIC X(9)…と定義されており、括弧内のデータサイズが等しいことからこれらが類似データ/テーブルであることが判る。   In step 103, the data structure realization processing unit 1003 reads the contents of the DB-related data / table list output in step 306 from the file and determines whether there are similar data / tables, that is, tables having the same data size. Check out. In the example of FIG. 5, the data items of the similar table A501, J-CODE, J-SYOHIN-CODE, J-SYOHINMEI, J-KAKAKU ... are PIC X (4), PIC X (4), and PIC X (40). , PIC X (9) ... and the data items of similar table B502, J-CODE, J-SCODE, J-NAMAEI, J-KINGAKU ... are PIC X (4), PIC X (4), PIC X (40), PIC X (9)... And since the data sizes in parentheses are equal, it can be seen that these are similar data / tables.

類似テーブルA501と類似テーブルB502の様に類似データ/テーブルが存在した場合には、類似データ/テーブルの集約507の処理を実施し、類似テーブルA501に類似する他のテーブルを類似テーブルA501に集約して表現して、データ/テーブル集約情報508とデータ/テーブル集約結果511を作成する。   When similar data / tables exist like the similar table A501 and the similar table B502, the processing of the similar data / table aggregation 507 is performed, and other tables similar to the similar table A501 are aggregated in the similar table A501. The data / table aggregation information 508 and the data / table aggregation result 511 are created.

データ/テーブル集約情報508は、集約後の名称509と関連データ/テーブル名510の情報を登録できる様にしており、集約後の名称509にはデータ/テーブル集約結果511の集約テーブル513で定義している集約テーブル名512を登録し、関連データ/テーブル名510には集約テーブル名512に関連しているプログラム名A503とデータ/テーブル名A505、集約された類似テーブルB502のプログラム名B504とデータ/テーブル名B506等をそれぞれ登録する。   The data / table aggregation information 508 is configured so that information on the name 509 after aggregation and related data / table name 510 can be registered. The name 509 after aggregation is defined in the aggregation table 513 of the data / table aggregation result 511. The related data / table name 510 is registered in the related data / table name 510, the program name A503 and the data / table name A505 related to the aggregate table name 512, and the program name B504 and the data / table / name of the aggregated similar table B502. The table name B506 and the like are registered respectively.

図6は本実施形態のデータ構造具現化における具現化の具体例を示す図である。図6では、図1のステップ103のデータ構造具現化処理における移行前のデータベースのデータ構造の具現化の一例を表している。   FIG. 6 is a diagram showing a specific example of realization in the data structure realization of the present embodiment. FIG. 6 shows an example of the realization of the data structure of the database before migration in the data structure realization process in step 103 of FIG.

ステップ103でデータ構造具現化処理部1003は、データ/テーブル集約結果511のテーブル情報A601から、テーブルの構造をそのまま具体的な名称に置き換えてデータの構造を可視化したデータ構造A603を作成する。テーブル情報B602についても同様に具体的な名称に置き換えてデータ構造を可視化したデータ構造Bを作成する。この様な手順でデータ/テーブル集約結果511のデータ及びテーブルを全て具体的な名称に置き換えデータ構造を可視化する。   In step 103, the data structure realization processing unit 1003 creates a data structure A 603 by visualizing the data structure by replacing the table structure with a specific name as it is from the table information A 601 of the data / table aggregation result 511. Similarly, the table information B602 is replaced with a specific name to create a data structure B that visualizes the data structure. In such a procedure, all data and tables in the data / table aggregation result 511 are replaced with specific names to visualize the data structure.

図6の例では、テーブル情報A601のデータ項目、J-CODE、J-SYOHIN-CODE、J-SYOHINMEI、J-KAKAKU…を、対応する日本語表記である受注コード、商品コード、商品名、価格…の様に変換してテーブル表現のデータ構造A603を作成する。その際、J-SURYOU、JS-JYUTYU、JS-ZAIKOの様に、データ項目J-SURYOUの下位にJS-JYUTYU及びJS-ZAIKOが定義されている場合には、数量の下位に受注及び在庫数を配置したテーブル表現を用いてそのデータ構造を示すものとする。なお各データ項目に対応する日本語表記はそのプログラム作成時に予め定義されているものとする。   In the example of FIG. 6, the data items of table information A601, J-CODE, J-SYOHIN-CODE, J-SYOHINMEI, J-KAKAKU ..., the corresponding order code, product code, product name, price in Japanese. The data structure A603 of table expression is created by converting as shown in FIG. At that time, if JS-JYUTYU and JS-ZAIKO are defined under the data item J-SURYOU, such as J-SURYOU, JS-JYUTYU, and JS-ZAIKO, the orders and the number of stocks are subordinate to the quantity. It is assumed that the data structure is shown using a table expression in which is placed. Note that the Japanese notation corresponding to each data item is defined in advance when the program is created.

図7は本実施形態のDB設計処理の具体例を示す図である。図7では、図1のステップ104のDB設計処理におけるデータベースの設計を実施する処理の一例を表している。   FIG. 7 is a diagram showing a specific example of the DB design processing of this embodiment. FIG. 7 shows an example of processing for designing a database in the DB design processing in step 104 of FIG.

ステップ104でDB設計処理部1004は、ステップ103のデータ構造具現化で可視化したデータ構造からそれぞれのデータを分離して関連を示す既存データ構造701を作成する。具体例として示した受注ファイル702と顧客ファイル703の各データを比較すると、受注ファイル702の顧客コード704と顧客ファイル703の顧客コード705とが同じで、受注ファイル702の商品コード706、商品名707及び価格708と、顧客ファイル703の注文商品726の下にある商品コード710、商品名711及び価格712とがそれぞれ同じ内容であり、情報として重複している。   In step 104, the DB design processing unit 1004 creates an existing data structure 701 indicating the relationship by separating each data from the data structure visualized in the data structure realization in step 103. When comparing the data in the order file 702 and the customer file 703 shown as specific examples, the customer code 704 in the order file 702 and the customer code 705 in the customer file 703 are the same, and the product code 706 and the product name 707 in the order file 702 are the same. And the price 708, the product code 710, the product name 711, and the price 712 under the ordered product 726 in the customer file 703 have the same contents, and are duplicated as information.

DB設計処理部1004は、前記具現化した移行前のデータベースのデータ構造から得られる既存データ構造701のデータ項目をメモリ上で比較し、重複するデータ項目を抽出する。その際、下位のデータを持つ項目については、下位のデータも含めて重複するかどうかを判定するものとし、例えば受注ファイル702の数量722と顧客ファイルの数量730は項目名が同じであるが、数量722は下位に受注723と在庫数720を持つので、数量722と数量730は重複していないものと判定する。   The DB design processing unit 1004 compares the data items of the existing data structure 701 obtained from the embodied data structure of the database before migration on the memory, and extracts duplicate data items. At this time, for items having lower data, it is determined whether there is duplication including lower data. For example, the quantity 722 in the order file 702 and the quantity 730 in the customer file have the same item name. Since the quantity 722 has the order 723 and the inventory quantity 720 in the lower order, it is determined that the quantity 722 and the quantity 730 do not overlap.

更にDB設計処理部1004は、そのデータ項目の示す内容が同じであるかどうかを判定する様にしても良い。例えば受注ファイル702の数量722の下には受注723があり、これは顧客ファイル703の注文商品726の数量730と同様の意味を持つことが判る。このことから、受注ファイル702には顧客ファイル703の顧客コード705と顧客ファイル703の注文商品726の情報が必要なことが判る。ここで、本願発明では、データ項目の示す内容が同じであるかどうかを判定する為のテーブルが予め用意されており、そのテーブルの情報に従って前記判定を行うものとする。   Further, the DB design processing unit 1004 may determine whether or not the contents indicated by the data item are the same. For example, there is an order 723 under the quantity 722 in the order file 702, and it is understood that this has the same meaning as the quantity 730 of the order item 726 in the customer file 703. From this, it can be seen that the order file 702 needs information on the customer code 705 in the customer file 703 and the order product 726 in the customer file 703. Here, in the present invention, a table for determining whether or not the contents indicated by the data items are the same is prepared in advance, and the determination is performed according to the information in the table.

前記の様にして抽出した重複している商品の情報を、別のファイルである商品ファイル715を新規に作成してまとめると、受注ファイル702と顧客ファイル703と商品ファイル715の関係はデータモデル714の様に示すことができる。この様な流れでDB設計処理部1004は、データモデル714と既存データ構造701の情報から、新DB構造716を設計する。新DB構造716については顧客ファイル717と商品ファイル718と受注ファイル719で構成することができ、これはそれぞれデータモデル714の、顧客ファイル703、商品ファイル715、受注ファイル702を元に作成する。   When the information on the duplicated products extracted as described above is newly created as a separate product file 715, the relationship between the order file 702, the customer file 703, and the product file 715 is the data model 714. It can be shown as follows. In this flow, the DB design processing unit 1004 designs a new DB structure 716 from the information of the data model 714 and the existing data structure 701. The new DB structure 716 can be composed of a customer file 717, a product file 718, and an order file 719, which are created based on the customer file 703, product file 715, and order file 702 of the data model 714, respectively.

すなわちDB設計処理部1004は、顧客ファイル717について、既存データ構造701の受注ファイル702の顧客コード704を集約した顧客コード(主キー)731、既存データ構造701にある顧客ファイル703の顧客名724、既存データ構造701にある顧客ファイル703の顧客情報725の住所727、電話番号728、FAX番号729で構成する。   That is, for the customer file 717, the DB design processing unit 1004 collects the customer code (primary key) 731 of the customer code 704 of the order file 702 of the existing data structure 701, the customer name 724 of the customer file 703 in the existing data structure 701, It consists of an address 727, a telephone number 728, and a FAX number 729 of the customer information 725 in the customer file 703 in the existing data structure 701.

ここで、新DB構造716のデータ項目を決定する際には、既存データ構造701にあるファイルへのアクセスを行うプログラム中の処理内容を検索し、そのプログラム中で用いられないデータ項目を省く様にしても良い。例えば、顧客ファイル717には注文商品726に該当するデータ項目が含まれていないが、これは既存データ構造701にある顧客ファイル703へのアクセスを行うプログラム中に、注文商品726のデータを用いた処理部分が無い場合の例を示している為であり、注文商品726のデータを用いた処理部分が当該プログラム中に存在する場合には、受注コードを外部キーとして顧客ファイル717に含めるものとする。   Here, when determining the data items of the new DB structure 716, the processing contents in the program that accesses the file in the existing data structure 701 are searched, and the data items that are not used in the program are omitted. Anyway. For example, the customer file 717 does not include a data item corresponding to the order product 726. This is because the data of the order product 726 is used in the program for accessing the customer file 703 in the existing data structure 701. This is to show an example in the case where there is no processing part. When the processing part using the data of the ordered product 726 exists in the program, the order code is included in the customer file 717 as an external key. .

また商品ファイル718については、既存データ構造701にある受注ファイル702の商品コード706と顧客ファイル703の注文商品726の商品コード710を集約した商品コード(主キー)732、受注ファイル702の商品名707と顧客ファイル703の注文商品726の商品名711を集約した商品名733、受注ファイル702の価格708と顧客ファイル703の注文商品726の価格712を集約した価格734、商品のみに該当する情報である在庫数720で構成する。   As for the product file 718, a product code (primary key) 732 in which the product code 706 of the order file 702 in the existing data structure 701 and the product code 710 of the order product 726 in the customer file 703 are aggregated, and the product name 707 of the order file 702. And the product name 733 in which the product names 711 of the order products 726 in the customer file 703 are aggregated, the price 708 in the order file 702 in the customer file 703 and the price 734 in which the prices 712 of the order products 726 in the customer file 703 are aggregated. It consists of a stock quantity of 720.

受注ファイル719については、既存データ構造701の受注ファイル702の受注コード721をそのまま主キーとし、受注ファイル702の商品コード706、商品名707、価格708については、商品ファイル718の商品コード(主キー)732を商品コード(外部キー)735として指定することで商品ファイルの情報をいつでも引き出せる様に設定、受注ファイル702の顧客コード704については、顧客ファイル717の顧客コード(主キー)731を顧客コード(外部キー)736として指定することで商品ファイルの情報をいつでも引き出せる様に設定、受注ファイル702の数量722の受注723と顧客ファイル703の注文商品726の数量730を集約した数量737、受注ファイル702の納期709を示す納期738で構成する。   For the order file 719, the order code 721 of the order file 702 of the existing data structure 701 is used as the main key, and the product code 706, the product name 707, and the price 708 of the order file 702 are the product code (primary key) of the product file 718. ) By specifying 732 as the product code (external key) 735, the product file information is set so that it can be retrieved at any time. For the customer code 704 of the order file 702, the customer code (primary key) 731 of the customer file 717 is the customer code. (External key) 736 is set so that product file information can be withdrawn at any time. Order quantity 737 in which order 723 of quantity 722 in order file 702 and quantity 730 of order product 726 in customer file 703 are aggregated, order file 702 Shows the delivery date 709 Composed of a delivery time 738.

ここで、新DB構造716のデータ項目を決定する際に、ユーザからの指示を受け付けて内容を変更する様にしても良い。例えば、受注ファイル702の在庫数720は受注ファイル719ではなく商品ファイル718に入れてあるが、在庫数については受注時以外の商品情報の照会等の際にも用いられる情報であり、ユーザからの指示により在庫数720を商品ファイル718に含める様に変更した例を示している為である。   Here, when the data item of the new DB structure 716 is determined, the content may be changed by receiving an instruction from the user. For example, although the stock quantity 720 of the order file 702 is stored in the product file 718 instead of the order file 719, the stock quantity is information that is also used when inquiring product information other than at the time of ordering. This is because an example in which the stock quantity 720 is changed to be included in the product file 718 according to the instruction is shown.

図8は本実施形態の新旧DB対応情報作成処理の具体例を示す図である。図8では、図1のステップ105の新旧DB対応情報作成処理における新旧のデータベースの対応情報を作成する処理の一例を表している。   FIG. 8 is a diagram showing a specific example of the new and old DB correspondence information creation processing of this embodiment. FIG. 8 shows an example of processing for creating correspondence information of old and new databases in the new and old DB correspondence information creation processing in step 105 of FIG.

図1のステップ104のDB設計処理で新データベースの構造設計を行ったので、データ構造A603は図7の新DB構造716の情報を元にして新データ構造を検討すると新データ構造A801(受注ファイル)、新データ構造B802(商品ファイル)、新データ構造C803(顧客ファイル)の3つのデータ構造から成り立つことになる。   Since the structure design of the new database has been performed in the DB design process in step 104 of FIG. 1, the data structure A 603 is a new data structure A 801 (order file) when the new data structure is examined based on the information of the new DB structure 716 of FIG. ), A new data structure B 802 (product file), and a new data structure C 803 (customer file).

ステップ105で新旧DB対応情報作成処理部1005は、移行前のデータベースのデータ構造であるデータ構造A603と、移行後のデータベースのデータ構造である新データ構造A801、新データ構造B802、新データ構造C803とをメモリ上で比較し、新旧DB対応情報804として、旧DBデータ構造805と新DBデータ構造806を持たせ、新旧のデータベースに対応する情報をメモリ上に格納して管理する。具体的な登録情報としては、旧DBデータ構造805にデータ構造A603(受注ファイル)の情報を登録し、新DBデータ構造806に、データ構造A603に対応する新データ構造A801(受注ファイル)、新データ構造B802(商品ファイル)、新データ構造C803(顧客ファイル)の情報を登録して、一つの対応情報807とする。   In step 105, the new / old DB correspondence information creation processing unit 1005 creates a data structure A603 that is the data structure of the database before migration, a new data structure A801 that is the data structure of the database after migration, a new data structure B802, and a new data structure C803. And the old DB data structure 805 and the new DB data structure 806 as the old and new DB correspondence information 804, and information corresponding to the old and new databases is stored and managed on the memory. As specific registration information, information on the data structure A603 (order file) is registered in the old DB data structure 805, and a new data structure A801 (order file) corresponding to the data structure A603 is registered in the new DB data structure 806. The information of the data structure B 802 (product file) and the new data structure C 803 (customer file) is registered as one correspondence information 807.

図9は本実施形態のプログラム修正処理の具体例を示す図である。図9では、図1のステップ106のプログラム修正処理におけるプログラムの修正処理の一例を表している。   FIG. 9 is a diagram showing a specific example of the program correction process of the present embodiment. FIG. 9 shows an example of a program correction process in the program correction process in step 106 of FIG.

ステップ106でプログラム修正処理部1006は、プログラム例400を修正後プログラム例907に修正する為に、プログラム修正情報901を用いる。プログラム修正情報901は、プログラムを修正する為に必要な情報で、図1のステップ103のデータ構造具現化の作業で作成したデータ/テーブル集約情報508、図1のステップ105の新旧DB対応情報作成処理の作業で作成した新旧DB対応情報804、図8の新データ構造A801(受注ファイル)、新データ構造B802(商品ファイル)、新データ構造C803(顧客ファイル)の情報をもとに作成した新データ/テーブル構造902を用いる。   In step 106, the program correction processing unit 1006 uses the program correction information 901 to correct the program example 400 to the corrected program example 907. The program modification information 901 is information necessary for modifying the program. The data / table aggregation information 508 created in the data structure implementation work in step 103 in FIG. 1 and the old and new DB correspondence information creation in step 105 in FIG. New and old DB correspondence information 804 created in the processing operation, new data structure A 801 (order file), new data structure B 802 (product file) and new data structure C 803 (customer file) in FIG. A data / table structure 902 is used.

具体的な修正作業では、まずデータ/テーブル集約情報508の関連データ/テーブル名510の情報に登録されているプログラム名から該当するプログラム(プログラム例400)を開き、関連データ/テーブル名510に登録されているデータまたはテーブル名から、修正箇所903を検索する。   In specific correction work, first, the program (example program 400) is opened from the program name registered in the related data / table name 510 information of the data / table aggregation information 508 and registered in the related data / table name 510. The correction portion 903 is searched from the data or table name that has been stored.

検索した箇所の変更後のテーブルの内容については、データ/テーブル集約情報508の集約後の名称509から新旧DB対応情報804の旧DBデータ構造805を検索し(904)、更にその検索した旧DBデータ構造805に対応する新DBデータ構造806を参照して、新DBデータ構造806に登録されている新DBデータ構造に対応するデータまたはテーブルを新データ/テーブル構造902から検索する(905)。修正箇所903を前記検索した新データ/テーブル構造902に入れ替え、またデータベースの呼び出し箇所の修正については入れ替えたテーブル数に合わせて実施する(906)。またプログラム中の処理部分で、データベースの呼び出し箇所以外で使われている各データ項目及びテーブルについても、前記の様にして変更したデータ項目及びテーブルの名称に全て変換してプログラムの修正作業を実施し、磁気ディスク装置等の記憶装置中に格納する。   As for the contents of the table after the change of the searched part, the old DB data structure 805 of the new / old DB correspondence information 804 is searched from the name 509 after the data / table aggregation information 508 is aggregated (904), and the old DB that has been retrieved is further retrieved. With reference to the new DB data structure 806 corresponding to the data structure 805, data or a table corresponding to the new DB data structure registered in the new DB data structure 806 is searched from the new data / table structure 902 (905). The correction part 903 is replaced with the searched new data / table structure 902, and the correction of the calling part of the database is performed according to the number of the replaced tables (906). Also, in the processing part of the program, each data item and table used outside the database call location is also converted to the data item and table name changed as described above, and the program is modified. And stored in a storage device such as a magnetic disk device.

前記の様に本実施形態によれば、メインフレームシステムのプログラム再利用によるオープンシステム移行においてデータベースの構造が変わったとしても、プログラム中で使用するデータ項目は変わらないことに着目し、データベースに関係するデータ項目及びデータを抽出してその情報から新しいデータベースの設計を行うので、移行後のシステムで使用するデータ及びテーブルが既存のシステムのデータとテーブル情報と近い状態にすることができ、プログラムの再利用を効率良く実現することができる。また、移行後のプログラムで使用するデータ及びテーブルを、移行前のプログラムのデータ及びテーブル形式に近い形で作成することができ、DBアクセス実行箇所401やDBアクセス関連テーブル403の検索時に修正箇所を把握しておくことにより、修正作業を新旧のデータベースに関係するデータ及びテーブルの対応情報から自動的に行うことができるため、データ構造の変更が発生した場合でもプログラムの再利用を効率良く実現することができる。   As described above, according to this embodiment, even if the structure of the database is changed in the open system migration by reusing the program of the mainframe system, the data items used in the program are not changed, and Data items and data to be extracted and the new database is designed from that information, so that the data and tables used in the migrated system can be brought close to the existing system data and table information. Reuse can be realized efficiently. In addition, data and tables used in the program after migration can be created in a form similar to the data and table format of the program before migration, and correction points can be found when searching the DB access execution location 401 or the DB access related table 403. By knowing it, it is possible to automatically perform correction work from the data and table correspondence information related to the old and new databases, so that the program can be reused efficiently even if the data structure changes. be able to.

なお本実施形態では、図1に示したDB関係プログラムの移行作業の手順として、まずステップ101のDBアクセスプログラム特定処理を実施し、次にステップ102のプログラム単位のデータ/テーブル抽出処理を実施する方法を示したが、データベースにアクセスしているプログラムの特定を行った際に、そのプログラムでデータベースにアクセスしているデータ及びテーブルを抽出しても良い。この方法では、プログラムを調査するのは1回で済むため、プログラムの検索処理を減少させて効率を向上させることができる。   In the present embodiment, as a procedure for the migration process of the DB-related program shown in FIG. 1, first, the DB access program specifying process of Step 101 is performed, and then the data / table extraction process of the program unit of Step 102 is performed. Although the method is shown, when the program accessing the database is specified, the data and table accessing the database may be extracted by the program. In this method, since the program needs to be investigated only once, the program search process can be reduced and the efficiency can be improved.

また本実施形態のプログラムの修正では、新データ/テーブル構造902のデータ名及びテーブル名をそのまま使う例を挙げたが、接頭語及び接尾語の情報を作成しておき、該当するデータ及びテーブルを修正する際に、前記作成した接頭語または接尾語を付ける指定を行うことも可能である。   In the modification of the program of the present embodiment, an example is given in which the data name and table name of the new data / table structure 902 are used as they are. However, the prefix and suffix information is created, and the corresponding data and table are stored. It is also possible to specify that the created prefix or suffix is added when the correction is made.

以上説明した様に本実施形態のプログラム再利用装置によれば、移行前のプログラム中のデータ及びテーブルの情報を基に移行後のデータベースを設計し、その設計したデータベースのデータ及びテーブルの情報に従ってプログラムを修正するので、情報処理装置間での移行を行う際にプログラムの再利用を効率良く行うことが可能である。   As described above, according to the program reuse apparatus of the present embodiment, the database after migration is designed based on the data and table information in the program before migration, and according to the data and table information of the designed database. Since the program is modified, it is possible to efficiently reuse the program when migrating between information processing apparatuses.

本実施形態のプログラム移行処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the program transfer process of this embodiment. 本実施形態のDBアクセスプログラム特定処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of DB access program specific process of this embodiment. 本実施形態のプログラム単位のデータ/テーブル抽出処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the data / table extraction process of the program unit of this embodiment. 本実施形態のDBアクセス箇所の判定とDB関連データ/テーブル一覧への登録の具体例を示す図である。It is a figure which shows the specific example of determination of the DB access location of this embodiment, and registration to DB related data / table list. 本実施形態のデータ構造具現化での類似データ及びテーブルの集約化の具体例を示す図である。It is a figure which shows the specific example of aggregation of the similar data and table by realization of the data structure of this embodiment. 本実施形態のデータ構造具現化における具現化の具体例を示す図である。It is a figure which shows the specific example of realization in data structure realization of this embodiment. 本実施形態のDB設計処理の具体例を示す図である。It is a figure which shows the specific example of DB design processing of this embodiment. 本実施形態の新旧DB対応情報作成処理の具体例を示す図である。It is a figure which shows the specific example of the old and new DB corresponding | compatible information creation process of this embodiment. 本実施形態のプログラム修正処理の具体例を示す図である。It is a figure which shows the specific example of the program correction process of this embodiment. 本実施形態のプログラム再利用装置の概略構成を示す図である。It is a figure which shows schematic structure of the program reuse apparatus of this embodiment.

符号の説明Explanation of symbols

400…プログラム例、401…DBアクセス実行箇所、402…DBアクセステーブル、403…DBアクセス関連テーブル、404…プログラム名、501…類似テーブルA、502…類似テーブルB、503…プログラム名A、504…プログラム名B、505…データ/テーブル名A、506…データ/テーブル名B、507…類似データ/テーブルの集約、508…データ/テーブル集約情報、509…集約後の名称、510…関連データ/テーブル名、511…データ/テーブル集約結果、512…集約テーブル名、513…集約テーブル、601…テーブル情報A、602…テーブル情報B、603…データ構造A、701…既存データ構造、702…受注ファイル、703…顧客ファイル、704…顧客コード、705…顧客コード、706…商品コード、707…商品名、708…価格、709…納期、710…商品コード、711…商品名、712…価格、714…データモデル、715…商品ファイル、716…新DB構造、717…顧客ファイル、718…商品ファイル、719…受注ファイル、720…在庫数、721…受注コード、722…数量、723…受注、724…顧客名、725…顧客情報、726…注文商品、727…住所、728…電話番号、729…FAX番号、730…数量、731…顧客コード(主キー)、732…商品コード(主キー)、733…商品名、734…価格、735…商品コード(外部キー)、736…顧客コード(外部キー)、737…数量、738…納期、801…新データ構造A、802…新データ構造B、803…新データ構造C、804…新旧DB対応情報、805…旧DBデータ構造、806…新DBデータ構造、807…対応情報、901…プログラム修正情報、902…新データ/テーブル構造、903…修正箇所、904…新DBデータ構造の検索、905…新データ/テーブル構造の検索、906…データベース呼び出し箇所の修正、907…修正後プログラム例、1000…プログラム再利用装置、1001…DBアクセスプログラム特定処理部、1002…データ/テーブル抽出処理部、1003…データ構造具現化処理部、1004…DB設計処理部、1005…新旧DB対応情報作成処理部、1006…プログラム修正処理部。
400 ... Program example, 401 ... DB access execution location, 402 ... DB access table, 403 ... DB access related table, 404 ... Program name, 501 ... Similar table A, 502 ... Similar table B, 503 ... Program name A, 504 ... Program name B, 505 ... Data / table name A, 506 ... Data / table name B, 507 ... Similar data / table aggregation, 508 ... Data / table aggregation information, 509 ... Name after aggregation, 510 ... Related data / table Name 511 ... Data / table aggregation result 512 ... Aggregation table name 513 ... Aggregation table, 601 ... Table information A, 602 ... Table information B, 603 ... Data structure A, 701 ... Existing data structure, 702 ... Order file, 703 ... Customer file, 704 ... Customer code, 705 ... Customer Code, 706 ... Product code, 707 ... Product name, 708 ... Price, 709 ... Delivery date, 710 ... Product code, 711 ... Product name, 712 ... Price, 714 ... Data model, 715 ... Product file, 716 ... New DB structure, 717 ... Customer file, 718 ... Product file, 719 ... Order file, 720 ... Stock quantity, 721 ... Order code, 722 ... Quantity, 723 ... Order, 724 ... Customer name, 725 ... Customer information, 726 ... Order product, 727 ... Address, 728 ... Telephone number, 729 ... FAX number, 730 ... Quantity, 731 ... Customer code (primary key), 732 ... Product code (primary key), 733 ... Product name, 734 ... Price, 735 ... Product code (external key) ) 736 ... Customer code (foreign key), 737 ... Quantity, 738 ... Delivery date, 801 ... New data structure A, 802 ... New data structure B, 03 ... New data structure C, 804 ... New and old DB correspondence information, 805 ... Old DB data structure, 806 ... New DB data structure, 807 ... Correspondence information, 901 ... Program modification information, 902 ... New data / table structure, 903 ... Modification Location: 904 ... Search for new DB data structure, 905 ... Search for new data / table structure, 906 ... Correction of database call location, 907 ... Program example after correction, 1000 ... Program reuse device, 1001 ... DB access program identification processing , 1002... Data / table extraction processing unit, 1003... Data structure realization processing unit, 1004... DB design processing unit, 1005.

Claims (5)

情報処理装置間での処理システムの移行の際にプログラムを修正して再利用するプログラム再利用装置におけるプログラム再利用方法であって、
データベースへのアクセスを示すプログラム中の記述を前記プログラム再利用装置内の記憶装置上で検索してデータベースへのアクセスを行うプログラムを特定するステップと、
前記特定したプログラムでのデータベースへのアクセスで用いられるデータ及びテーブルの情報を前記記憶装置上の当該プログラムから抽出するステップと、
前記抽出したデータ及びテーブルの情報で用いられているデータの名称及び構造を所定の表記やデータ構造表現に変換して移行前のデータベースのデータ構造を具現化するステップと、
前記具現化した移行前のデータベースのデータ構造から移行後のデータベースのデータモデルを作成し、そのデータモデルから移行後のデータベースのデータ構造を作成して前記記憶装置に格納するステップと、
前記移行前のデータベースのデータ構造と移行後のデータベースのデータ構造とを対応付ける対応情報を作成して前記記憶装置に格納するステップと、
前記プログラム中の移行前のデータベースのデータ及びテーブルの名称を前記作成した対応情報に従って移行後のデータベースのデータ及びテーブルの名称に修正して前記記憶装置に格納するステップとを有することを特徴とするプログラム再利用方法。
A program reuse method in a program reuse device that corrects and reuses a program when transferring a processing system between information processing devices,
Searching for a description in a program indicating access to a database on a storage device in the program reuse device to identify a program for accessing the database; and
Extracting data and table information used in accessing the database with the specified program from the program on the storage device;
Implementing the data structure of the database before migration by converting the name and structure of the data used in the extracted data and table information into a predetermined notation and data structure representation;
Creating a data model of the database after migration from the data structure of the database before migration embodied, storing the data structure of the database after migration from the data model, and storing in the storage device;
Creating correspondence information associating the data structure of the database before the migration with the data structure of the database after the migration and storing it in the storage device;
A step of correcting the names of the data and tables in the database before migration in the program to the names of the data and tables in the migrated database according to the created correspondence information, and storing them in the storage device. Program reuse method.
前記データベースへのアクセスを行うプログラムを特定するステップで特定した第1のプログラムと第2のプログラムとの間で類似するデータ及びテーブルを集約して前記具現化を行うことを特徴とする請求項1に記載されたプログラム再利用方法。   2. The implementation is performed by aggregating similar data and tables between the first program and the second program identified in the step of identifying a program that accesses the database. The program reuse method described in 1. 前記移行後のデータベースのデータ構造を作成するステップで移行前のデータベースの第1のデータ構造と第2のデータ構造との間で重複するデータ項目を別ファイルとするデータモデルを作成して移行後のデータベースのデータ構造を作成することを特徴とする請求項1または請求項2のいずれかに記載されたプログラム再利用方法。   In the step of creating the data structure of the database after the migration, after creating the data model in which the data items that overlap between the first data structure and the second data structure of the database before the migration are created as separate files 3. The program reuse method according to claim 1, wherein the data structure of the database is created. 情報処理装置間での処理システムの移行の際にプログラムを修正して再利用するプログラム再利用装置において、
データベースへのアクセスを行うプログラムを格納する記憶装置と、
データベースへのアクセスを示すプログラム中の記述を前記記憶装置上で検索してデータベースへのアクセスを行うプログラムを特定するDBアクセスプログラム特定処理部と、
前記特定したプログラムでのデータベースへのアクセスで用いられるデータ及びテーブルの情報を前記記憶装置上の当該プログラムから抽出するデータ/テーブル抽出処理部と、
前記抽出したデータ及びテーブルの情報で用いられているデータの名称及び構造を所定の表記やデータ構造表現に変換して移行前のデータベースのデータ構造を具現化するデータ構造具現化処理部と、
前記具現化した移行前のデータベースのデータ構造から移行後のデータベースのデータモデルを作成し、そのデータモデルから移行後のデータベースのデータ構造を作成して前記記憶装置に格納するDB設計処理部と、
前記移行前のデータベースのデータ構造と移行後のデータベースのデータ構造とを比較し、それらの対応する情報から対応情報を作成して前記記憶装置に格納する新旧DB対応情報作成処理部と、
前記プログラム中の移行前のデータベースのデータ及びテーブルの名称を前記作成した対応情報に従って移行後のデータベースのデータ及びテーブルの名称に修正して前記記憶装置に格納するプログラム修正処理部とを備えることを特徴とするプログラム再利用装置。
In a program reuse device that modifies and reuses a program when a processing system is transferred between information processing devices,
A storage device for storing a program for accessing the database;
A DB access program identification processing unit for identifying a program for accessing the database by searching the storage device for a description in the program indicating access to the database;
A data / table extraction processing unit for extracting data and table information used in accessing the database by the specified program from the program on the storage device;
A data structure realization processing unit that realizes the data structure of the database before migration by converting the name and structure of the data used in the extracted data and table information into a predetermined notation and data structure representation;
Creating a data model of the database after migration from the data structure of the database before migration embodied, and creating a data structure of the database after migration from the data model and storing it in the storage device;
Compare the data structure of the database before the migration and the data structure of the database after the migration, create correspondence information from their corresponding information and store in the storage device the old and new DB correspondence information creation processing unit,
A program correction processing unit that corrects the names of the data and tables in the database before migration in the program to the names of the data and tables in the migrated database according to the created correspondence information, and stores them in the storage device. Feature program reuse device.
情報処理装置間での処理システムの移行の際にプログラムを修正して再利用するプログラム再利用装置におけるプログラム再利用方法をコンピュータに実行させる為のプログラムであって、
データベースへのアクセスを示すプログラム中の記述を前記プログラム再利用装置内の記憶装置上で検索してデータベースへのアクセスを行うプログラムを特定するステップと、
前記特定したプログラムでのデータベースへのアクセスで用いられるデータ及びテーブルの情報を前記記憶装置上の当該プログラムから抽出するステップと、
前記抽出したデータ及びテーブルの情報で用いられているデータの名称及び構造を所定の表記やデータ構造表現に変換して移行前のデータベースのデータ構造を具現化するステップと、
前記具現化した移行前のデータベースのデータ構造から移行後のデータベースのデータモデルを作成し、そのデータモデルから移行後のデータベースのデータ構造を作成して前記記憶装置に格納するステップと、
前記移行前のデータベースのデータ構造と移行後のデータベースのデータ構造とを対応付ける対応情報を作成して前記記憶装置に格納するステップと、
前記プログラム中の移行前のデータベースのデータ及びテーブルの名称を前記作成した対応情報に従って移行後のデータベースのデータ及びテーブルの名称に修正して前記記憶装置に格納するステップとをコンピュータに実行させることを特徴とするプログラム。
A program for causing a computer to execute a program reuse method in a program reuse device that corrects and reuses a program when a processing system is transferred between information processing devices,
Searching for a description in a program indicating access to a database on a storage device in the program reuse device to identify a program for accessing the database; and
Extracting data and table information used in accessing the database with the specified program from the program on the storage device;
Implementing the data structure of the database before migration by converting the name and structure of the data used in the extracted data and table information into a predetermined notation and data structure representation;
Creating a data model of the database after migration from the data structure of the database before migration embodied, storing the data structure of the database after migration from the data model, and storing in the storage device;
Creating correspondence information associating the data structure of the database before the migration with the data structure of the database after the migration and storing it in the storage device;
Causing the computer to execute the step of correcting the database data and table names before migration in the program to the database data and table names after migration according to the created correspondence information and storing them in the storage device. A featured program.
JP2004178646A 2004-06-16 2004-06-16 Method, device and program for reusing program Pending JP2006004099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004178646A JP2006004099A (en) 2004-06-16 2004-06-16 Method, device and program for reusing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004178646A JP2006004099A (en) 2004-06-16 2004-06-16 Method, device and program for reusing program

Publications (1)

Publication Number Publication Date
JP2006004099A true JP2006004099A (en) 2006-01-05

Family

ID=35772455

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004178646A Pending JP2006004099A (en) 2004-06-16 2004-06-16 Method, device and program for reusing program

Country Status (1)

Country Link
JP (1) JP2006004099A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293471A (en) * 2006-04-24 2007-11-08 Fuji Xerox Co Ltd Terminal equipment, image processor, access operation control method and program
WO2008056438A1 (en) * 2006-11-06 2008-05-15 Nec Corporation Computer system
JP2009025909A (en) * 2007-07-17 2009-02-05 Hitachi Software Eng Co Ltd Print data conversion system
US9355632B2 (en) 2011-09-07 2016-05-31 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Apparatus, method and electroacoustic system for reverberation time extension

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293471A (en) * 2006-04-24 2007-11-08 Fuji Xerox Co Ltd Terminal equipment, image processor, access operation control method and program
JP4720596B2 (en) * 2006-04-24 2011-07-13 富士ゼロックス株式会社 Image processing apparatus, access operation control method, and program
WO2008056438A1 (en) * 2006-11-06 2008-05-15 Nec Corporation Computer system
US8250027B2 (en) 2006-11-06 2012-08-21 Nec Corporation Computer system, database access method, application server, and program
JP5126064B2 (en) * 2006-11-06 2013-01-23 日本電気株式会社 Computer system
JP2009025909A (en) * 2007-07-17 2009-02-05 Hitachi Software Eng Co Ltd Print data conversion system
US9355632B2 (en) 2011-09-07 2016-05-31 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Apparatus, method and electroacoustic system for reverberation time extension

Similar Documents

Publication Publication Date Title
CN107122368B (en) Data verification method and device and electronic equipment
US10621211B2 (en) Language tag management on international data storage
JP5598017B2 (en) Judgment program, method and apparatus
JP4911438B2 (en) Operation monitoring device
CN111459985A (en) Identification information processing method and device
JP2004302505A (en) Data migration support system, program, device, removable storage device, and discrimination method of storage medium in which data migration has been completed
CN110908671A (en) Method and device for constructing docker mirror image and computer readable storage medium
JPWO2020008991A1 (en) Verification automation equipment, verification automation methods, and programs
JP2006004099A (en) Method, device and program for reusing program
JP4852834B2 (en) Application requirement design support system and method
JP5355497B2 (en) Product management device, product management method, and product management program
JP7003749B2 (en) Generation program, generation device, and generation method
JP5228770B2 (en) Design support apparatus and design support program
JP6017055B2 (en) Data linkage support apparatus and data linkage support method
JP2003316581A (en) Software installation device
JP5808264B2 (en) Code generation apparatus, code generation method, and program
JP6588988B2 (en) Business program generation support system and business program generation support method
JP4925711B2 (en) Batch registration information generation apparatus, batch registration information generation method, and batch registration information generation program
JP2008077285A (en) Sql management system and sql management method and program
JP7219396B2 (en) Classification program, classification method and classification device
JP5517904B2 (en) Data access processing management / generation system
JPH09292986A (en) Part extraction method
JP7141501B2 (en) Slip processing device, slip processing method, and slip processing program
JP3771753B2 (en) Integrated resource management method
JP2005309917A (en) Review support device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060825

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090929

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100209