JPH03182932A - Program generation system - Google Patents

Program generation system

Info

Publication number
JPH03182932A
JPH03182932A JP32139689A JP32139689A JPH03182932A JP H03182932 A JPH03182932 A JP H03182932A JP 32139689 A JP32139689 A JP 32139689A JP 32139689 A JP32139689 A JP 32139689A JP H03182932 A JPH03182932 A JP H03182932A
Authority
JP
Japan
Prior art keywords
sql
information
program
variable
definition
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
JP32139689A
Other languages
Japanese (ja)
Inventor
Keiko Taniguchi
恵子 谷口
Shinichi Tokowake
床分 眞一
Takeshi Washisaki
剛 鷲崎
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 JP32139689A priority Critical patent/JPH03182932A/en
Publication of JPH03182932A publication Critical patent/JPH03182932A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PURPOSE:To prevent an error and to improve productivity by automatically generating a part of a description part characteristic of an SQL language. CONSTITUTION:Information on a processing specification 7 is worked and intermediate information 8 is outputted. A mark table 1 is generated based on information of data definition and a variable name used in a procedure is referred to the mark table 1. Especially in the variable name used in RDB access, internal information is added to the mark table 1 as to the coincident variable name as the result of reference. Table definition information is inputted from a definition body film 10 and it is set in a table information table 2. Then, the tables 1 and 2 are referred to and the description part characteristic to the SQL language is generated. Thus, the occurrence of errors reduces and productivity improves.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、プログラムの自動生成方式に係り、特に埋め
込み型言語で記述するプログラムの生産性向上に好適な
方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an automatic program generation method, and particularly to a method suitable for improving the productivity of programs written in an embedded language.

〔従来の技術〕[Conventional technology]

従来の方式では、プログラムの中で例えばSQL言語記
述部分に対してSQL言語の仕様に合った名称を用いな
ければならなかった。また、SQL言語特有のSQL連
絡領域およびSQL宣言節を記述しなければならない。
In the conventional method, for example, a name that conforms to the specifications of the SQL language must be used for the SQL language description part of the program. In addition, an SQL communication area and an SQL declaration clause specific to the SQL language must be written.

しかし、この方式では、既存の言語とSQL言語の仕様
が異なりプログラム作成に当り考慮すべき点が多く、ユ
ーザの誤りを誘発したり記述量の増大を招き生産性の低
下の原因となっている。
However, with this method, the specifications of the existing language and the SQL language are different, and there are many points to consider when creating a program, leading to user errors, an increase in the amount of description, and a decrease in productivity. .

これに関連するものとして、特開昭62−128335
がある。
Related to this, JP-A No. 62-128335
There is.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記従来技術では、既存の言語とSQL言語の仕様の異
なる点について配慮されておらず、SQL言語特有の記
述部分に対して書き忘れなどの誤りが発生するという問
題点があった。
The above-mentioned conventional technology does not take into account the differences between the specifications of existing languages and the SQL language, and has the problem that errors such as forgetting to write descriptions specific to the SQL language occur.

本発明の目的は従来の技術で述べたSQL言語特有の記
述部分の一部を自動生成することにより、誤りの防止お
よび生産性の向上を目的とする。
An object of the present invention is to prevent errors and improve productivity by automatically generating a part of the description part specific to the SQL language described in the prior art.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的は、以下の手法を導入することにより達成され
る。
The above objective is achieved by introducing the following method.

■テーブル定義情報よりテーブルの列に関する情報を入
力し、プログラム生成時に埋め込み変数としてSQL宣
言節内に生成する。
■Input information about table columns from table definition information and generate it as an embedded variable in the SQL declaration clause when generating a program.

■構文解析でRDBアクセス文を解析した結果、埋め込
み変数として宣言する変数名と変数宣言された変数名を
蓄積した記号テーブルとを照合して一致した変数名に対
して記号テーブルに内部情報を付加することにより、プ
ログラム生成時にSQL宣言節内に生成する。
■As a result of parsing the RDB access statement using syntax analysis, the variable name declared as an embedded variable is compared with the symbol table that stores declared variable names, and internal information is added to the symbol table for matching variable names. By doing this, it is generated in the SQL declaration clause when the program is generated.

