JPH04127232A - Program connection processor - Google Patents

Program connection processor

Info

Publication number
JPH04127232A
JPH04127232A JP24952790A JP24952790A JPH04127232A JP H04127232 A JPH04127232 A JP H04127232A JP 24952790 A JP24952790 A JP 24952790A JP 24952790 A JP24952790 A JP 24952790A JP H04127232 A JPH04127232 A JP H04127232A
Authority
JP
Japan
Prior art keywords
program
source
programs
statement
sentence
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.)
Granted
Application number
JP24952790A
Other languages
Japanese (ja)
Other versions
JP3041919B2 (en
Inventor
Hisaaki Goto
久明 後藤
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP24952790A priority Critical patent/JP3041919B2/en
Publication of JPH04127232A publication Critical patent/JPH04127232A/en
Application granted granted Critical
Publication of JP3041919B2 publication Critical patent/JP3041919B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To facilitate the connection between two programs transformed into parts by permuting the file input/output sentence with a proper PERFORM sentence for the source programs of both parts and prepositioning a pre-program of a prescribed form to be carried out by the PERFORM sentence to each source program. CONSTITUTION:At a code generating part 2, the pre-programs are connected to the two source programs 1a and 1b respectively. Then, a GO TO sentence of the preprogram of each source program designates a CONTINUE sentence of the other pre-program as a sentence to be carried out next. A code converting part 3 permutes the input/output sentence prepared to a prescribed file for both source programs with each PERFORM sentence. This PERFORM sentence designates the pre-program of the source program as an executing range. A connection part 4 connects both source programs processed by the part 3 to each other and turns them into a unified source program 5. Thus, it is possible to easily connect together two source programs into a single necessary program.

Description

【発明の詳細な説明】 〔概 要〕 部品として準備される原始プログラムを結合して所要の
プログラムを生成するための処理に関し、部品化した2
プログラムの結合を、特別のプログラムを作らないで、
比較的容易にできるようにしたプログラム結合処理装置
を目的とし、COBOLプログラミング言語によって記
述された2個の原始プログラムを結合するに際し、コー
ド生成部と、コード変換部と、結合部とを設け、該コー
ド生成部は、両該原始プログラムの前に所定形式の前置
プログラムをそれぞれ接続し、各該原始プログラムの該
前置プログラムの0010文が、それぞれ他方の該前置
プログラムのC0NTINUE文を次に実行する文とし
、て指定するように構成し、該コード変換部は、両該原
始プログラムの所定のファイルに対する入出力文を、そ
れぞれPERFORM文に置き換え、該PERFORM
文は当該原始プログラムの該前置プログラムを実行範囲
として指定し、該結合部は、該コード変換部の処理した
両該原始プログラムを結合して一体の原始プログラムに
変更するように構成する。
[Detailed Description of the Invention] [Summary] This invention relates to processing for generating a required program by combining source programs prepared as parts.
Combine programs without creating a special program.
The purpose of this system is to provide a program combining processing device that can be used relatively easily when combining two source programs written in the COBOL programming language. The code generation unit connects a prefix program of a predetermined format in front of both the source programs, and the 0010 statement of the prefix program of each source program follows the C0NTINUE statement of the other prefix program. The code converter replaces each input/output statement for a predetermined file of both source programs with a PERFORM statement, and
The statement specifies the prefix program of the source program as an execution range, and the combining section is configured to combine the two source programs processed by the code conversion section and change them into an integrated source program.

〔産業上の利用分野〕[Industrial application field]

本発明は、部品として準備される原始プログラム、特に
COBOL言語で記述された原始プログラムを結合して
所要のプログラムを生成するための処理を行うプログラ
ム結合処理装置に関する。
The present invention relates to a program combination processing device that performs processing to generate a desired program by combining source programs prepared as components, particularly source programs written in the COBOL language.

〔従来の技術と発明が解決しようとする課題〕各種の機
能を実行するように記述したプログラムを、それぞれ部
品として準備し、必要な機能の部品を集めてプログラム
を作成することが、プログラム開発の省力化のために考
えられている。
[Problems to be solved by conventional technology and the invention] The key to program development is to prepare programs written to execute various functions as parts, and to create a program by collecting parts with the necessary functions. It is designed to save labor.

その場合に、個々の部品をいわゆるサブルーチンとして
準備すると、それらを利用するためには、少なくともメ
インルーチンを作成することが必要になる。
In this case, if individual parts are prepared as so-called subroutines, it is necessary to create at least a main routine in order to use them.

そこで、各部品を独立のプログラムとし、部品間で必要
な情報を授受するために、システムの徒供するメツセー
ジ通信機能を使用し、メツセージファイルによって情報
を渡したり、或いは各部品をいわゆるジョブステップに
分けて順次実行し、ジョブステップ間はファイルで情報
を授受することが可能であるが、各オペレーティングシ
ステム特有のメツセージ通信機能に対応する必要があっ
て、部品の汎用化を困難にしたり、ファイルを仲介する
ために資源及び性能上の問題がある。
Therefore, in order to make each part an independent program and exchange the necessary information between parts, we use the system's message communication function to pass information through message files, or we divide each part into so-called job steps. It is possible to execute job steps sequentially and send and receive information using files between job steps, but it is necessary to support the message communication function unique to each operating system, which makes it difficult to generalize parts and requires files to be used as intermediaries. There are resource and performance issues to do so.

本発明は、部品化した2プログラムの結合を、特別のプ
ログラムを作らないで、比較的容易にできるようにした
プログラム結合処理装置を目的とする。
An object of the present invention is to provide a program combination processing device that can relatively easily combine two programs made into components without creating a special program.

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

第1図は、本発明の構成を示すブロック図である。 FIG. 1 is a block diagram showing the configuration of the present invention.

図はプログラム結合処理装置の構成であって、部品化し
た2プログラムの結合を、特別のプログラムを作らない
で、比較的容易にできるようにしたプログラム結合処理
装置を目的とし、COBOLプログラミング言語によっ
て記述された2個の原始プログラム1a、1bを結合す
るに際し、コード生成部2と、コード変換部3と、結合
部4とを設け、コード生成部2は、両原始プログラム1
a、1bの前に所定形式の前置プログラムをそれぞれ接
続し、各該原始プログラムの該前置プログラムのGo 
 70文が、それぞれ他方の該前置プログラムのCON
TINUE文を次に実行する文として指定するように構
成し、コード変換部3は、両該原始プログラムの所定の
ファイルに対する入出力文を、それぞれPERFORM
文に置き換え、該PERFORM文は当該原始プログラ
ムの該前置プログラムを実行範囲として指定し、結合部
4は、コード変換部3の処理した両該原始プログラムを
結合して一体の原始プログラム5に変更する。
The figure shows the configuration of a program combination processing device, which is written in the COBOL programming language and is intended to be a program combination processing device that can relatively easily combine two componentized programs without creating a special program. When combining the two source programs 1a and 1b, a code generation section 2, a code conversion section 3, and a combination section 4 are provided.
A prefix program of a predetermined format is connected before a and 1b, and the Go of the prefix program of each source program is connected.
70 statements are the CON of the other prefix program.
The TINUE statement is configured to be specified as the next statement to be executed, and the code conversion unit 3 converts the input/output statements for the predetermined files of both source programs into PERFORM.
The PERFORM statement specifies the prefix program of the source program as the execution range, and the combining unit 4 combines both source programs processed by the code conversion unit 3 and changes them into an integrated source program 5. do.

〔作 用〕[For production]

本発明のプログラム結合処理装置により、例えば所定の
受渡しファイルによってジョブステップ間で情報を授受
するようにした2部品の原始プログラムを、そのファイ
ルに入出力するための入出力文を適当なPERFORM
文に置き換え、そのPERFORM文で実行する対象と
して、前記のような所定形の前置プログラムを各原始プ
ログラムに前置することにより、COBOLのPERF
ORM文の復帰機構を利用することによって、元の入出
力文のステップごとに、両プログラムに交互に制御が移
るようにしたプログラムにすることができる。従って、
元の一方のプログラムで前記ファイルへ書出すデータの
領域と、他方のプログラムでそのファイルからデータを
読み込む領域とを同じ領域名にしておけば、何ら特別の
プログラムを作成する必要無く自動的に、直接情報を授
受する一体の原始プログラムに変換して結合することが
できる。
By using the program combination processing device of the present invention, for example, a two-part source program that exchanges information between job steps using a predetermined transfer file can be created by converting input/output statements for inputting and outputting to that file into an appropriate PERFORM.
COBOL PERF
By using the return mechanism of the ORM statement, it is possible to create a program in which control is alternately transferred to both programs at each step of the original input/output statement. Therefore,
If you use the same area name for the area of data written to the file in one original program and the area for reading data from that file in the other program, you can automatically write the data to the file without creating any special program. It can be converted and combined into a single source program that directly exchanges information.

なお、このようにして結合された原始プログラムを、更
に他の原始プログラムと同様にして結合することは当然
できる。
Naturally, the source programs that have been combined in this way can be further combined in the same manner as other source programs.

[実施例] 第1図のコード生成部2は、例えば第2図に示すような
COBOL言語で記述された原始プログ・ラム1a及び
lb (但し図には手続き部の中の、説明に必要な部分
のみを示す)を入力すると、前置プログラム10aと1
0bを生成して、各原始プログラムの前にそれぞれ挿入
して、原始プログラムllaとllbとする。
[Example] The code generation unit 2 shown in FIG. 1 includes source programs 1a and lb written in the COBOL language as shown in FIG. ), prefix programs 10a and 1
0b is generated and inserted before each source program to form source programs lla and llb.

