JPH1040089A - Method for generating data transfer program - Google Patents

Method for generating data transfer program

Info

Publication number
JPH1040089A
JPH1040089A JP8192022A JP19202296A JPH1040089A JP H1040089 A JPH1040089 A JP H1040089A JP 8192022 A JP8192022 A JP 8192022A JP 19202296 A JP19202296 A JP 19202296A JP H1040089 A JPH1040089 A JP H1040089A
Authority
JP
Japan
Prior art keywords
data
program
file
definition
rdbms
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
JP8192022A
Other languages
Japanese (ja)
Inventor
Makiko Kido
真貴子 木戸
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 JP8192022A priority Critical patent/JPH1040089A/en
Publication of JPH1040089A publication Critical patent/JPH1040089A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To prevent the production of an error due to the mismatching of correspondence between a transfer file format and the definition of a relational data base management system(RDBMS) table and the production of a program description error in a specific part of SQL language (4th generation langage) in generating a data transfer program to a relational data base through a file. SOLUTION: The data transfer program is divided into a fixed logic part (11) and a variable part (10) requiring a change dependently upon the RDBMS table and a program is generated without encoding the program itself by automatically generating (2) the variable part by RDBMS table definition and a definition table (1, 8) corresponding to file record layout information. Consequently the production of a description error or a logic error to be a cause of the reduction of productivity is evaded and the productivity is improved.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ホストコンピュー
タからワークステーションやパーソナルコンピュータな
どといった異なるシステム間でデータをやりとりするデ
ータ移行プログラムの効率的な開発手法に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for efficiently developing a data migration program for exchanging data between different systems such as a workstation and a personal computer from a host computer.

【0002】[0002]

【従来の技術】従来の方式、例えば特開平3−1829
32に開示された方式では、SQL言語(第四世代言
語)に特有のプログラム記述部分を自動生成することに
よって記述ミス回避を実現し、生産性の向上を果たして
いる。
2. Description of the Related Art Conventional methods, for example, Japanese Patent Application Laid-Open No. Hei 3-1829
In the method disclosed in No. 32, a program description portion unique to the SQL language (fourth generation language) is automatically generated to avoid a description error, thereby improving productivity.

【0003】しかし、上記の方式では、”ファイルを経
由したデータ移行”を目的とするプログラム作成の場
合、現状では上記以外の部分でもアプリケーションエラ
ーを招くプログラム記述ミスを誘発する場合が多い。そ
の箇所は、移行元データと移行先データ間でのデータマ
ッピング(データ位置・サイズおよびデータ属性)、デ
ータ移送の際の受け渡し操作、およびデータ属性に依存
するコード変換処理の有無の選択の場面などである。ま
た、これらに関連して、上記操作時に使用されるデータ
変数の定義においてもミス発生の確率が高い。これらは
生産性の低下を招く結果となっている。
However, in the above-mentioned method, when a program is created for the purpose of "data migration via a file", a program description error that causes an application error is often induced even in a portion other than the above at present. The places include data mapping between the source data and the destination data (data position / size and data attributes), the transfer operation during data transfer, and the selection of code conversion processing depending on the data attributes. It is. In connection with these, the probability of occurrence of an error is high in the definition of the data variables used in the above operation. These results in a decrease in productivity.

【0004】[0004]

【発明が解決しようとする課題】従来方式においては、
自動生成するプログラム部分が第四世代言語に特化され
ているが、本発明が対象とするような”ファイルを経由
したデータ移行プログラム開発”においては、データ移
行に関してプログラム記述ミスが発生しやすく、また相
互の内容の整合性が重要となる下記プログラミングソー
ス部分についても自動生成対象として考慮する。
In the conventional method,
Although the automatically generated program part is specialized for the fourth generation language, in the "development of data migration program via file" as the object of the present invention, a program description error easily occurs with respect to data migration, In addition, the following programming source parts in which consistency of the mutual contents is important are also considered as objects to be automatically generated.

【0005】1.RDΒΜS(Relational
Database Management Syste
m)上に表を構築するための表定義SQL文(データ定
義に関して、プログラムとの整合性を確保する)。
[0005] 1. RD @ S (Relational
DataBase Management System
m) A table definition SQL statement for constructing a table above (ensure consistency with the program regarding data definition).

【0006】2.プログラム内でデータをレコード単位
に処理するための構造体(変数属性・桁数の整合性を確
保)の定義。
[0006] 2. Definition of a structure (ensures consistency of variable attribute and number of digits) for processing data in a record unit in a program.