■記号テーブルに蓄積された変数名において、埋め込み
変数として生成された変数名に対応付けた変数名をプロ
グラム生成時にSQL宣言節内に生成する。また、テー
ブル定義情報の列名に対応付けた変数名をプログラム生
成時にSQL宣言節内に生成する。
(2) Among the variable names stored in the symbol table, a variable name associated with the variable name generated as an embedded variable is generated in the SQL declaration clause at the time of program generation. Also, variable names associated with column names of table definition information are generated in the SQL declaration clause at the time of program generation.

〔作用〕[Effect]

第1図は、本発明の流れを示す図である。 FIG. 1 is a diagram showing the flow of the present invention.

3の処理仕様書入力では、7の処理仕様書の情報を加工
して8の中間情報を出力する。4の構文解析において、
4−1のデータ部解析では、データ定義の情報に基づい
て1の記号テーブルを作成し、4−2の手続き部解析で
は、手続き内で使用されている変数名を1の記号テーブ
ルと照合する。
In the process specification input step 3, the information in the process specification document 7 is processed and the intermediate information shown in step 8 is output. In the parsing of 4,
In the data part analysis in 4-1, a symbol table in 1 is created based on the data definition information, and in the procedure part analysis in 4-2, the variable names used in the procedure are checked against the symbol table in 1. .

特にRDBアクセス文内に使用されている変数名におい
ては、照合した結果一致した変数名について1の記号テ
ーブルに内部情報を付加する。5の定義体入力では、1
0の定義体ファイルからチー4゜ プル定義情報を入力し2のテーブル情報テーブルをに設
定する。6の生成では、1,2を参照してSQL言語特
有の記述部分を生成する。これにより、誤りの発生が減
少して生産性が向上する。
In particular, for variable names used in RDB access statements, internal information is added to one symbol table for variable names that match as a result of matching. In the definition field input of 5, 1
Input the team definition information from the definition file 0 and set the table information table 2. In the generation of 6, a description part specific to the SQL language is generated by referring to 1 and 2. This reduces the occurrence of errors and improves productivity.

〔実施例〕〔Example〕

以下、本発明を図面を参照して本発明の一実施例を詳細
に説明する。
Hereinafter, one embodiment of the present invention will be described in detail with reference to the drawings.

第2図は、本発明が一実施例を示すプログラム作成支援
システムの機能構成図である。12の画面・DBファイ
ル定義では、生成するプログラムで使用する画面やファ
イルを定義する。13の入出力構成定義では、生成する
プログラムの入出力の構成を定義して、14の処理仕様
書編集で16の半完成な処理仕様書を修正することによ
り18の完成処理仕様書を出力する。15のプログラム
の生成では、12で出力された17の定義体ファイルと
18の完成処理仕様書を入力することにより、19のC
OBOLプログラムを出力する。
FIG. 2 is a functional configuration diagram of a program creation support system showing one embodiment of the present invention. Screen/DB file definition No. 12 defines the screens and files used in the program to be generated. 13 Input/output configuration definition defines the input/output configuration of the program to be generated, and 14 Processing specification editing edits 16 semi-completed processing specifications to output 18 completed processing specifications. . To generate the program in step 15, by inputting the definition file 17 output in step 12 and the completed processing specification in step 18, we can generate the program in step 19.
Output the OBOL program.

第3図は、処理仕様書の記述例である。21のデータ定
義文から29の記号テーブルを作成する。
FIG. 3 is a description example of a processing specification. Create 29 symbol tables from 21 data definition statements.

22は20のテーブル0RIAGEを検索するRDBア
クセス文である。23の行探索に指定されている変数名
は20のテーブルURIAGEの列名であり、28のテ
ーブル定義情報に前記列名の属性等の情報が格納されて
いる。24の相手指定に指定されている変数名と25.
26の探索条件に指定されている変数名は、内部的に埋
め込み変数として認識され29の記号テーブルと照合し
、一致するものに対して30の内部情報を付加する。
22 is an RDB access statement that searches table 20 0RIAGE. The variable name specified in the row search 23 is the column name of the table URIAGE 20, and the table definition information 28 stores information such as attributes of the column name. The variable name specified in the partner specification in 24 and 25.
The variable name specified in the search condition No. 26 is internally recognized as an embedded variable, is checked against the symbol table No. 29, and internal information No. 30 is added to those that match.

