JPH0322141A - Call intermediation system between different languages - Google Patents

Call intermediation system between different languages

Info

Publication number
JPH0322141A
JPH0322141A JP15800589A JP15800589A JPH0322141A JP H0322141 A JPH0322141 A JP H0322141A JP 15800589 A JP15800589 A JP 15800589A JP 15800589 A JP15800589 A JP 15800589A JP H0322141 A JPH0322141 A JP H0322141A
Authority
JP
Japan
Prior art keywords
program
intermediary
language
call
name
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
JP15800589A
Other languages
Japanese (ja)
Inventor
Masahiro Osada
長田 昌弘
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 JP15800589A priority Critical patent/JPH0322141A/en
Publication of JPH0322141A publication Critical patent/JPH0322141A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To promote the efficiency of software development by dividing an intermediation program into a fixing part and a varying part, and generating the varying part of the intermediation program by preparing a macro. CONSTITUTION:The intermediation program varying part 5 and the intermediation program fixing part 2 are provided, and in response to the call of the name of some program of the language of a calling origin, the corresponding program of the language of a called destination is called by the intermediation program varying part 5 and the intermediation program fixing part 2, and processing is requested. Besides, as for the intermediation program varying part 5, correspondence between the name of the program of the calling origin and the name of the program of the called destination is described by using the macro defined beforehand, and the intermediation program varying part 5 consisting of individual processing is generated automatically by assembling the correspondence, and is linked. Thus, at the time of the software development, various kinds of the programs developed before can be handled as parts, and the efficiency of the software development can be promoted.

Description

【発明の詳細な説明】 〔概要〕 異なる言語間でプログラムを呼び出す仲介方式に関し、 仲介プログラムを固定部と可変部とに分け、マクロを用
意して仲介プログラムの可変部をNF4に作威可能にす
ると共に固定部を1箇所にまとめてサイズを小さくする
ことを目的とし、 呼び出し元の言語のあるプログラム名が呼び出された時
に該当する呼び出し先の言語のプログラム名を呼び出す
ためのエントリアドレスを生成する、個別処理からなる
仲介プログラム可変部と、この仲介プログラム可変部か
ら通知されたエントリアドレスをもとに呼び出し先の言
語のプログラムを呼び出す、共通処理からなる仲介プロ
グラム固定部とを備え、呼び出し元の言語のあるプログ
ラム名の呼び出しに対応して、上記仲介プログラム可変
部および上記仲介プログラム固定部によって呼び出し先
の言語の該当プログラムを呼び出し、処理依頼するよう
に構或する。また、上記仲介プログラム可変部について
、予め定義したマクロを用いて呼び出し元のプログラム
名および呼び出し先のプログラム名の対応づけを記述し
、これをアセンプルして当該仲介プログラム可変部を自
動生成し、リンクするように構成する。
[Detailed Description of the Invention] [Summary] Regarding an intermediary method for calling programs between different languages, the intermediary program is divided into a fixed part and a variable part, and macros are prepared to allow the variable part of the intermediary program to be created in NF4. At the same time, the purpose is to reduce the size by consolidating fixed parts in one place, and when a program name in the calling language is called, an entry address is generated to call the program name in the corresponding calling language. , is equipped with an intermediary program variable section consisting of individual processing, and an intermediary program fixed section consisting of a common process that calls a program in the called language based on the entry address notified from this intermediary program variable section, and In response to the call of a program name in a certain language, the variable intermediary program section and the fixed intermediary program section call the corresponding program of the called language and request processing. In addition, for the above-mentioned intermediary program variable part, use a predefined macro to describe the correspondence between the calling program name and the called program name, assemble this, automatically generate the intermediary program variable part, and link it. Configure it to do so.

(産業上の利用分野) 本発明は、異なる言語間でプログラムを呼び出す呼出仲
介方式に関するものである。
(Industrial Application Field) The present invention relates to a call mediation method for calling programs between different languages.