【0007】3.プログラム内でレコード内の各フィー
ルド処理(フィールドの切り出し・コード変換)の共通
化を行うために使用する、移行元データの属性(サイズ
・位置)情報テーブル。
[0007] 3. An attribute (size / position) information table of migration source data used to standardize each field processing (field extraction / code conversion) in a record in a program.

【0008】4.プログラム内でのRDBMSプリコン
パイラ固有の記述部分(ホスト変数宣言・SQL記述部
分)。
[0008] 4. Description part (host variable declaration / SQL description part) specific to the RDBMS precompiler in the program.

【0009】5.プログラム内でのデータ移送処理記述
部分。
[0009] 5. Data transfer processing description part in the program.

【0010】現状の問題は、上記項目に関する記述を行
う際に、常に基本とする情報があるにも関わらず、人に
よってコーディングを行っている点にある。
[0010] The problem at present is that when describing the above items, coding is performed by a person, despite the fact that there is always basic information.

【0011】本発明では、基本情報として、RDBMS
表作成に必要な構成情報(データ型・桁数)、および、
移行元ファイル・レコードレイアウト(フィールド開始
位置・桁数)といった新規表項目と移行元データとを対
応づける情報を整理し、そしてこの対応づけられた”一
意”な情報から上記項目全てを生成することで、従来の
プログラムミスを削減することを狙いとする。
In the present invention, RDBMS is used as basic information.
Configuration information (data type and number of digits) required for table creation, and
Arranging information for associating new table items such as source file / record layout (field start position and number of digits) with source data, and generating all of the above items from the associated "unique" information Therefore, the aim is to reduce conventional program errors.

【0012】すなわち、本発明は、ファイルを経由した
データ移行プログラムにおける、データの属性・桁等の
不整合等によるコーディングミスの削減、およびプログ
ラムソース生成自動化の実現による、同じロジックを必
要とするプログラム開発の生産性の向上を目的とする。
That is, according to the present invention, there is provided a program which requires the same logic in a data migration program via a file, by reducing coding errors due to inconsistencies in data attributes, digits, etc., and by realizing automatic program source generation. The aim is to improve development productivity.

【0013】[0013]

【課題を解決するための手段】本発明は、ファイルを経
由してのリレーショナルデータベースへのデータ移行プ
ログラム生成方式において、 ・RDBMS表定義情報(項目名、データ型、桁数) ・ファイルレコードフォーマット(フィールド開始位
置、桁数) の二つを対応づけた表情報に基づき、ファイルからのデ
ータ読み込み・フィールド分割・コード変換処理と、こ
の処理後のデータを登録するRDΒΜSへのアクセス処
理を含むプログラムを自動生成することを特徴とする。
According to the present invention, there is provided a system for generating a program for migrating data to a relational database via a file, comprising: RDBMS table definition information (item name, data type, number of digits) File record format ( (Field start position, number of digits) on the basis of the table information associating the data from the file, the field division, the code conversion process, and the program including the access process to the RD @ S for registering the data after this process. It is automatically generated.

【0014】[0014]

【作用】上記課題は、以下の手法を導入することにより
達成される。まず、図1は、本方式を用いた場合の最終
生成物であるプログラムソースの処理内容をブロック毎
に記述したものである。本方式では、”ファイルを経由
したデータ移行プログラム”ソースを、ターゲットとす
る表やファイル構成に依存し各々コーディングが必要と
なる”可変部”(図1の7、8、11、13で、これら
はまとめて図2の10に該当する)と、汎用的な処理ロ
ジックの”固定部”(図1の2、3、4、5、6,9,
10で、これらはまとめて図2の11に該当する)とに
分割し、表毎に可変部を生成後、固定部分と合わせて再
構成することによって完全なソースを生成し、コンパイ
ル・リンクを行い実行モジュールを作成する。
The above object is achieved by introducing the following method. First, FIG. 1 describes, for each block, the processing contents of a program source, which is a final product when this method is used. In this method, the “data migration program via file” source is converted into a “variable part” (denoted by 7, 8, 11, and 13 in FIG. 1) which requires coding depending on the target table and file configuration. Correspond to 10 in FIG. 2) and “fixed part” of general-purpose processing logic (2, 3, 4, 5, 6, 9, and 9 in FIG. 1).
At 10, these are collectively divided into 11), a variable part is generated for each table, and a complete source is generated by reconstructing the fixed part together with the fixed part. Create an execution module.