27はNULL値判定文である。27 is a NULL value judgment statement.

第4図は第3図の処理仕様書に基づいて生成したCOB
OLプログラムである。31はRDBアクセス時に必要
であるSQL連絡領域を展開するためのCoPY文であ
る。32は40のテーブル定義情報と47の記号テーブ
ルに基づいて生成されたSQL宣言節である。33は4
0のテーブル定義情報に基づいて生成した埋め込み変数
の定義文であり、42の変数名と対応している。34は
33で定義された埋め込み変数に対応する標識変数の定
義文であり、43の変数名と対応している。
Figure 4 shows a COB generated based on the processing specifications in Figure 3.
This is an office lady program. 31 is a CoPY statement for expanding the SQL communication area that is necessary when accessing the RDB. 32 is an SQL declaration clause generated based on the table definition information 40 and the symbol table 47. 33 is 4
This is a definition statement of an embedded variable generated based on the table definition information of 0, and corresponds to the variable name of 42. 34 is a definition statement of an indicator variable corresponding to the embedded variable defined in 33, and corresponds to the variable name 43.

35.37は47の記号テーブルで内部情報が付加され
ている変数名に対して生成した埋め込み変数の定義文で
あり、44の変数名に対応している。
35.37 is a definition statement of an embedded variable generated for the variable name to which internal information is added in the symbol table 47, and corresponds to the variable name 44.

36.38は前記埋め込み変数に対応する標識変数の定
義文である。39の変数定義文は、47の記号テーブル
に内部情報が付加されていないためSQL宣言節外に生
成される。41のSQL文は、22のRDBアクセス文
に基づいて生成する。
36.38 is a definition statement of an indicator variable corresponding to the embedded variable. The variable definition statement 39 is generated outside the SQL declaration clause because no internal information is added to the symbol table 47. 41 SQL statements are generated based on 22 RDB access statements.

45の条件式は、27のNULL値判定文に基づいて内
部的に生成した34の標識変数を用いて生成する。
The 45 conditional expressions are generated using 34 indicator variables that are internally generated based on the 27 NULL value determination statements.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、RDBアクセスのように既存の言語中
に特殊な仕様で記述しなければならないプログラムにお
いて、一部自動生成することによりユーザミスの減少に
繋がり生産性が向上する
According to the present invention, in a program that must be written with special specifications in an existing language, such as RDB access, by automatically generating part of it, user mistakes can be reduced and productivity can be improved.

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