〔従来の技術と発明が解決しようとする課題〕一般にソ
フトウエアを開発する場合、その目的機能に応して記述
言語を選択している。また、1つのソフトウェアの中で
も、モジュール毎に別々の言語で記述し、これらを結合
することもある。
[Prior art and problems to be solved by the invention] Generally, when developing software, a description language is selected depending on its intended function. Furthermore, even within a single piece of software, each module may be written in a different language and these may be combined.

このとき、言語が異なるとリンケージの違いにより、直
接結合しても呼び出しができない場合もでてくるため、
両者を介在する介在プログラムが必要となる. 例えば大型計算機(例えばMシリーズなど)におけるC
OBOLプログラムのリンケージは、OSrVの標準リ
ンケージ規約の通りである。一方、Cプログラムのリン
ケージは、標準リンケージ規約に更にC固有の拡張リン
ケージがある。このため、COBOLプログラムからC
プログラムを呼び出す場合、この拡張部分を吸収する仲
介プログラムが必要となる。この仲介プログラムは、第
3図に示すように下記(1+、(2)の処理を行う必要
がある。
At this time, due to the difference in linkage between different languages, it may not be possible to call even if you connect directly.
An intervening program is required to intervene between the two. For example, C in large computers (such as the M series)
The linkage of the OBOL program follows the standard linkage conventions of OSrV. On the other hand, for the linkage of C programs, there is an extended linkage specific to C in addition to the standard linkage convention. For this reason, from a COBOL program
When calling a program, an intermediary program is required to absorb this extension. This mediation program needs to perform the following processing (1+, (2)) as shown in FIG.

(1)Cプログラムが使用するスタソク領域の獲得、お
よび解放を行う。
(1) Acquire and release the standby area used by the C program.

f2)  C O B O LプログラムがCプログラ
ムを呼び出そうとするとき、仲介してスタンク領域のア
ドレスをCプログラムに通知して呼び出す。
f2) When the COBOL program attempts to call the C program, it mediates and notifies the C program of the address of the stall area and calls it.

このため、呼び出し先のCプログラムの数と名前とが異
なる毎に仲介プログラムを専用にその都度、作戒しなけ
ればならず、作戊に多くの手間が必要になってしまうと
いう問題があった。
For this reason, each time the number and names of C programs to be called differ, it is necessary to dedicate an intermediary program each time, and there is a problem in that a lot of time and effort is required to create the intermediary program. .

尚、第3図構或の動作を簡単に説明する。ここで、21
はCOBOLプログラムを表し、22は仲介プログラム
を表し、23はCプログラムを表し、24はスタック領
域を表す. 第3図において、■:21は、22の初期化処理を呼び
出す。22は、24を動的に獲得し、その先頭アドレス
を22の内部に覚えておく.■=22は、21に復帰す
る。
Incidentally, the operation of the third figure structure will be briefly explained. Here, 21
represents a COBOL program, 22 represents an intermediary program, 23 represents a C program, and 24 represents a stack area. In FIG. 3, ■:21 calls the initialization process of 22. 22 dynamically acquires 24 and stores its start address inside 22. ■=22 returns to 21.

■:2lは、22に対してSUB 1の呼び出しを依頼
する. ■:22は、24のアドレスを通知しなから23を呼び
出す.このとき、SUB 1に対応するfunclを選
択する。
■: 2l requests 22 to call SUB 1. ■: 22 calls 23 without notifying 24 of its address. At this time, funcl corresponding to SUB 1 is selected.

■:23は、f unc 1の処理をして22に復帰す
る。
■: 23 processes f unc 1 and returns to 22.

■:22は、21に復帰する。■: 22 returns to 21.

■ないし[相]は、■ないし■の処理と同一に行う。■ to [phase] are carried out in the same way as the processes of ■ to ■.

■=21は、22の終了処理を呼び出す。22は、24
を解放する。
■=21 calls the termination process of 22. 22 is 24
release.

@:22は、2lに復帰する。@:22 returns to 2l.

