JPS62160536A - Cobol syntax converting method - Google Patents

Cobol syntax converting method

Info

Publication number
JPS62160536A
JPS62160536A JP155586A JP155586A JPS62160536A JP S62160536 A JPS62160536 A JP S62160536A JP 155586 A JP155586 A JP 155586A JP 155586 A JP155586 A JP 155586A JP S62160536 A JPS62160536 A JP S62160536A
Authority
JP
Japan
Prior art keywords
cobol
conversion
program
syntax
source
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
JP155586A
Other languages
Japanese (ja)
Inventor
Hiroshi Yoneyama
米山 博
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP155586A priority Critical patent/JPS62160536A/en
Publication of JPS62160536A publication Critical patent/JPS62160536A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To perform the syntax conversion of COBOL source programs quickly in bulk by registering a correspondence table of COBOL syntax and reading in the COBOL source program in a transfer source to analyze syntax and converting automatically the source program to COBOL language specifications of a transfer destination in accordance with the conversion correspondence table. CONSTITUTION:The COBOL source program is decomposed into one-word units by a program 15 in the first stage of syntax conversion to output intermediate files 17 and 30. Information 40 related to individual words are stored in the intermediate file 17. A source program of COBOL language specifications in the transfer destination is generated from the intermediate file 17 by a program 18 of the second stage of syntax conversion. In this case, words whose conversion is unnecessary are left as they are in the original source program and word whose conversion is necessary are converted in accordance with added conversion parameters by the program 18 to generate the source program. Simultaneously, a source list after conversion is outputted as well.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は事務用プログラム言語コボルを異なる計算機間
で使用するために構文の変換を行なうコボル構文変換方
法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a Cobol syntax conversion method for converting the syntax of the office programming language Cobol for use between different computers.

〔従来の技術〕[Conventional technology]

従来のコボル構文変換方法においては、移行する計算機
でコンパイルを行ない、その計算機の命令に応じて人手
により置き換えるか又は移行する計算機に合わせて新規
に開発するかしていた。
In the conventional Cobol syntax conversion method, compiling was performed on the computer to be migrated, and the code was replaced manually according to the instructions of that computer, or a new one was developed to suit the computer to be migrated.

人手により置き換える場合を第3図に示す。第3図にお
いて、1は入出力装置、2はコボルソースプログラム、
3はコボル構文変換用ソースプログラム、4はコボル構
文修正実行プログラム、5はコボル構文修正後ソースプ
ログラム、6はコボル構文修正後のリストすなわちソー
スプログラム5のリストである。オペレータはソースプ
ログラム2を参照しながら入出力装置1を操作し、ソー
スプログラム3をプログラム4により修正して修正後の
ソースプログラム5を得る。
FIG. 3 shows the case of manual replacement. In Fig. 3, 1 is an input/output device, 2 is a Kobol source program,
3 is a source program for Cobol syntax conversion, 4 is a Cobol syntax correction execution program, 5 is a source program after Cobol syntax correction, and 6 is a list of the source program 5 after Cobol syntax correction. The operator operates the input/output device 1 while referring to the source program 2, modifies the source program 3 using the program 4, and obtains a modified source program 5.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述したような人手によるプログラムの変換作業では、
変換ミスが起きやすい、また、大量のプログラムを人手
で変換すると多大な時間が必要であるなどの問題があっ
た。
In the manual program conversion work described above,
There were problems such as conversion errors were easy to occur, and it took a lot of time to manually convert a large number of programs.

本発明はこのような点に鑑みてなされたものであり、そ
の目的とするところは、変換作業を機械的に行なうこと
により、変換ミスを防ぎ、変換作業時間を大幅に短縮す
るコボル構文変換方法を得ることにある。
The present invention has been made in view of these points, and its purpose is to provide a Cobol syntax conversion method that prevents conversion errors and significantly shortens conversion work time by performing conversion work mechanically. It's about getting.

〔問題点を解決するための手段〕[Means for solving problems]