第1図は本発明の動作手順を示すフローチャートを示す
図、第2図は本発明の一実施例のプログラム作成支援シ
ステムの構成図、第3図は本発明7゜ は本発明の一実施例の生成したプログラムの一部を示す
図である。 [符号の説明] 1・・記号テーブル。 2・・・テーブル情報テーブル。 3・・処理仕様書入力、  4・・・構文解析。 4−1・・・データ部解析、 4−2・・・手続き部解
析。 5・・・定義体入力、    6・・・生成。 7・・・処理仕様書。 8・・・処理仕様書入力が出力した中間情報。 9・・・構文解析が出力した中間情報。 10・・・定義体ファイル、 1工・・・端末。 12・・・画面・DBファイル定義。 13・・・入出力構成定義、 14・・・処理仕様書編
集。 15・・・プログラムの生成。 16・・・半完成な処理仕様書。 17・・・定義体ファイル、  ↓8・・・完成処理仕
様書。 19・・・COBOLプログラム。 20・・・アクセスするテーブルの名前(URIAG8
゛ E)。 21・・処理仕様書内で使用する変数の定義。 22・・・RDBアクセス文。 23・・アクセスするテーブルの列名。 24・・・RDBアクセス時に必要な変数(列名に対応
)。 25・・データ定義されているRDBアクセス時に必要
な変数。 26・・・データ定義されているRDBアクセス時に必
要な変数。 27・・・ナル値判定文。 28・・・テーブル定義情報、29・・・記号テーブル
。 30・・・記号テーブルの内部情報。 31・・・SQL連絡領域展開文。 32・・・SQL宣言節。 33・・・テーブルの列名に対応する埋め込み変数の定
義文。 34・・・33に対応する標識変数の定義文。 35・・・処理仕様書で定義された埋め込み変数の定義
文。 36・・・35に対応する標識変数の定義文。 37・・・処理仕様書で定義された埋め込み変数の定義
文。 38・・・37に対応する標識変数の定義文。 39・・・処理仕様書で定義された変数の定義文。 40・・・テーブル定義情報、41・・・SQL文。 42・・・33で定義された埋め込み変数。 43・・・34で定義された標識変数。 44・・・37で定義された埋め込み変数。 45・・・ナル値を判定する条件式。 46・・・34で定義された標識変数。
FIG. 1 is a flowchart showing the operating procedure of the present invention, FIG. 2 is a configuration diagram of a program creation support system according to an embodiment of the present invention, and FIG. 3 is an embodiment of the present invention. FIG. 2 is a diagram showing a part of a program generated by. [Explanation of symbols] 1. Symbol table. 2...Table information table. 3...Processing specification input, 4...Syntax analysis. 4-1...Data part analysis, 4-2...Procedure part analysis. 5...Definition field input, 6...Generation. 7...Processing specifications. 8... Intermediate information output by processing specification input. 9... Intermediate information output by syntax analysis. 10... Definition file, 1st... Terminal. 12...Screen/DB file definition. 13...Input/output configuration definition, 14...Processing specification editing. 15...Program generation. 16...Semi-completed processing specifications. 17...Definition file, ↓8...Complete processing specification. 19...COBOL program. 20... Name of the table to be accessed (URIAG8
゛E). 21... Definition of variables used within the processing specification. 22...RDB access statement. 23... Column name of the table to be accessed. 24...Variables required during RDB access (corresponding to column names). 25... Variables required when accessing the RDB where data is defined. 26... Variables required when accessing the RDB where data is defined. 27... Null value judgment statement. 28...Table definition information, 29...Symbol table. 30...Internal information of the symbol table. 31...SQL communication area expansion statement. 32...SQL declaration clause. 33... Definition statement of the embedded variable corresponding to the column name of the table. 34... Definition statement of the indicator variable corresponding to 33. 35... Definition statement of the embedded variable defined in the processing specification. Definition statement of indicator variable corresponding to 36...35. 37... Definition statement of the embedded variable defined in the processing specification. Definition statement of indicator variable corresponding to 38...37. 39...Definition statement of variables defined in the processing specification. 40...Table definition information, 41...SQL statement. Embedded variables defined in 42...33. Indicator variables defined in 43...34. Embedded variables defined in 44...37. 45... Conditional expression for determining the null value. 46... Indicator variables defined in 34.

Claims (1)

【特許請求の範囲】 1、RDBアクセスを目的とするSQL言語を埋め込ん
だプログラムを生成するプログラム生成支援システム(
例:COBOLプログラムを生成する第4世代言語シス
テム)において、テーブル定義に基づいて埋め込み変数
をSQL宣言節に自動生成することと、SQL連絡領域
展開文を自動生成することを特徴とするプログラム生成
方式。 2、請求項1記載のプログラム作成支援システムにおい
て、変数宣言された変数名に対して記号テーブルを作成
し、前記記号テーブルとRDBアクセス文中に記述され
た変数名を照合した結果によって、SQL宣言節に埋め
込み変数を自動生成することを特徴とするプログラム生
成方式。 3、請求項1記載のプログラム作成支援システムにおい
て、ナル値を検出するための標識変数をSQL宣言節内
に生成された埋め込み変数に対応してSQL宣言節内に
自動生成することと、標識変数を用いずにナル値の判定
ができる手段を設けたことを特徴とするプログラム生成
方式。
[Claims] 1. A program generation support system that generates a program embedded with SQL language for RDB access (
Example: In a 4th generation language system that generates COBOL programs), a program generation method characterized by automatically generating embedded variables in the SQL declaration clause based on table definitions and automatically generating SQL communication area expansion statements. . 2. In the program creation support system according to claim 1, a symbol table is created for the declared variable name, and based on the result of comparing the symbol table with the variable name described in the RDB access statement, the SQL declaration clause is A program generation method characterized by automatically generating embedded variables. 3. In the program creation support system according to claim 1, an indicator variable for detecting a null value is automatically generated in the SQL declaration clause in correspondence with an embedded variable generated in the SQL declaration clause; A program generation method characterized by providing a means for determining a null value without using.
JP32139689A 1989-12-13 1989-12-13 Program generation system Pending JPH03182932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32139689A JPH03182932A (en) 1989-12-13 1989-12-13 Program generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32139689A JPH03182932A (en) 1989-12-13 1989-12-13 Program generation system