本発明は、仲介プログラムを固定部と可変部とに分け、
マクロを用意して仲介プログラムの可変部を簡単に作或
可能にすると共に固定部を1m所にまとめてサイズを小
さくすることを目的としている。
The present invention divides the intermediary program into a fixed part and a variable part,
The purpose is to prepare macros to easily create the variable parts of the intermediary program, and to reduce the size of the fixed parts by consolidating them into one meter.

〔課題を解決する手段〕[Means to solve problems]

第1図を参照して課題を解決する手段を説明する. 第1図において、仲介プログラム可変部5は、呼び出し
元の言語のあるプログラム名(例えばSUB 1)が呼
び出された時に該当する呼び出し先の言語のプログラム
名(例えばfunc 1)を呼び出すためのエントリア
ドレスを生成する、個別処理からなるものである. 仲介プログラム固定部2ば、仲介プログラム可変部5か
ら通知されたエントリアドレスをもとに呼び出し先の言
語のプログラムを呼び出す、共通処理からなるものであ
る. 〔作用〕 本発明は、第1図に示すように、呼び出し元の言語のあ
るプログラム名(例えば5118 1)が呼び出された
時に該当する呼び出し先の言語のプログラム名(例えば
func 1)を呼び出すためのエントリアドレスを生
成する、個別処理からなる仲介プログラム可変部5、お
よびこの仲介プログラム可変部5から通知されたエント
リアドレスをもとに呼び出し先の言語のプログラムを呼
び出す、共通処理からなる仲介プログラム固定部2を設
け、呼び出し元の言語のあるプログラム名の呼び出しに
対応して、仲介プログラム可変部5および仲介プロダラ
ム固定部2によって呼び出し先の言語の該当プログラム
を呼び出し、処理依頼するようにしている。また、仲介
プログラム可変部5について、予め定義したマクロを用
いて呼び出し元のプログラム名および呼び出し先のプロ
グラム名の対応づけを記述し、これをアセンブルして個
別処理からなる当該仲介プログラム可変部5を自動生成
し、リンクするようにしている. 従って、仲介プログラムを固定部と可変部とに分け、マ
クロを用意して仲介プログラム可変部5を簡単に作成可
能にすると共に仲介プログラム固定部2をl箇所にまと
めてサイズを小さくすることが可能となる. 〔実施例〕 次に、第1図および第2図を用いて本発明のl実施例の
構成および動作を順次詳細に説明する。
The means to solve the problem will be explained with reference to Figure 1. In FIG. 1, the intermediary program variable unit 5 has an entry address for calling a program name (for example, func 1) in the corresponding language of the call destination when a certain program name (for example, SUB 1) in the language of the call source is called. It consists of individual processing to generate . The fixed intermediary program section 2 consists of a common process of calling a program in the called language based on the entry address notified from the variable intermediary program section 5. [Operation] As shown in FIG. 1, the present invention has a method for calling a program name (for example, func 1) in the corresponding language of the calling destination when a certain program name (for example, 5118 1) in the calling language is called. A fixed intermediary program consisting of a common process that calls a program in the called language based on the entry address notified from the intermediary program variable section 5, which generates the entry address of the intermediary program variable section 5. A section 2 is provided, and in response to the call of a certain program name in the calling source language, the intermediate program variable section 5 and the intermediate program fixed section 2 call the corresponding program in the called destination language and request processing. For the intermediary program variable section 5, a predefined macro is used to describe the association between the calling program name and the called program name, and this is assembled to create the intermediary program variable section 5 consisting of individual processing. It is automatically generated and linked. Therefore, by dividing the intermediary program into a fixed part and a variable part, and preparing macros, it is possible to easily create the intermediary program variable part 5, and it is also possible to reduce the size by consolidating the intermediary program fixed parts 2 into l locations. becomes. [Embodiment] Next, the configuration and operation of an embodiment of the present invention will be explained in detail using FIGS. 1 and 2.

第F図において、COBOLプログラム1ば、Cプログ
ラム3によって記述されたプログラムを呼び出して処理
依頼するプログラムである。
In FIG. F, COBOL program 1 is a program that calls a program written in C program 3 and requests processing.