【0015】上記可変部は、各々に必要な情報を図4
に示された表定義情報入力シートの内容をもとに自動生
成する。入力内容をチェックした後、各部品はファイル
として保存し、図4中の保存用ファイル名(2)にシー
ケンシャル番号を付与した拡張子によって識別する。各
可変部分を自動生成する際に、図4の表より参照する項
目は下記の通りである。
The above-mentioned variable section stores information necessary for each of them as shown in FIG.
Is automatically generated based on the contents of the table definition information input sheet shown in (1). After checking the input contents, each component is stored as a file, and is identified by an extension obtained by adding a sequential number to the storage file name (2) in FIG. Items that are referred to from the table of FIG. 4 when automatically generating each variable portion are as follows.

【0016】<RDΒΜS表作成用SQL文> 図5:RDBMS表定義SQL文−表名称(1)、項目
名(日本語またはΑΝK名)(4、5)、データ型
(6)、桁数(7)、小数桁(8) <プログラムヘッダーファイル> 図6:データ操作用構造体定義−項目名(ΑΝK名)
(5)、データ型(6)、桁数(7)、小数桁(8)、
処理対象ファイル名(3)、データファイル名(10) 図7:データ属性テーブル−開始位置(11)、読込桁
(12)、読込小数桁(13)、漢字フラグ(14)、
処埋対象ファイル名(3)、データファイル名(10) 図8:ホスト変数宜言文−データ型(6)、項目名(A
NΚ名)(5)、桁数(7)、小数桁(8)、処理対象
ファイル名(3)、データファイル名(10) <プログラムソースファイル> 図9:データ移送処理−項目名(ΑΝK名)(5)、処
理対象ファイル名(3)、データファイル名(10) 図10:埋め込みSQL文(1、2)−項目名(ANK
名)(5)、処理対象ファイル名(3)、データファイ
ル名(10) で生成された部品から論理立てたプログラムの流れ
(図2の処理の流れ)を構築する方法は、可変部分・固
定部それぞれの生成時、上記RDBMS表構成SQL
文、プログラムヘッダーファイル、プログラムソースフ
ァイルごとに拡張子にシーケンシャル番号を付与し、こ
の番号に基づき完全なソースを構築するものとする。
<SQL Statement for Creating RD @ S Table> FIG. 5: RDBMS Table Definition SQL Statement—Table Name (1), Item Name (Japanese or $ K Name) (4, 5), Data Type (6), Number of Digits ( 7), decimal digits (8) <Program header file> Figure 6: Structure definition for data manipulation-item name ($ K name)
(5), data type (6), number of digits (7), decimal digits (8),
Processing target file name (3), data file name (10) FIG. 7: Data attribute table-start position (11), read digit (12), read decimal digit (13), kanji flag (14),
Processing target file name (3), data file name (10) FIG. 8: Host variable declaration-data type (6), item name (A
N @ name) (5), number of digits (7), decimal digits (8), file name to be processed (3), data file name (10) <Program source file> FIG. 9: Data transfer processing-item name ($ K name) ) (5), processing target file name (3), data file name (10) FIG. 10: Embedded SQL statement (1, 2)-item name (ANK)
The method of constructing a program flow (processing flow of FIG. 2) logically formed from the components generated by (name) (5), processing target file name (3), and data file name (10) is a variable part / fixed method. When each part is generated, the above RDBMS table structure SQL
A sequential number is added to the extension for each statement, program header file, and program source file, and a complete source is constructed based on this number.

【0017】図1の可変部を表定義情報テーブルより
生成することにより、タイプ(入力)工数が不要とな
り、かつプログラム内におけるデータ操作/移送時に各
表項目の属性・桁数の不整合が生ずることがない。ま
た、部品生成前のチェック機能によってコンパイルエラ
ーを招く可能性のある箇所を修正できるため、生産性向
上に寄与できる。
By generating the variable part of FIG. 1 from the table definition information table, the type (input) man-hour becomes unnecessary, and the attribute / digit number of each table item is inconsistent at the time of data manipulation / transfer in the program. Nothing. In addition, since a check function before component generation can correct a portion that may cause a compile error, it can contribute to improvement in productivity.