Publications (1)

Publication Number Publication Date
JPH03182932A true JPH03182932A (en) 1991-08-08

Family

ID=18132082

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32139689A Pending JPH03182932A (en) 1989-12-13 1989-12-13 Program generation system

Country Status (1)

Country Link
JP (1) JPH03182932A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06279669A (en) * 1992-12-02 1994-10-04 General Electric Co <Ge> Polymer mixture comprising aromatic polycarbonate, styrene-containing copolymer and/or graft polymer, and polysiloxane-polycarbonate block copolymer and article produced therefrom
JPH11102365A (en) * 1997-09-26 1999-04-13 Fujitsu Ltd Office program generation support device and program storage medium
US6698010B1 (en) 1999-08-20 2004-02-24 Nec Corporation System, method and computer program product for automatic generation of data processing program
JP2011180826A (en) * 2010-03-01 2011-09-15 Nec Corp System and method for automatically generating cobol variable definition
US8465146B2 (en) 2010-02-26 2013-06-18 Ricoh Company, Limited Roll paper conveying apparatus, inkjet printer, and roll paper conveying method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06279669A (en) * 1992-12-02 1994-10-04 General Electric Co <Ge> Polymer mixture comprising aromatic polycarbonate, styrene-containing copolymer and/or graft polymer, and polysiloxane-polycarbonate block copolymer and article produced therefrom
JPH11102365A (en) * 1997-09-26 1999-04-13 Fujitsu Ltd Office program generation support device and program storage medium
US6698010B1 (en) 1999-08-20 2004-02-24 Nec Corporation System, method and computer program product for automatic generation of data processing program
US8465146B2 (en) 2010-02-26 2013-06-18 Ricoh Company, Limited Roll paper conveying apparatus, inkjet printer, and roll paper conveying method
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
US5732274A (en) Method for compilation using a database for target language independence
US5748975A (en) System and method for textual editing of structurally-represented computer programs with on-the-fly typographical display
US20040158820A1 (en) System for generating an application framework and components
US5394546A (en) Database management system and method of extending system functions
JPS6047606B2 (en) program input device
JPH03182932A (en) Program generation system
CN116955393A (en) Data processing method and device, electronic equipment and storage medium
JPH0567155A (en) Information retrieving device
US6925630B1 (en) Method for generating code for processing a database
WO2021042532A1 (en) Database information analysis method and apparatus, computer apparatus, and storage medium
JP2004126680A (en) Sql masking type database access method and computer program
CN116627390B (en) ICD file substitution method and device in aviation software development
JPH07146785A (en) Method for automatically generating program and device therefor
JP2942414B2 (en) Virtual database method
JPH04172529A (en) Automatic program generating system by data oriented software parts
JP2002082811A (en) Compiling method and recording medium
JPH1040089A (en) Method for generating data transfer program
CN115951889A (en) Method, system and application for generating structure body according to database data definition language
CN110263055A (en) A kind of parameter prompts method, apparatus, equipment and storage medium
JPH07244601A (en) Method and device for accessing relational data base
JPH05204699A (en) Identifier searching system at debugging
JP2004054714A (en) Database access script creation system and method, and script generation program
JPH02171832A (en) Data check system
JP2004086818A (en) Database utilizing method and computer for processing office work
JPS62297973A (en) Editing device for soft specification using meaning of input data