このような目的を達成するために本発明は、事務用プロ
グラム言語コボルを異なる計算機間で使用するために構
文の対応表を登録するようにしたものである。
In order to achieve such an object, the present invention registers a syntax correspondence table in order to use the office programming language COBOL between different computers.

〔作用〕[Effect]

本発明においては、移行元と移行先の変換対応表を変え
ることにより、任意の計算機間でのコボルソースプログ
ラムの構文変換を行なうことができる。
In the present invention, syntax conversion of a Cobol source program between arbitrary computers can be performed by changing the conversion correspondence tables of the source and destination.

〔実施例〕〔Example〕

本発明に係わるコボル構文変換方法の一実施例を第1図
、第2図を用いて説明する。
An embodiment of the Cobol syntax conversion method according to the present invention will be described with reference to FIGS. 1 and 2.

第1図において、11は変換する複数のソースプログラ
ムを格納したフロッピーディスク(FD)、12は変換
する複数のソースプログラムを格納した磁気テープであ
る。移行元のコボルソースプログラムをフロッピーディ
スク11または磁気テープ12に格納しておき、プログ
ラム13により、変換したい複数のソースプログラムを
一本のファイル14に加工して出力する。構文変換の第
1段階のプログラム15では、ファイル14を解析し、
ファイル16に登録しである変換パラメータに基づいて
移行先のコボルの予約語のチェックを行ない、後述する
プログラム18で必要とする計算機間のコボルの対応関
係などの情報を付加して中間ファイル17を作成する。
In FIG. 1, 11 is a floppy disk (FD) that stores a plurality of source programs to be converted, and 12 is a magnetic tape that stores a plurality of source programs to be converted. A source Cobol source program is stored in a floppy disk 11 or a magnetic tape 12, and a program 13 processes a plurality of source programs to be converted into a single file 14 and outputs the file. The program 15 in the first stage of syntax conversion analyzes the file 14,
The reserved words of the destination Cobol are checked based on the conversion parameters registered in the file 16, and the intermediate file 17 is created by adding information such as the correspondence of Cobols between computers required by the program 18 described later. create.

構文変換の第2段階のプログラム18では、中間ファイ
ル17から移行先のコボルの言語仕様のソースプログラ
ム群19を作成し、変換後のソースリスト20を出力す
る。
A program 18 at the second stage of syntax conversion creates a source program group 19 of the language specifications of the destination COBOL from the intermediate file 17, and outputs a source list 20 after conversion.

次に動作について説明する。構文変換の第1段階のプロ
グラム15では、第2図に示すように、コボルのソース
プログラムを1語単位に分解し、中間ファイル30 (
第1図の中間ファイル17と同等)を出力する。中間フ
ァイル17では、それぞれの語に関する情報40(前置
空白数2語の開始カラム、語の長さ1語の属性1行の先
頭か否か、移行先の計算機の予約語になっているか、構
文変換が必要か否かなど)を格納する。構文変換の第2
段階のプログラム18では、中間ファイル17から移行
先のコボルの言語仕様のソースプログラムを作成する。
Next, the operation will be explained. In the program 15 at the first stage of syntax conversion, as shown in FIG.
(equivalent to the intermediate file 17 in FIG. 1) is output. In the intermediate file 17, information 40 regarding each word (start column with prefix blank number of 2 words, attribute of word length of 1 word, whether it is at the beginning of 1 line, whether it is a reserved word of the migration destination computer, etc.) whether syntax conversion is necessary, etc.). Second syntactic conversion
In the step program 18, a source program of the language specifications of the destination COBOL is created from the intermediate file 17.

この際、プログラム18では、変換する必要のない語に
ついては元のソースプログラムのまま、また変換する必
要のある語については付加されている変換のパラメータ
に従って変換してソースプログラムを作成する。また同
時に変換後のソースリストを出力する。
At this time, the program 18 creates a source program by leaving words that do not need to be converted as they are in the original source program, and converting words that need to be converted according to the added conversion parameters. It also outputs the converted source list at the same time.

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