【0018】プログラムロジックの一部を固定部分と
して共通化しており、その他の可変部分は本ツールにて
自動生成されるので()、プログラムロジックエラー
の発生をおさえることができ、生産性向上に寄与でき
る。
A part of the program logic is shared as a fixed part, and the other variable parts are automatically generated by this tool (), so that the occurrence of a program logic error can be suppressed and the productivity is improved. it can.

【0019】[0019]

【発明の実施の形態】図1は、本発明を利用した場合の
最終生成物である、”任意の一表”に対してのファイル
を経由したデータ移行プログラムの処理内容を示したも
のである。プログラムの開始(1)後、データファイル
オープン・DB(Database)接続処理を行い
(2)、ファイルより移行対象データを1レコード読み
込む(3)。読み込んだ1レコードをデータ属性テーブ
ル(レコード内全てのフィールド情報が定義してある)
(13)に基づき、各フィールド毎にデータの分割
(5)・コード変換(6)を行い、ホスト変数(SQL
文内でRDBMSにデータを引き渡すためのデータ領
域)ヘセットする(7)。ここでは各フィールドの情報
をプログラムの流れに組み込まず、”データ属性テーブ
ル”(13)として分割することで、プログラムロジッ
クとしての汎用性を高めている。そして、1レコード全
てのフィールドについてホスト変数へのセットが完了し
た時点で、RDBMSに対してSQL文を発行し、デー
タを追加・更新する(8)。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows the processing contents of a data migration program via a file for an "arbitrary table" which is a final product when the present invention is used. . After the start of the program (1), a data file open / DB (Database) connection process is performed (2), and one record of migration target data is read from the file (3). Reads one record as a data attribute table (all field information in the record is defined)
Based on (13), data division (5) and code conversion (6) are performed for each field, and the host variables (SQL
(Data area for transferring data to the RDBMS in the statement) (7). Here, the information of each field is not incorporated in the flow of the program, but is divided as a "data attribute table" (13), thereby increasing the versatility as the program logic. Then, when the setting of the host variables for all fields of one record is completed, an SQL statement is issued to the RDBMS to add / update the data (8).

【0020】(3)の移行元データファイルの読み込み
において、レコードの終わり(EOF)を検出したら、
RDBMSへの命令を確定し(または取り消し)(CO
MMIT/ROLLBACΚ)、DB切断処埋・データ
ファイルのクローズを行い(9)、本プログラムを終了
する(10)。
When the end of record (EOF) is detected in the reading of the source data file in (3),
Confirm (or cancel) the command to the RDBMS (CO
MMIT / ROLLBAC), performs DB disconnection processing and closes the data file (9), and terminates this program (10).

【0021】図2は、本発明の流れを示すものである。
ここで、上記に示した図1のプログラムは実行モジュー
ル(13)に該当する。実行モジュール(13)を作成
するために関連する構成部品として、図2の8、10、
11、12がある。以下にそれぞれについて説明を行
う。
FIG. 2 shows the flow of the present invention.
Here, the program shown in FIG. 1 corresponds to the execution module (13). As the components related to create the execution module (13), 8, 10 in FIG.
There are 11 and 12. Each of these will be described below.

【0022】図2の8は表定義入力シート(表定義仕様
書)で、図4にその詳細イメージを示す。ここには、図
2の10(9)を生成するための下記情報が含まれる。
表名称(1)、項目名(日本語・ΑΝK)(4、5)、
データ型(6)、桁数(7)、小数桁(8)は主に、表
構成・SQL文関連情報生成に利用される。データファ
イル名(10)、開始位置(11)、読込桁(12)、
読込小数桁(13)、漢字フラグ(14)、キー項目フ
ラグ(15)は主に、プログラムが移行元データを読み
込む際に使用するデータ属性テーブル生成に利用され
る。その他の情報として、ファイル名(2)(可変部作
成時保存用)、処理ターゲットファイル(3)(今回処
理対象とするデータファイル)、コメント(16)が含
まれる。
Reference numeral 8 in FIG. 2 is a table definition input sheet (table definition specification), and FIG. 4 shows a detailed image thereof. This includes the following information for generating 10 (9) in FIG.
Table name (1), item name (Japanese, $ K) (4, 5),
The data type (6), the number of digits (7), and the decimal digits (8) are mainly used for generating table structure and SQL statement related information. Data file name (10), start position (11), read digit (12),
The read decimal digit (13), the kanji flag (14), and the key item flag (15) are mainly used for generating a data attribute table used when the program reads the migration source data. Other information includes a file name (2) (for saving when creating a variable part), a processing target file (3) (a data file to be processed this time), and a comment (16).

【0023】図2の10は、本ツールにより生成される
プログラムソース(可変部)で7つの部分からなる。こ
れらを構成するものを、図5〜図11を用いて説明す
る。図5は、RDBMS表定義SQL文で、RDBMS
上に表を作成する際に利用する。これは、図4中の1、
4(5)、6、7、8にデータが入力されているかをチ
ェックし、SQL文法に従い生成する。
Reference numeral 10 in FIG. 2 denotes a program source (variable part) generated by the tool, which is composed of seven parts. What constitutes these will be described with reference to FIGS. FIG. 5 is an RDBMS table definition SQL statement.
Used to create a table above. This corresponds to 1 in FIG.
4 (5), 6, 7 and 8 are checked to see if data has been input, and generated according to the SQL grammar.

【0024】図6は、プログラム中でのデータ移送時に
使用するC言語構造体である。図4の10が図4の3の
処理対象ファイルと一致する場合に、図4の5、7、8
の内容より生成する。
FIG. 6 shows a C language structure used when data is transferred in a program. When 10 in FIG. 4 matches the file to be processed in 3 in FIG. 4, 5, 7, and 8 in FIG.
Generated from the contents of

【0025】図7は、データ属性テーブルで、データフ
ァイルより読み込んだ1レコードを、表に移行するため
に必要なフィールドの切り出し、コード変換処理をする
・しないの識別、コード変換処理を移行先のデータサイ
ズ内に納める等のための情報としてプログラム中で参照
される。図4の10が図4の3の処理ターゲットファイ
ルと一致する場合に、図4の6,7,8、11、12、
13、14の内容より生成する。
FIG. 7 shows a data attribute table in which one record read from a data file is cut out of fields necessary for transferring to a table, identification of whether or not to perform code conversion processing, and code conversion processing of a transfer destination. It is referred to in the program as information for storing within the data size. When 10 in FIG. 4 matches the processing target file in 3 in FIG. 4, 6, 7, 8, 11, 12, and 12 in FIG.
Generated from the contents of 13 and 14.

【0026】図8はホスト変数宣言文で、第四世代言語
特有の変数宣言である。図4の10が図4の3の処理タ
ーゲットファイルと一致する場合に、図4の5、6,
7、8、16の内容より生成する。
FIG. 8 shows a host variable declaration statement, which is a variable declaration unique to the fourth generation language. When 10 in FIG. 4 matches the processing target file in 3 in FIG. 4, 5, 6, and 6 in FIG.
Generated from the contents of 7, 8, and 16.

【0027】図9はデータ移送処理で、ファイルより読
み込んだレコード内容(構造体にセットされる)を図8
にて宣言したホスト変数ヘデータ内容の移送・データ長
のセットを行う処理である。図4の10が図4の3の処
埋ターゲットファイルと一致する場合に、図4の5、6
の内容より生成する。
FIG. 9 shows a data transfer process, in which record contents (set in a structure) read from a file are shown in FIG.
This is the process of transferring the data contents to the host variables declared in and setting the data length. When 10 in FIG. 4 matches the processing target file in 3 in FIG. 4, 5, 6 in FIG.
Generated from the contents of

【0028】図10、図11は埋め込みSQL文で、R
DBMSへ処理を要求するための記述である。図4の1
0が図4の3の処理ターゲットファイルと一致する場合
に、図4の1、5の内容より生成する。
FIGS. 10 and 11 show embedded SQL statements.
This is a description for requesting a process to the DBMS. 4 in FIG.
If 0 matches the processing target file of 3 in FIG. 4, it is generated from the contents of 1 and 5 in FIG.

【0029】図2の11は、プログラムロジックの固定
部分で、データ移行プログラムを実行する際の共通ロジ
ックとして使用される。図2のプログラム処理のうち、
図1の2、3、4、5,6、(7、8)、9に示される
部分である。
Reference numeral 11 in FIG. 2 denotes a fixed part of the program logic, which is used as common logic when executing the data migration program. Of the program processing in FIG. 2,
These are the portions indicated by 2, 3, 4, 5, 6, (7, 8) and 9 in FIG.

【0030】図2の12は、図1に示される処理内容を
実行するための完全なプログラムソースファイルであ
り、図2の10、11より生成される。
Reference numeral 12 in FIG. 2 is a complete program source file for executing the processing contents shown in FIG. 1, and is generated from 10 and 11 in FIG.

【0031】本発明実施の際の処理の流れを図2を参照
して説明すると、まず、(1)の表定義情報入力で図4
の表を用い、各項目についてユーザ入力を受け付ける。
この情報は図2の8の表定義仕様書として保存必要時に
再度読み込みを行うことで、本処理と代替することが可
能である。(2)において(1)で入力された情報を基
に(10)の出力イメージの事前生成を行う(9)。表
定義等のSQL文の記述内容で、その他オプションの設
定を行う場合は、ここで修正する。(3)では生成を行
う前に(1)での入力内容をチェックし、無効な情報
{パラメータ指定誤り・データ移行で長いデータを短い
定義項目へ移行しようとしていないか(読込桁>出力
桁、読込小数桁>出力小数桁)}の検出を行い、エラー
がある場合には通知を行う。エラーがない場合には
(5)にて可変部ソース部品の生成を行い、図5〜図1
1の内容をそれぞれファイルヘ出力(10)する。
(6)では(5)で生成された(10)とソース固定部
(11)からファイル名につけられたシーケンシャル番
号を元に、完全なプログラムソース(12)を生成す
る。最後に(7)において(12)のプログラムソース
をコンパイル・リンクし(13)の実行モジュールを生
成する。実行モジュール(13)は、図1の手続きに基
づき、移行元のデータをRDBMSへ追加・更新する処
理を行い、本発明の一連の動作は終了する。
Referring to FIG. 2, the flow of processing in the embodiment of the present invention will be described. First, FIG.
The user input is received for each item using the table of (1).
This information can be substituted for this processing by reading it again when it is necessary to save this information as the table definition specification 8 in FIG. In (2), the output image of (10) is pre-generated based on the information input in (1) (9). If other options are to be set in the description contents of the SQL statement such as the table definition, the settings are modified here. In (3), before generating, check the input contents in (1), and check if invalid information {parameter specification error / data migration to migrate long data to short definition item (read digit> output digit, (Read decimal digits> output decimal digits)} is detected, and if there is an error, notification is made. If there is no error, a variable part source component is generated in (5), and FIGS.
1 is output to a file (10).
In (6), a complete program source (12) is generated based on (10) generated in (5) and the sequential number given to the file name from the source fixing unit (11). Finally, in (7), the program source of (12) is compiled and linked to generate an execution module of (13). The execution module (13) performs a process of adding / updating transfer source data to the RDBMS based on the procedure of FIG. 1, and a series of operations of the present invention ends.

【0032】本発明の具体例として、ホストマシン上の
順編成ファイルをワークステーション上のRDΒΜSヘ
データ移行する際の動作を図3の例を用いて説明する。
まず、(1)でデータ移行対象のファイルをホストコン
ピュータより入手しておく(10)。(2)でRDBM
Sに作成する新規表の定義情報と(1)で入手したデー
タファイルのレコードフォーマットとに基づき、図4の
表定義情報入力シートの内容を入力する。本発明に基づ
く方式(3)にてソースの可変部分(8)を作成し、
(4)にて(8)とソース固定部より完成版のプログラ
ムソース(9)を生成する。この完成されたソース
(9)を(5)で生成を行い実行可能モジュールにす
る。(6)プログラムの実行の前に、(7)で生成され
た表定義SQL文(8)(図5)を用いてRDBMS上
に表を作成しておき、(6)の実行によって(10)の
データファイルからRDBMS(11)上へのデータ移
行を実現する。
As a specific example of the present invention, an operation when data is transferred from a sequential file on the host machine to RD @ S on the workstation will be described with reference to the example of FIG.
First, a file to be migrated is obtained from the host computer in (1) (10). RDBM in (2)
Based on the definition information of the new table created in S and the record format of the data file obtained in (1), the contents of the table definition information input sheet of FIG. 4 are input. The variable part (8) of the source is created by the method (3) according to the present invention,
In (4), a complete version of the program source (9) is generated from (8) and the source fixing unit. The completed source (9) is generated in (5) to make it an executable module. (6) Before executing the program, create a table on the RDBMS using the table definition SQL statement (8) (FIG. 5) generated in (7), and execute (10) by executing (6). Data transfer from the data file to the RDBMS (11).

【0033】なお、上記説明では、ホストコンピュータ
上のデータファイル内容をワークステーションに移行す
るプログラムを例に説明したが、応用例としてホスト−
パーソナルコンピュータ間、ワークステーション−パー
ソナルコンピュータ間、同機種間へも本発明を適用でき
る。また、図10、図11では、本方式で生成されるS
QL文の一例として、IΝSERT文をとりあげたが、
UPDATΕ、SELECT(FETCΗ)文等におい
ても、本方式の適用が可能である。
In the above description, a program for transferring the contents of a data file on a host computer to a workstation has been described as an example.
The present invention can also be applied between personal computers, between workstations and personal computers, and between similar models. Also, in FIGS. 10 and 11, the S
As an example of a QL sentence, the I @ SERT sentence was taken up,
This method can also be applied to an UPDAT @, SELECT (FETC #) statement or the like.

【0034】[0034]

【発明の効果】本発明を利用することにより、ファイル
を経由したデータ移行プログラム開発において、可変と
なる部分は定義情報(各表構成定義情報)を入力するだ
けでソースコードの生成が可能となるため、従来、コー
ディング方法で発生していた項目の属性や桁の不整合に
よるアプリケーションエラーは回避され、生産性の向上
が達成できる。また、プログラムの固定部(+可変部)
といった同一ロジックの適用によって、プログラムロジ
ックエラーが回避できるため、この点においてもデータ
移行プログラムの生産性の向上が達成できる。
According to the present invention, in the development of a data migration program via a file, a source code can be generated for variable portions only by inputting definition information (table configuration definition information). For this reason, application errors due to inconsistencies in item attributes and digits, which have conventionally occurred in the coding method, can be avoided, and productivity can be improved. The fixed part of the program (+ variable part)
By applying the same logic as described above, a program logic error can be avoided, and also in this regard, the productivity of the data migration program can be improved.

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

【図1】本発明による最終生成物であるファイルを経由
したデータ移行プログラムの処理内容を示した図であ
る。
FIG. 1 is a diagram showing processing contents of a data migration program via a file which is a final product according to the present invention.

【図2】本発明の実施の形態の処理の流れを示した図で
ある。
FIG. 2 is a diagram showing a flow of processing according to the embodiment of the present invention.

【図3】本発明の実施の形態の例を説明するための図で
ある。
FIG. 3 is a diagram for explaining an example of an embodiment of the present invention.

【図4】本発明で自動生成のための基本データとなる、
表定義およびファイルフォーマット情報入力項目の一覧
を示した図である。
FIG. 4 is basic data for automatic generation in the present invention.
It is a figure showing a list of table definition and file format information input items.

【図5】本発明におけるRDBMS表定義SQL文の一
例を示した図である。
FIG. 5 is a diagram showing an example of an RDBMS table definition SQL statement according to the present invention.

【図6】本発明におけるデータ操作用構造体定義の一例
を示した図である。
FIG. 6 is a diagram showing an example of a data manipulation structure definition according to the present invention.

【図7】本発明に適用されるデータ属性テーブルの一例
を示した図である。
FIG. 7 is a diagram showing an example of a data attribute table applied to the present invention.

【図8】本発明に適用される第四世代言語利用ホスト変
数宣言文の一例を示した図である。
FIG. 8 is a diagram showing an example of a fourth generation language using host variable declaration statement applied to the present invention.

【図9】本発明におけるデータ移送処埋のコピー文の一
例を示した図である。
FIG. 9 is a diagram showing an example of a copy statement for data transfer processing according to the present invention.

【図10】本発明における埋め込みSQL文のその1を
示した図である。
FIG. 10 is a diagram showing a first example of an embedded SQL sentence according to the present invention.

【図11】本発明における埋め込みSQL文のその2を
示した図である。
FIG. 11 is a diagram showing a second example of an embedded SQL sentence according to the present invention.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 ファイルを経由してのリレーショナルデ
ータベースへのデータ移行プログラム生成方式におい
て、 ・RDBMS表定義情報(項目名、データ型、桁数) ・ファイルレコードフォーマット(フィールド開始位
置、桁数) の二つを対応づけた表情報に基づき、ファイルからのデ
ータ読み込み・フィールド分割・コード変換処理と、こ
の処理後のデータを登録するRDΒΜSへのアクセス処
理を含むプログラムを自動生成することを特徴とするデ
ータ移行プログラム生成方式。
1. A method for generating a program for migrating data to a relational database via a file, comprising:-RDBMS table definition information (item name, data type, number of digits)-file record format (field start position, number of digits) Based on the table information that associates the two, a program is automatically generated that includes a process of reading data from a file, dividing a field, and performing code conversion, and an access process to an RD @ S for registering the data after the process. Data migration program generation method.
【請求項2】 前記フィールド分割は、ファイルより移
行対象データを1レコード読み込み、読み込んだ1レコ
ードをデータ属性テーブルに基づき、各フィールド毎に
データを切り出して行うことを特徴とする請求項1記載
のデータ移行プログラム生成方式。
2. The method according to claim 1, wherein the field division is performed by reading one record of data to be migrated from a file and cutting out the read one record for each field based on a data attribute table. Data migration program generation method.
【請求項3】 データ移行プログラムソースを、ターゲ
ットとする表やファイル構成に依存し各々コーディング
が必要となる”可変部”と、汎用的な処理ロジックの”
固定部”とに分割し、表毎に可変部を生成後、固定部分
と合わせて再構成することによって生成することを特徴
とする請求項1記載のデータ移行プログラム生成方式。
3. A data migration program source, which depends on a target table or file configuration and requires coding, each of which includes a "variable section" and a general processing logic "
2. The data migration program generation method according to claim 1, wherein the data migration program is generated by dividing the data into a fixed part, generating a variable part for each table, and reconfiguring the variable part together with the fixed part.
JP8192022A 1996-07-22 1996-07-22 Method for generating data transfer program Pending JPH1040089A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8192022A JPH1040089A (en) 1996-07-22 1996-07-22 Method for generating data transfer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8192022A JPH1040089A (en) 1996-07-22 1996-07-22 Method for generating data transfer program

Publications (1)

Publication Number Publication Date
JPH1040089A true JPH1040089A (en) 1998-02-13

Family

ID=16284303

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8192022A Pending JPH1040089A (en) 1996-07-22 1996-07-22 Method for generating data transfer program

Country Status (1)

Country Link
JP (1) JPH1040089A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000076057A (en) * 1998-08-20 2000-03-14 Internatl Business Mach Corp <Ibm> Method and device for accessing data in data processing system
JP2009230578A (en) * 2008-03-24 2009-10-08 Fujitsu Ltd Search key optimization apparatus and search key optimization program
JP2011180826A (en) * 2010-03-01 2011-09-15 Nec Corp System and method for automatically generating cobol variable definition

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000076057A (en) * 1998-08-20 2000-03-14 Internatl Business Mach Corp <Ibm> Method and device for accessing data in data processing system
JP2009230578A (en) * 2008-03-24 2009-10-08 Fujitsu Ltd Search key optimization apparatus and search key optimization program
JP2011180826A (en) * 2010-03-01 2011-09-15 Nec Corp System and method for automatically generating cobol variable definition

Similar Documents

Publication Publication Date Title
US5930806A (en) Method and system for data migration from network database to relational database
JP3563692B2 (en) How to synchronize a database schema with its representation in an object-oriented repository
US9886245B2 (en) Software development tool using a workflow pattern that describes software applications
US5898872A (en) Software reconfiguration engine
US5202996A (en) Software structuring system and method by data table translation
US7693857B2 (en) Clinical genomics merged repository and partial episode support with support abstract and semantic meaning preserving data sniffers
US5535325A (en) Method and apparatus for automatically generating database definitions of indirect facts from entity-relationship diagrams
JPH07200381A (en) Object extension system
JP2000148461A (en) Software model and existing source code synchronizing method and device
JP2644728B2 (en) Data dictionary directory system
JP3577400B2 (en) System design equipment and data warehouse design system
CN110889013A (en) Data association method, device, server and storage medium based on XML
JP3186117B2 (en) Automatic program generation system using data-centric software components
JPH08235032A (en) Logical check system for data base updating
WO2024012195A1 (en) Unified verification method and apparatus, and device and storage medium
JPH11265395A (en) Data base access system
JPH1040089A (en) Method for generating data transfer program
CN114385145A (en) Web system back-end architecture design method and computer equipment
CN117687681B (en) Version management method and system for low-code application
CN114443652B (en) Breakpoint SQL operation method, system and device
JPH1153391A (en) Database access method
Troelsen et al. Exploring Entity Framework Core
JP2003280955A (en) Method and system for updating definition information in data extraction
KR100656559B1 (en) Program Automatic Generating Tools
JP2000122855A (en) Method and device for giving data name and recording medium

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19991110