仲介プログラムは、仲介プログラム固定部2および仲介
プログラム可変部5から構成され、coBOLプログラ
ムlからの呼び出しに対応して、Cプログラム3によっ
て記述したプログラムを呼び出す、仲介を行うプログラ
ムである。ここでは、共通処理を仲介プログラム固定部
2に記述、および個別処理を仲介プログラム可変部5に
記述するように分離している。この大め、呼び出すCプ
ログラムの数や名前に依存する仲介プログラム可変部5
のみを作戒すればよい(第2図参照)。
The intermediary program is composed of an intermediary program fixed section 2 and an intermediary program variable section 5, and is a program that performs intermediation by calling a program written in the C program 3 in response to a call from the coBOL program 1. Here, common processing is written in the intermediary program fixed part 2, and individual processes are written in the intermediary program variable part 5, so that they are separated. This large intermediary program variable part 5 depends on the number and names of C programs to be called.
All you need to do is discipline yourself (see Figure 2).

次に、第1図構成の動作を詳細に説明する.以下、1は
COBOLプログラムを表し、2ば仲介プログラム固定
部を表し、3はCプログラムを表し、4はスタンク領域
を表し、5は仲介プログラム可変部を表す. ■:lは、2の初期処理を呼び出す。2は、4を動的に
獲得し、その先頭アドレスを2の内部に覚えておく。
Next, the operation of the configuration shown in FIG. 1 will be explained in detail. Hereinafter, 1 represents the COBOL program, 2 represents the fixed part of the intermediary program, 3 represents the C program, 4 represents the standby area, and 5 represents the variable part of the intermediary program. ■:l calls the initial processing of 2. 2 dynamically acquires 4 and stores its start address inside 2.

■:2は、lに復帰する。■: 2 returns to l.

■:lは、5に対してSUBIの呼び出しを依頼する. ■:5は、funclのエントリアドレスを通知しなか
ら2の共通処理を呼び出す. ■=2は、f unc 1を呼び出す。
■:l requests 5 to call SUBI. ■: 5 calls the common process of 2 without notifying the entry address of funcl. ■=2 calls f unc 1.

■:funclから2に復帰する。■: Return to 2 from funcl.

■:2は、5に復帰する。■: 2 returns to 5.

■:5は、1に復帰する。■: 5 returns to 1.

■ないし[相]:これらは、■ないし■の処理と同一で
ある,但し、5のエントリ場所は、SUB2となる. ■:1は、2の終了処理を呼び出す。2は、4を解放す
る。
■ to [phase]: These are the same as the processes for ■ to ■, except that the entry location for 5 is SUB2. ■: 1 calls the termination process of 2. 2 releases 4.

@lは、1に復帰する。@l returns to 1.

以上の処理によって、COBOLプログラム1は、仲介
プログラム可変部5および仲介プログラム固定部2を介
してCプログラム3の該当プログラムを呼び出して処理
依頼することが可能となる。
Through the above processing, the COBOL program 1 can call the corresponding program of the C program 3 via the intermediary program variable section 5 and the intermediary program fixed section 2 and request processing.

この際、呼び出すCプログラムの数や名前により、仲介
プログラム可変部5のみを専用に作戒すればよい。仲介
プログラム固定部2は、共通に使用することかできる。
At this time, it is only necessary to dedicate only the intermediate program variable section 5 depending on the number and names of C programs to be called. The intermediary program fixed part 2 can be used in common.

次に、第2図を用いて仲介プログラム可変部5の作或に
ついて詳細に説明する。
Next, the operation of the intermediary program variable section 5 will be explained in detail using FIG.

第2図において、11は、可変部のアセンブラソースを
示す。例えば■ぱ、予め定義したマクロ1¥BR t 
DGE″を用いて呼び出し元のCOBOLプログラムl
のプログラム名“SUBI”と、呼び出し先のCプログ
ラム3のプログラム名“FtJNc1”との対応づけを
記述する.12は、1lの可変部のアセンプラソースを
、13のマクロ定義体を参照してアセンブルし、オブジ
ェクト(仲介プログラム可変部5のオブジェクト)を生
成する。
In FIG. 2, numeral 11 indicates an assembler source for the variable section. For example, ■Pa, predefined macro 1\BR t
The calling COBOL program using "DGE"
Describe the correspondence between the program name "SUBI" and the program name "FtJNc1" of the called C program 3. 12 assembles the assembler source of the variable part 1l with reference to the macro definition body 13 to generate an object (object of the intermediary program variable part 5).