以上説明したように本発明は、事務用プログラム言語コ
ボルを異なる計算機間で使用するために構文の対応表を
登録することにより、移行元のコボルのソースプログラ
ムを読み込んで構文の解析を行ない、変換対応表に従っ
て移行先のコボル言語仕様にソースプログラムを自動的
に変換することができるので、コボルソースプログラム
の構文変換が迅速かつ容易に短時間で大量に行なえると
いう効果がある。
As explained above, in order to use the office programming language Kobol between different computers, the present invention registers a syntax correspondence table to read the source program of the source Kobol, analyze the syntax, and convert it. Since the source program can be automatically converted into the target Cobol language specification according to the correspondence table, the syntax conversion of a large number of Cobol source programs can be quickly and easily performed in a short period of time.

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

第1図は本発明に係わるコボル構文変換方法を説明する
ための説明図、第2図はコボルソースプログラムの分解
法を説明するための説明図、第3図は従来のコボル構文
変換方法を説明するための説明図である。 11・・・・フロッピーディスク、12・・・・磁気テ
ープ、13,15.18・・・・プログラム、14.1
9・・・・ソースプログラム、16・・・・構文変換パ
ラメータ、17・・・・中間ファイル、20・・・・ソ
ースリスト。
Figure 1 is an explanatory diagram for explaining the Cobol syntax conversion method according to the present invention, Figure 2 is an explanatory diagram for explaining the decomposition method of a Cobol source program, and Figure 3 is an explanatory diagram for explaining the conventional Cobol syntax conversion method. FIG. 11...Floppy disk, 12...Magnetic tape, 13,15.18...Program, 14.1
9...Source program, 16...Syntax conversion parameters, 17...Intermediate file, 20...Source list.

Claims (1)

【特許請求の範囲】[Claims] 事務用プログラム言語コボルを異なる計算機間で使用す
るために構文の対応表を登録することにより、任意の計
算機間でのプログラムの構文変換を行なうことを特徴と
するコボル構文変換方法。
A Cobol syntax conversion method characterized by converting the syntax of a program between arbitrary computers by registering a syntax correspondence table in order to use the office programming language Cobol between different computers.
JP155586A 1986-01-08 1986-01-08 Cobol syntax converting method Pending JPS62160536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP155586A JPS62160536A (en) 1986-01-08 1986-01-08 Cobol syntax converting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP155586A JPS62160536A (en) 1986-01-08 1986-01-08 Cobol syntax converting method

Publications (1)

Publication Number Publication Date
JPS62160536A true JPS62160536A (en) 1987-07-16

Family

ID=11504770

Family Applications (1)

Application Number Title Priority Date Filing Date
JP155586A Pending JPS62160536A (en) 1986-01-08 1986-01-08 Cobol syntax converting method

Country Status (1)

Country Link
JP (1) JPS62160536A (en)

Similar Documents

Publication Publication Date Title
JPS62160536A (en) Cobol syntax converting method
JPS6022373B2 (en) Program conversion mechanism for programmable control equipment
JPS63268050A (en) Continuous converting device for multiple file
JPH03126103A (en) Program generating device for robot
JPH0250730A (en) Language converting system based upon common machine word
JPH04273328A (en) Generation system for cross-reference list
JPH04248624A (en) Program conversion processor
JPH03176740A (en) Interchange system for source file
JPH04330521A (en) Cross reference list forming system
JPH0266631A (en) Address table output system using japanese label
JPH0540612A (en) Computer prperty conversion processor
JPS63104139A (en) Compiling system for cobol source list
JPH03136134A (en) Automatic patch data conversion
JPS63156254A (en) Control method for intermediate text by interpreter
JPS60134335A (en) Printing method of source program
JPH0368417B2 (en)
JPH03250220A (en) Program converting system
JPH07248840A (en) Charging data interchanging method between different kinds of operating systems
JPH03230282A (en) Microprocessor
JPH03127224A (en) External name changing system
JPH05100829A (en) Compiling unit management system
JP2000076258A (en) Method for automatically generating rdb
JPH0690669B2 (en) Character string manipulation instruction compilation processing method
JPS62235651A (en) Test data origination device
JPH03257623A (en) Automatic executing system for program