各前置プログラム10a、iobはGo  70文とC
0NTINUE文からなる一定の形式であって、図示の
ように各Go  70文は、相手の前置プログラムのC
0NTINUE文を行き先として指定するようにする。
Each prefix program 10a, iob is Go 70 statement and C
It is a fixed format consisting of 0NTINUE statements, and as shown in the figure, each Go70 statement is a C
Specify the 0NTINUE statement as the destination.

コード生成部2が、この原始プログラムllaと11b
をコード変換部3に渡すと、コード変換部3は原始プロ
グラムを走査して予め定められているファイルへの入出
力を行う入出力文、即ちWRITE及びREAD文を検
索し、それらの入出力文を図示のように、各プログラム
の前置プログラム10a又はlObを実行するPERF
ORME文に置き換える。なお、図においてr (WR
I TE)→」等は説明のために記載したもので、置き
換え前の文を示す。
The code generation unit 2 generates these source programs lla and 11b.
is passed to the code conversion unit 3, the code conversion unit 3 scans the source program, searches for input/output statements that perform input/output to a predetermined file, that is, WRITE and READ statements, and converts these input/output statements. PERF that executes the prefix program 10a or lOb of each program as shown in the figure.
Replace with ORME statement. In addition, in the figure, r (WR
ITE)→'' etc. are written for explanation purposes and indicate the sentence before replacement.