15は、リンケージエディタによって、14のオブジェ
クト(仲介プログラム可変部5)と、予め用意しておい
た仲介プログラム固定部2、COBOLプログラムl1
およびCプログラム3とをリンクする。これにより、第
1図に示す構或の実行可能モジュールが作威されること
となる.〔発明の効果〕 以上説明したように、本発明によれば、仲介プログラム
を固定部と可変部とに分け、マクロを用意して仲介プロ
グラムの可変部を作戒する構成を採用しているため、仲
介プログラム可変部5を簡単に作或することができると
共に、仲介プログラム固定部2を1箇所にまとめてサイ
ズを小さくすることができる.これにより、COBOL
言語、C言語などを用いてソフトウエア開発を行う際に
、既に開発済の各種プログラムを部品として扱い、ソフ
トウェア開発の効率化を図ると共にプログラム構或の設
計を柔軟に行うことが可能となる。
15 is a linkage editor that creates 14 objects (intermediary program variable section 5), an intermediary program fixed section 2 prepared in advance, and a COBOL program l1.
and C program 3. As a result, an executable module with the structure shown in Figure 1 will be created. [Effects of the Invention] As explained above, according to the present invention, an intermediary program is divided into a fixed part and a variable part, and a macro is prepared to control the variable part of the intermediary program. In addition, the variable intermediary program section 5 can be easily created, and the fixed intermediary program section 2 can be consolidated into one location to reduce its size. This allows COBOL
When developing software using a language such as the C language, various programs that have already been developed can be handled as components, making it possible to improve the efficiency of software development and flexibly design the program structure.

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

第1図は本発明の1実施例構或図、第2図は本発明に係
わる仲介プログラム可変部の作戒説明図、第3図は従来
技術の説明図を示す. 図中、1はCOBOLプログラム、2は仲介プログラム
固定部、3はCプログラム、4ぱスタンク領域、5は仲
介プログラム可変部、11は可変部の7センブラソース
、13はマクロ定義体を表す。
FIG. 1 shows the structure of one embodiment of the present invention, FIG. 2 shows an explanatory diagram of the discipline of the variable part of the intermediary program according to the present invention, and FIG. 3 shows an explanatory diagram of the prior art. In the figure, 1 is a COBOL program, 2 is a fixed part of the intermediate program, 3 is a C program, 4 is a pass tank area, 5 is a variable part of the intermediate program, 11 is the assembler source of the variable part, and 13 is a macro definition body.

Claims (2)