このとき、コード変換部3は、入出力文の入出力対象と
なっているファイルに関する処理を行っている0PEN
及びCLO3E文も変更するものとし、例えばそれらを
すべて実効的に処理動作の無いC0NT INUE文に
置き換えておく。
At this time, the code conversion unit 3 converts the 0PEN that is processing the file that is the input/output target of the input/output
and CLO3E statements are also changed; for example, they are all replaced with a C0NT INUE statement that has no effective processing operation.

結合部4は、以上の処理を終わった原始プログラムll
aとllbとをつなぎ、一体の原始プログラム5として
出力する。この場合に、プログラムの手続き部を例えば
第2図の原始プログラムllaの後に原始プログラムl
lbを続けるように構成し、又一方の原始プログラムl
lbの最後の実行文から原始プログラムllaに戻って
終了するように、図のように5TOP文があれば、これ
を例えば前置プログラムへ行<Go  70文に置き換
える。
The coupling unit 4 is the source program ll that has completed the above processing.
a and llb are connected and output as an integrated source program 5. In this case, for example, the procedure section of the program may be placed after the source program lla in FIG.
lb, and one source program l
If there is a 5TOP statement as shown in the figure, this is replaced with, for example, a prefix program line <Go 70 statement so that the program returns from the last executable statement of lb to the source program lla and ends.

以上のように一体にされた原始プログラム5は、次のよ
うに実行されることになる。即ち、第2図と第3図を参
照して、先ずラベルAAXの文から実行開始されるとし
て、rGOTo  BBY。
The source program 5 integrated as described above will be executed as follows. That is, referring to FIGS. 2 and 3, assuming that execution starts from the statement labeled AAX, rGOTo BBY.

の実行により、ラベルBBYへ行き、rcONTINU
EJが実行され、従ってそのま\下方へ順次命令が実行
される。
By executing , it goes to label BBY and rcONTINU
EJ is executed, and therefore the instructions are executed sequentially downward.

このようにして、ラベルBBZまで進むと、前記のよう
に置き換えられたrPERFORM  BB X  T
HRU  B B YJが実行される。ここでPERF
ORM文は、その実行が終了したとき、そのPERFO
RM文の次の文に戻るように制御されるので、この場合
ラベルBBXからのプログラムがラベルBBYまで実行
されると、次にラベルBBZOPERFORM文の次に
分岐するように復帰情報が設定される。
In this way, going to the label BBZ, rPERFORM BB X T replaced as above
HRU B B YJ is executed. Here PERF
When an ORM statement finishes executing, its PERFO
Since the program is controlled to return to the next statement after the RM statement, in this case, when the program from label BBX is executed up to label BBY, the return information is set so that the program branches to the next label BBZOPERFORM statement.

実際には、ラベルBBXがGo  70文なので、その
文にしたがって元の他方のプログラムのラベルAAYへ
飛び、そのC0NTINUE及びそれ以降の文がシーケ
ンシャルに実行されて、元のWRITE文のあったAA
Zまで行くと、置き換えられたrPERFORM  A
AX  THRU  AAYJが実行されて、前記の場
合と同様に復帰情報の設定があって、rho  To 
 BBY、によりラベルBBYへ戻る。従って、前記の
ラベルBBZにおけるPERFORM文による実行が終
わることになり、制御はラベルBBZの次の文の実行に
移る。
In reality, since the label BBX is a Go70 statement, the program jumps to the original label AAY of the other program according to that statement, and the C0NTINUE and subsequent statements are executed sequentially, and then the Go70 statement is executed.
If you go to Z, the replaced rPERFORM A
AX THRU AAYJ is executed, the return information is set as in the previous case, and rho To
BBY returns to label BBY. Therefore, the execution of the PERFORM statement at label BBZ is finished, and control shifts to execution of the next statement at label BBZ.

以上において、ラベルAAZには元は所定のファイルへ
情報を書き出すためのWRITE文があったので、そこ
へ来るまでのプログラムで、書き出すべきデータが記憶
領域に準備されている筈である。又、ラベルBBZには
元は所定のファイルから情報を読み出すためのREAD
文があったので、その後のプログラムで、記憶領域に読
み出したデータを参照する処理が行われる筈であって、
二の記憶領域を一致させておくことにより情報の授受が
できることは明らかである。
In the above, since label AAZ originally had a WRITE statement for writing information to a predetermined file, the data to be written should have been prepared in the storage area in the program up to that point. Also, the label BBZ originally contains READ for reading information from a specified file.
Since there was a statement, the subsequent program should perform a process to refer to the data read into the storage area.
It is clear that information can be exchanged by matching the two storage areas.

このようにして、元の原始プログラム実行例側で5TO
P文まで処理が終わると、置き換えられたGo  70
文によってラベルBBXに行き、従ってラベルAAYに
飛び、ここで復帰情報によりラベルAAZのPERFO
RM文の次の文へ制御が戻される。
In this way, 5TO is executed on the original source program execution example side.
When processing is completed up to the P sentence, the replaced Go 70
The statement goes to label BBX and therefore to label AAY, where the return information returns PERFO of label AAZ.
Control is returned to the statement following the RM statement.

[発明の効果] 以上の説明から明らかなように本発明によれば、部品と
して準備される2個の原始プログラムを結合して所要の
プログラムを生成することが、特別のプログラムを作ら
ないで、比較的容易にできるようになり、部品化プログ
ラムの利用性を高めるという著しい工業的効果がある。
[Effects of the Invention] As is clear from the above description, according to the present invention, it is possible to generate a required program by combining two source programs prepared as parts without creating a special program. This has become relatively easy and has a significant industrial effect of increasing the usability of componentization programs.

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