【特許請求の範囲】[Claims] (1)異なる言語間でプログラムを呼び出す仲介方式に
おいて、 呼び出し元の言語のあるプログラム名が呼び出された時
に該当する呼び出し先の言語のプログラム名を呼び出す
ためのエントリアドレスを生成する、個別処理からなる
仲介プログラム可変部(5)と、この仲介プログラム可
変部(5)から通知されたエントリアドレスをもとに呼
び出し先の言語のプログラムを呼び出す、共通処理から
なる仲介プログラム固定部(2)とを備え、 呼び出し元の言語のあるプログラム名の呼び出しに対応
して、上記仲介プログラム可変部(5)および上記仲介
プログラム固定部(2)によって呼び出し先の言語の該
当プログラムを呼び出し、処理依頼するように構成した
ことを特徴とする異なる言語間における呼出仲介方式。
(1) In an intermediary method for calling programs between different languages, it consists of individual processing that generates an entry address to call the program name of the corresponding destination language when a certain program name of the calling source language is called. It is equipped with an intermediary program variable section (5) and an intermediary program fixed section (2) consisting of a common process that calls a program in the called language based on the entry address notified from the intermediary program variable section (5). , The system is configured such that, in response to a call of a certain program name in the caller's language, the intermediary program variable section (5) and the intermediary program fixed section (2) call the corresponding program in the callee's language and request processing. A method for mediating calls between different languages.
(2)上記仲介プログラム可変部(5)について、予め
定義したマクロを用いて呼び出し元のプログラム名およ
び呼び出し先のプログラム名の対応づけを記述し、これ
をアセンブルして当該仲介プログラム可変部(5)を自
動生成し、リンクするように構成したことを特徴とする
請求項第(1)項記載の異なる言語間における呼出仲介
方式。
(2) For the above-mentioned intermediary program variable section (5), use a predefined macro to describe the correspondence between the calling program name and the called program name, and assemble this to assemble the corresponding intermediary program variable section (5). ) is configured to automatically generate and link the call mediating system between different languages according to claim (1).
JP15800589A 1989-06-20 1989-06-20 Call intermediation system between different languages Pending JPH0322141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15800589A JPH0322141A (en) 1989-06-20 1989-06-20 Call intermediation system between different languages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15800589A JPH0322141A (en) 1989-06-20 1989-06-20 Call intermediation system between different languages

Publications (1)

Publication Number Publication Date
JPH0322141A true JPH0322141A (en) 1991-01-30

Family

ID=15662175

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15800589A Pending JPH0322141A (en) 1989-06-20 1989-06-20 Call intermediation system between different languages

Country Status (1)

Country Link
JP (1) JPH0322141A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6359854B1 (en) 1993-11-01 2002-03-19 Mitsubishi Denki Kabushiki Kaisha Disk reproducing apparatus
JP2011222022A (en) * 2010-04-13 2011-11-04 Intel Corp Method and system for achieving non-abi compliant function over unseen interface

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6359854B1 (en) 1993-11-01 2002-03-19 Mitsubishi Denki Kabushiki Kaisha Disk reproducing apparatus
JP2011222022A (en) * 2010-04-13 2011-11-04 Intel Corp Method and system for achieving non-abi compliant function over unseen interface
US8464230B2 (en) 2010-04-13 2013-06-11 Intel Corporation Methods and systems to implement non-ABI conforming features across unseen interfaces

Similar Documents

Publication Publication Date Title
JP2569092B2 (en) Address resolution method for I / O device control program
US9280527B2 (en) Method and system for directly mapping web services interfaces and Java interfaces
Bruneton et al. Recursive and dynamic software composition with sharing
JP4146983B2 (en) Process method and data processing system for calling method of server object
US5365606A (en) Virtual software machine running multiple program modules in a single address space of a target computer
US6263498B1 (en) Method and apparatus for enabling server side distributed object modification
JPH01306923A (en) System for connecting different languages
WO2000077686A2 (en) Method for distributed transaction support using jdbc 1.0 drivers
JPH02272627A (en) Digital computer system and method of invocation of procedure of the same
US7162721B2 (en) Application-independent API for distributed component collaboration
US20070073849A1 (en) Method and system for unifying configuration descriptors
JP2001522114A (en) Method and system for facilitating distributed software development in a distribution-aware manner
JP2001527234A (en) Call mechanism for static and dynamic linked functions in an object-oriented controller using a heterogeneous development tool set
WO2008080524A1 (en) Web container extension architecture
JPH09231077A (en) Method for reducing size of computer program
EP0704795B1 (en) A data processing system providing an encapsulation system and a method of operating such a system
JPH0322141A (en) Call intermediation system between different languages
JP2001236234A (en) Computer and computer readable recording medium
KR100602318B1 (en) Service application architecture for integrated network service providers
Itoh et al. Scone: using concurrent objects for low-level operating system programming
EP0417916B1 (en) Procedure state descriptor system for digital data processors
Hamlin Jr et al. Configurable applications for graphics employing satellites (CAGES)
JP2006236375A (en) Web application development method, development support system, and program about development method
Bosch Composition through superimposition
Olsson et al. Remote procedure call