第1図は本発明の構成を示すブロック図、第2図はプロ
グラム例を説明する図、 第3図はプログラム実行例の説明図 である。 図において、 1a、1b、5、lla、Ilbは原始プログラム、2
はコード生成部、   3はコード変換部、4は結合部
、 10a、10bは前置プログラム 本発明の構成を示すブロック図 第 図 プログラム例を説明する図 第 図 プログラム実行例の説明図 第 図
FIG. 1 is a block diagram showing the configuration of the present invention, FIG. 2 is a diagram illustrating an example of a program, and FIG. 3 is a diagram illustrating an example of program execution. In the figure, 1a, 1b, 5, lla, and Ilb are source programs, and 2
3 is a code generation section; 3 is a code conversion section; 4 is a coupling section; 10a and 10b are prefix programs; FIG. 2 is a block diagram showing the configuration of the present invention.

Claims (1)

【特許請求の範囲】  COBOLプログラミング言語によって記述された2
個の原始プログラム(1a、1b)を結合するに際し、 コード生成部(2)と、コード変換部(3)と、結合部
(4)とを設け、 該コード生成部(2)は、両該原始プログラムの前に所
定形式の前置プログラムをそれぞれ接続し、各該原始プ
ログラムの該前置プログラムのGOTO文が、それぞれ
他方の該前置プログラムのCONTINUE文を次に実
行する文として指定するように構成し、 該コード変換部(3)は、両該原始プログラムの所定の
ファイルに対する入出力文を、それぞれPERFORM
文に置き換え、該PERFORM文は当該原始プログラ
ムの該前置プログラムを実行範囲として指定し、 該結合部(4)は、該コード変換部の処理した両該原始
プログラムを結合して一体の原始プログラム(5)に変
更するように構成されていることを特徴とするプログラ
ム結合処理装置。
[Claims] 2 written in the COBOL programming language
When combining two source programs (1a, 1b), a code generation section (2), a code conversion section (3), and a combination section (4) are provided, and the code generation section (2) A prefix program of a predetermined format is connected before each source program, so that the GOTO statement of the prefix program of each source program specifies the CONTINUE statement of the other prefix program as the next statement to be executed. The code converter (3) converts the input/output statements for the predetermined files of both source programs into PERFORM.
The PERFORM statement specifies the prefix program of the source program as the execution range, and the combining section (4) combines the two source programs processed by the code conversion section to create a single source program. (5) A program combination processing device characterized by being configured to change.
JP24952790A 1990-09-18 1990-09-18 Program combination processor Expired - Fee Related JP3041919B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24952790A JP3041919B2 (en) 1990-09-18 1990-09-18 Program combination processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24952790A JP3041919B2 (en) 1990-09-18 1990-09-18 Program combination processor

Publications (2)

Publication Number Publication Date
JPH04127232A true JPH04127232A (en) 1992-04-28
JP3041919B2 JP3041919B2 (en) 2000-05-15

Family

ID=17194310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24952790A Expired - Fee Related JP3041919B2 (en) 1990-09-18 1990-09-18 Program combination processor

Country Status (1)

Country Link
JP (1) JP3041919B2 (en)

Also Published As

Publication number Publication date
JP3041919B2 (en) 2000-05-15

Similar Documents

Publication Publication Date Title
JPH06103048A (en) Program development supporting system
JP3562435B2 (en) Automatic component generator
JPH04127232A (en) Program connection processor
JP2002032223A (en) Application generator for plural-os and recording medium
JP2001337935A (en) Application wrapping method in dispersed object environment, its communication management device, and recording medium
JPH03240837A (en) Debug information generating device
JPH0272407A (en) Ladder program converter
JPH103382A (en) Device and method for generating operating system
Balakrishnan et al. An efficient retargetable microcode generator
JPH02101550A (en) File-form conversion system without format
JPH05181652A (en) Program reverse device
JPH0417028A (en) System for translating and editing program language
JPH0452828A (en) Correction program language selection system
JPH04248624A (en) Program conversion processor
JPH02245934A (en) Data processor
JPS62237520A (en) Printer control device
JPH0241252A (en) Change device mechanism
JPH0561745A (en) Transforming device for format
JPH04330526A (en) Relocatable assembler
JPH0588857A (en) Converting system for execute form file
JPH02267627A (en) Automatic production of data contents display program
JPH0358123A (en) Distributed control system
JPH0239261A (en) Updating system for production information on job network unitary control system
JPS6220023A (en) Format compiler system
JPH04347773A (en) Logical simulator

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees