JPH0683576A - Formless input output processing system - Google Patents

Formless input output processing system

Info

Publication number
JPH0683576A
JPH0683576A JP25574992A JP25574992A JPH0683576A JP H0683576 A JPH0683576 A JP H0683576A JP 25574992 A JP25574992 A JP 25574992A JP 25574992 A JP25574992 A JP 25574992A JP H0683576 A JPH0683576 A JP H0683576A
Authority
JP
Japan
Prior art keywords
input
output
file
option
unformatted
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
JP25574992A
Other languages
Japanese (ja)
Inventor
Hitoshi Fujii
等 藤井
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 JP25574992A priority Critical patent/JPH0683576A/en
Publication of JPH0683576A publication Critical patent/JPH0683576A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To execute a formless input output statement to/from a same file between computers whose FORTRAN1 numerical storage unit is different without correction of a user program by devising the content of the file to be in matching with the FORTRAN1 numerical storage unit of the user program. CONSTITUTION:When a formless input output statement of a user program 13 is executed to a file 17, an analysis means 141 of an input output processing routine 14 discriminates whether or not the file 17 is a file inputted/outputted to/from other computer 15 whose FORTRAN1 numerical storage unit is different based on a 1st option 121 of an option 12 at the execution. When the file 17 is the file inputted/outputted to/from the computer 15, an analysis means 142 discriminates how a data type relating to this input output is to be converted based on a 2nd option 122. An input output processing means 143 implements input/output relating to a formless input output statement while implementing conversion to a designated type according to the discrimination result of the analysis means 142.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、FORTRAN言語の
書式なしWRITE文等の書式なし入出力文を処理する
計算機における書式なし入出力処理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an unformatted input / output processing method in a computer for processing unformatted input / output statements such as unformatted WRITE statement in FORTRAN language.

【0002】[0002]

【従来の技術】FORTRAN言語プロセッサを備え、
FORTRAN1数値記憶単位が例えば8バイトである
計算機において、ファイルを出力先として、 WRITE(1)I …(1) なる書式なし出力文を実行すると、8バイトの書式なし
データがファイルに作成される。
2. Description of the Related Art A FORTRAN language processor is provided,
When a FORTRAN1 numerical storage unit is, for example, 8 bytes, an unformatted output statement of WRITE (1) I ... (1) is executed with a file as an output destination, 8-byte unformatted data is created in the file.

【0003】このファイルをFORTRAN1数値記憶
単位が同じ8バイトの計算機で入力するときは、 READ(1)I …(2) なる書式なし出力文を利用者プログラムに記述しておけ
ば良い。
When this file is input by a computer having the same FORTRAN1 numerical storage unit of 8 bytes, it is sufficient to describe the unformatted output statement READ (1) I ... (2) in the user program.

【0004】このように書式なし入出力文は、利用者自
身が作る書式を必要とせず、簡単に入出力が行えるとい
う利点がある。
As described above, the unformatted input / output statement has an advantage that the input / output can be easily performed without requiring the format created by the user himself / herself.

【0005】[0005]

【発明が解決しようとする課題】ところで、書式なし入
出力文によるファイルへの入出力は、自計算機でのみし
か使用しないファイルに対するものだけでなく、他計算
機からも入出力が行われるファイルに対して実行される
場合がある。この場合、他計算機もFORTRAN1数
値記憶単位が自計算機と全く同一であれば問題はない。
しかし、それが異なると、従来は、そのファイル向けに
利用者プログラムを修正するか、或いは書式なしで入出
力をすることを断念せざるを得なかった。
By the way, input / output to / from a file by an unformatted input / output statement is not limited to a file that is used only by the own computer, but also for a file that is input / output from another computer. May be carried out. In this case, there is no problem if the other computer has exactly the same FORTRAN1 numerical storage unit as the own computer.
However, if it is different, conventionally, the user program must be modified for the file or the input and output without format must be abandoned.

【0006】例えば、上記(1)の出力文の実行により
8バイトの書式なしデータが作成されたファイルを、F
ORTRAN1数値記憶単位が4バイトの計算機で入力
するためには、 8バイト整数型がサポートされている場合には、 INTEGER*8 I …(3) READ(1)I …(4) のように利用者プログラムを修正し、 4バイト整数型しかサポートされていない場合には、 INTEGER IDUMMY,I …(5) READ(1)IDUMMY,I …(6) のように利用者プログラムを修正する必要がある。
For example, a file in which 8-byte unformatted data is created by executing the output statement of (1) above is
ORTRAN1 In order to input with a computer whose numerical storage unit is 4 bytes, if an 8-byte integer type is supported, use as INTEGER * 8 I ... (3) READ (1) I ... (4) If the user program is modified and only 4-byte integer type is supported, it is necessary to modify the user program as follows: INTEGER IDUMMY, I ... (5) READ (1) IDUMMY, I ... (6) .

【0007】逆に、FORTRAN1数値記憶単位が4
バイトである計算機において、ファイルを出力先とし
て、 WRITE(1)I …(7) なる書式なし出力文を実行すると、4バイトの書式なし
データがファイルに作成されるが、このファイルをFO
RTRAN1数値記憶単位が8バイトの計算機で入力す
るためには、4バイト整数型がサポートされている場合
には、 INTEGER*4 I …(8) READ(1)I …(9) のように利用者プログラムを修正する必要がある。そし
て、4バイト整数型がサポートされていない計算機では
入力は不可能である。
On the contrary, the FORTRAN1 numerical storage unit is 4
In a computer that is bytes, when an unformatted output statement such as WRITE (1) I ... (7) is executed with a file as an output destination, 4-byte unformatted data is created in the file.
In order to input the RTRAN1 numeric storage unit on a computer with 8 bytes, if 4-byte integer type is supported, use as INTEGER * 4 I ... (8) READ (1) I ... (9) The user program needs to be modified. Input is impossible on a computer that does not support the 4-byte integer type.

【0008】本発明はこのような事情に鑑みて為された
ものであり、その目的は、FORTRAN1数値記憶単
位の異なる計算機間でも利用者プログラムの修正なしに
書式なし入出力文を同一ファイルに対して実行し得るよ
うにすることにある。
The present invention has been made in view of the above circumstances, and an object thereof is to output unformatted input / output statements to the same file without modification of a user program even between computers having different FORTRAN1 numerical storage units. To be able to carry out.

【0009】[0009]

【課題を解決するための手段】本発明は上記の目的を達
成するために、以下の(A),(B),(C)のような
構成を採用している。
The present invention adopts the following configurations (A), (B) and (C) in order to achieve the above object.

【0010】(A)利用者プログラムのファイルに対す
る書式なし入出力文の実行時、実行時オプション中の第
1オプションに基づき、前記利用者プログラムが入出力
を行おうとするファイルがFORTRAN1数値記憶単
位の異なる別の計算機からも入出力を行うファイルであ
るか否かを判定する第1オプション解析手段と、該第1
オプション解析手段によって別の計算機からも入出力さ
れるファイルであると判定されることにより、前記実行
時オプション中の第2オプションに基づき、今回の入出
力にかかるデータの型をどう変換するかを判定する第2
オプション解析手段と、該第2オプション解析手段の判
定結果に従って、入出力並びに指定された型を変換しな
がら、前記書式なし入出力文にかかる入出力を行う入出
力処理手段とを備える構成。
(A) When the unformatted input / output statement for the file of the user program is executed, the file to be input / output by the user program is the FORTRAN1 numerical storage unit based on the first option in the run-time options. First option analysis means for determining whether or not the file is input / output from another different computer;
When the option analysis unit determines that the file is also input / output from another computer, how to convert the type of data related to the current input / output based on the second option in the runtime option is determined. Second to judge
A configuration comprising an option analysis means and an input / output processing means for performing input / output relating to the unformatted input / output statement while converting the input / output and the designated type according to the determination result of the second option analysis means.

【0011】(B)利用者プログラムのファイルに対す
る書式なし入出力文の実行時、実行時オプションに基づ
き、前記利用者プログラムが入出力を行おうとするファ
イルがFORTRAN1数値記憶単位の異なる別の計算
機からも入出力を行うファイルであるか否かを判定する
オプション解析手段と、該オプション解析手段によって
別の計算機からも入出力されるファイルであると判定さ
れることにより、データの型対応テーブルの内容を参照
して今回の入出力にかかるデータの型をどう変換するか
を判定する内部テーブル解析手段と、該内部テーブル解
析手段の判定結果に従って、入出力並びに指定された型
を変換しながら、前記書式なし入出力文にかかる入出力
を行う入出力処理手段とを備える構成。
(B) At the time of executing an unformatted input / output statement for a file of a user program, the file to be input / output by the user program is FORTRAN1 from another computer having a different numerical storage unit based on the run-time option. Contents of the data type correspondence table by determining whether the file is also a file to be input / output, and the option analyzing unit determines that the file is also input / output from another computer. Referring to the internal table analysis means for determining how to convert the type of the data related to the current input / output, and converting the input / output and the specified type according to the determination result of the internal table analysis means. A configuration including an input / output processing means for performing input / output relating to unformatted input / output statements.

【0012】(C)構成(B)のデータの型対応テーブ
ルの代わりにデータの型対応ファイルを有し、内部テー
ブル解析手段の代わりにファイル解析手段を備える構
成。
(C) A structure having a data type correspondence file instead of the data type correspondence table of the configuration (B), and having a file analysis means instead of the internal table analysis means.

【0013】[0013]

【作用】(A)の構成の書式なし入出力処理方式におい
ては、利用者プログラムのファイルに対する書式なし入
出力文の実行時、第1オプション解析手段が、その利用
者プログラムの実行に関して制御を指示する実行時オプ
ション中の第1オプションに基づき、その利用者プログ
ラムが入出力を行おうとするファイルがFORTRAN
1数値記憶単位の異なる別の計算機からも入出力を行う
ファイルであるか否かを判定し、この第1オプション解
析手段によって別の計算機からも入出力されるファイル
であると判定されることにより、第2オプション解析手
段が、前記実行時オプション中の第2オプションに基づ
き、今回の入出力にかかるデータの型をどう変換するか
を判定し、入出力処理手段が、第2オプション解析手段
の判定結果に従って、入出力並びに指定された型を変換
しながら、前記書式なし入出力文にかかる入出力を行
う。
In the unformatted input / output processing method of the configuration (A), when the unformatted input / output statement for the file of the user program is executed, the first option analysis means gives an instruction to control the execution of the user program. Based on the first option in the run-time options, the file that the user program tries to input / output is FORTRAN.
It is determined whether or not the file is input / output from / to another computer having a different numerical storage unit, and the first option analysis means determines that the file is / are to be input / output from / to another computer. , The second option analysis means determines how to convert the type of data relating to the current input / output based on the second option in the runtime option, and the input / output processing means determines the second option analysis means. According to the determination result, input / output relating to the unformatted input / output statement is performed while converting the input / output and the designated type.

【0014】また(B),(C)の構成の書式なし入出
力処理方式においては、利用者プログラムのファイルに
対する書式なし入出力文の実行時、オプション解析手段
が、その利用者プログラムの実行に関して制御を指示す
る実行時オプションに基づき、その利用者プログラムが
入出力を行おうとするファイルがFORTRAN1数値
記憶単位の異なる別の計算機からも入出力を行うファイ
ルであるか否かを判定し、このオプション解析手段によ
って別の計算機からも入出力されるファイルであると判
定されることにより、内部テーブル解析手段あるいはフ
ァイル解析手段が、データの型対応テーブルあるいはデ
ータの型対応ファイルの内容を参照して今回の入出力に
かかるデータの型をどう変換するかを判定し、入出力処
理手段が、内部テーブル解析手段あるいはファイル解析
手段の判定結果に従って、入出力並びに指定された型を
変換しながら、前記書式なし入出力文にかかる入出力を
行う。
In addition, in the unformatted input / output processing method having the configurations of (B) and (C), the option analysis means performs execution of the user program when the unformatted input / output statement for the file of the user program is executed. Based on the run-time option that directs control, it is determined whether the file that the user program attempts to input / output is a file that also performs input / output from another computer with a different FORTRAN1 numeric storage unit, and this option The internal table analysis means or the file analysis means refers to the contents of the data type correspondence table or the data type correspondence file by determining that the file is also input / output from another computer by the analysis means. I / O processing means decides how to convert the data type related to input / output of According to the judgment result of the table analyzing means or file analyzing means, while converting the input and output as well as the specified type, and inputs and outputs according to the unformatted input sentences.

【0015】[0015]

【実施例】次に本発明の実施例について図面を参照して
詳細に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0016】図1を参照すると、本発明の書式なし入出
力処理方式を適用した計算機システムの一例は、計算機
11と計算機15とこの両計算機11,15から参照さ
れるファイル17とを含んでいる。
Referring to FIG. 1, an example of a computer system to which the unformatted input / output processing method of the present invention is applied includes a computer 11, a computer 15, and a file 17 referenced by both computers 11, 15. .

【0017】2つの計算機11,15はそれぞれFOR
TRAN1数値記憶単位が異なっており、計算機11の
FORTRAN1数値記憶単位は例えば8バイト、計算
機15のFORTRAN1数値記憶単位は例えば4バイ
トである。また、計算機15で動作する利用者プログラ
ム16のREAD文(或いはWRITE文)による入出
力処理は従来と同じであり、FORTRAN1数値記憶
単位の異なる計算機間で同一のファイル17を利用者プ
ログラムの修正無しに利用可能とする工夫は計算機11
側に施されている。
The two computers 11 and 15 are respectively FOR
The TRAN1 numeric storage units are different, the FORTRAN1 numeric storage unit of the computer 11 is, for example, 8 bytes, and the FORTRAN1 numeric storage unit of the computer 15 is, for example, 4 bytes. Further, the input / output processing by the READ statement (or WRITE statement) of the user program 16 operating on the computer 15 is the same as the conventional one, and the same file 17 is not modified by the user program between the computers having different FORTRAN1 numerical storage units. Calculator 11 can be used for
It is applied to the side.

【0018】即ち、計算機11には、ファイル17を利
用する利用者プログラム13以外に、利用者が利用者プ
ログラム13の実行に関して制御を指示する実行時オプ
ション12中に第1オプション121および第2オプシ
ョン122が含められ、また入出力処理ルーチン14中
に第1オプション解析手段141,第2オプション解析
手段142および入出力処理手段143が設けられてい
る。
That is, in the computer 11, in addition to the user program 13 that uses the file 17, the first option 121 and the second option 121 are included in the run-time option 12 in which the user instructs control regarding the execution of the user program 13. 122 is included, and the input / output processing routine 14 is provided with a first option analyzing means 141, a second option analyzing means 142, and an input / output processing means 143.

【0019】第1オプション121は、入出力を行おう
とするファイルがFORTRAN1数値記憶単位の異な
る別の計算機15からも入出力を行うファイルであるか
否かを指定するオプションであり、オプション名とし
て、STORAGE−UNIT−nnを有し、値として
SAMEあるいはDIFFERをとる。ここで、nnは
装置番号を、SAMEはFORTRAN1数値記憶単位
が同じであることを、DIFFERはそれが異なること
を示す。従って、図示の第1オプション121は、装置
番号01(本例ではファイル17に対応する)に対する
入出力はFORTRAN1数値記憶単位の異なる計算機
15からも入出力を行うファイルであることを指定して
いる。
The first option 121 is an option for designating whether or not a file to be input / output is a file to / from which another computer 15 having a different FORTRAN1 numerical storage unit also inputs / outputs. It has STORAGE-UNIT-nn and takes SAME or DIFFER as a value. Here, nn indicates the device number, SAME indicates that the FORTRAN1 numerical storage unit is the same, and DIFFER indicates that it is different. Therefore, the first option 121 shown in the drawing specifies that the input / output to / from the device number 01 (corresponding to the file 17 in this example) is also a file to be input / output from the computers 15 having different FORTRAN1 numerical storage units. .

【0020】第2オプション122は、変換すべきデー
タの型およびその変換方法を指定するオプションであ
り、オプション名自体で変換すべきデータの型を示し、
その値で変換する長さを指定している。従って、図示の
オプション名INTEGER,値4BYTEなる第2オ
プション122は、整数型が変換すべきデータの型であ
り、且つ、4バイトとして処理するよう指示している。
なお、本実施例では実数型等の他の型については計算機
11,15でFORTRAN1数値記憶単位が同じであ
ると仮定してあるので、それに関する第2オプションは
実行時オプション12に含まれていないが、それらが異
なる場合にはそれらについての第2オプションも指定し
ておくものである。
The second option 122 is an option for designating the type of data to be converted and its conversion method, and the option name itself indicates the type of data to be converted.
The value specifies the length to be converted. Therefore, the second option 122 having the option name INTEGER and the value 4BYTE shown in the figure indicates that the integer type is the type of data to be converted and that it is processed as 4 bytes.
It should be noted that, in this embodiment, for other types such as the real number type, since it is assumed that the FORTRAN1 numerical storage units are the same in the computers 11 and 15, the second option related thereto is not included in the runtime option 12. However, if they are different, the second option for them is also specified.

【0021】他方、入出力処理ルーチン14の第1オプ
ション解析手段141は、利用者プログラム13からの
ファイル17への書式なし入出力の要求時に、実行時オ
プション12の第1オプション121に基づき、入出力
を行おうとするファイルがFORTRAN1数値記憶単
位の異なる別の計算機15からも入出力を行うファイル
であると指定されているか否かを解析する手段である。
On the other hand, the first option analyzing means 141 of the input / output processing routine 14 receives an input from the user program 13 to the file 17 without formatting, based on the first option 121 of the run-time option 12. This is a means for analyzing whether or not the file to be output is designated as a file to be input / output also from another computer 15 having a different FORTRAN1 numerical storage unit.

【0022】また、第2オプション解析手段142は、
実行時オプション12の第2オプション122に基づ
き、どのデータの型に対してどう変換するかが指定され
ているかを解析する手段である。
The second option analysis means 142 is
It is a means for analyzing which data type and how conversion is specified based on the second option 122 of the runtime option 12.

【0023】更に、入出力処理手段143は、書式なし
入出力文の実行において入出力並びに指定された型が実
行時オプション12の第2オプション122により変換
対象の型であった場合に、その指示に従って変換を行い
ながら指定された長さで入出力を行う手段である。
Further, the input / output processing means 143 instructs the input / output and the designated type when the unformatted input / output statement is executed by the second option 122 of the runtime option 12 when the type is a conversion target. Is a means for performing input / output with a specified length while performing conversion according to.

【0024】以下、本実施例の動作を説明する。The operation of this embodiment will be described below.

【0025】計算機11の利用者プログラム13のファ
イル17に対する書式なしWRITE文の実行により、
入出力処理ルーチン14に制御が移り、先ず第1オプシ
ョン解析手段141が呼び出される。
By executing the unformatted WRITE statement for the file 17 of the user program 13 of the computer 11,
Control is transferred to the input / output processing routine 14, and first the first option analysis means 141 is called.

【0026】第1オプション解析手段141は、実行時
オプション12の第1オプション121を解析すること
により、今回入出力するファイル17がFORTRAN
1数値記憶単位の異なる別の計算機15からも入出力を
行うファイルであるか否かを調べる。そして、DEFF
ERと指定されている、即ちFORTRAN1数値記憶
単位の異なる別の計算機15からも入出力を行うファイ
ルであれば、制御を第2オプション解析手段142に移
し、SAMEと指定されている、即ちFORTRAN1
数値記憶単位が同じ計算機から入出力されるファイルで
あれば、従来と同様な通常の処理へ制御を移行する。図
1の場合、第1オプション121にはDEFFERと指
定されているので、第2のオプション解析手段142へ
制御が移される。
The first option analyzing means 141 analyzes the first option 121 of the runtime option 12 so that the file 17 to be input / output this time is FORTRAN.
It is checked whether or not the file is input and output from another computer 15 having a different numerical storage unit. And DEF
If the file is designated as ER, that is, a file that is also input / output from another computer 15 having a different numerical storage unit, the control is transferred to the second option analysis means 142, and designated as SAME, that is, FORTRAN1.
If it is a file whose numerical storage unit is input and output from the same computer, control is transferred to normal processing similar to the conventional one. In the case of FIG. 1, since the first option 121 is designated as DEFFER, the control is transferred to the second option analysis means 142.

【0027】第2オプション解析手段142は、変換す
べきデータの型を知るために実行時オプション12の第
2オプション122を解析する。今回の入出力にかかる
変数Iは整数型であり、第2オプション122には整数
型を変換すべきデータの型として指定している。そこで
第2オプション解析手段142は、整数型を4バイトと
して処理するよう指示して入出力処理手段143に制御
を移す。なお、今回の入出力が変換すべきデータの型に
ついてのものでない場合には従来と同様な通常の処理へ
進む。
The second option analysis means 142 analyzes the second option 122 of the runtime option 12 in order to know the type of data to be converted. The variable I relating to the input / output this time is an integer type, and the integer type is designated as the type of data to be converted in the second option 122. Therefore, the second option analysis unit 142 instructs the input / output processing unit 143 to process the integer type as 4 bytes. If the input / output of this time is not for the type of data to be converted, the normal processing similar to the conventional processing is performed.

【0028】入出力処理手段143は、第2オプション
解析手段142から指示された内容に従って変換を行い
ながらファイル17に対し入出力を行う。即ち、自計算
機11では変数Iが8バイト整数型として処理されてい
るが、第2オプション122で整数型は4バイトで入出
力するよう指定されているため、下位4バイト分のみを
ファイル17に出力する。なお、上位4バイトはFOR
TRAN1数値記憶単位が4バイトである計算機でもフ
ァイル17が利用されることを想定して利用者プログラ
ム13の処理の段階で0にしておくものである。
The input / output processing means 143 inputs / outputs to / from the file 17 while performing conversion according to the contents instructed by the second option analysis means 142. That is, although the variable I is processed as an 8-byte integer type in the computer 11, the second option 122 specifies that the integer type is input and output in 4 bytes, so only the lower 4 bytes are stored in the file 17. Output. The upper 4 bytes are FOR
TRAN1 is set to 0 at the stage of processing of the user program 13 on the assumption that the file 17 is used even in a computer whose numerical storage unit is 4 bytes.

【0029】以上は出力の場合であるが、入力の場合
は、4バイト分を下位4バイトに入力し、上位4バイト
桁は符号を拡張する。また、入出力並びの型が実数型で
あって例えば計算機11では8バイト,計算機15では
4バイトで処理されているとすると、出力の場合は上位
4バイトをファイル17に出力し、入力の場合は上位4
バイトに入力した後、下位4バイトにはゼロを補う。他
のデータの型も同様に処理される。
The above is the case of output, but in the case of input, 4 bytes are input to the lower 4 bytes and the upper 4 byte digits are expanded in sign. Further, assuming that the type of the input / output sequence is a real number type and is processed with 8 bytes in the computer 11 and 4 bytes in the computer 15, for output, the upper 4 bytes are output to the file 17, and for input, Is the top 4
After filling in the bytes, the lower 4 bytes are filled with zeros. Other data types are processed similarly.

【0030】更に、逆に計算機11のFORTRAN1
数値記憶単位が計算機15より小さい場合、例えば計算
機11,15のFORTRAN1数値記憶単位がそれぞ
れ4バイト,8バイトの場合、第2オプションとしてI
NTEGER=8BYTEが指定されていると、出力の
場合は4バイトに符号拡張した値を出力後、4バイトの
値を出力し、入力の場合は4バイトを捨てて、次の4バ
イトを入力する。実数型や他の型の場合も同様に処理さ
れる。
Further, on the contrary, FORTRAN1 of the computer 11
When the numerical storage unit is smaller than the computer 15, for example, when the FORTRAN1 numerical storage unit of the computers 11 and 15 is 4 bytes and 8 bytes, respectively, the second option is I.
If NTGER = 8BYTE is specified, in the case of output, the value that is sign-extended to 4 bytes is output and then the value of 4 bytes is output, in the case of input, discards 4 bytes and inputs the next 4 bytes. . The same is true for real numbers and other types.

【0031】このようにして、出力したファイル17の
中身は、計算機15上の利用者プログラム16のFOR
TRAN1数値記憶単位に合わせた形になる。従って、
FORTRAN1数値記憶単位が異なる計算機11,1
5間においても、利用者プログラムを修正することなし
に同一ファイル17の利用が可能になる。
In this way, the contents of the file 17 output are the FOR of the user program 16 on the computer 15.
TRAN1 It has a shape that matches the numerical memory unit. Therefore,
FORTRAN1 Computers 11 and 1 with different numerical storage units
Even between 5 periods, the same file 17 can be used without modifying the user program.

【0032】図2は本発明の書式なし入出力処理方式を
適用した計算機システムの別の例を示すブロック図であ
り、図1と同一符号は同一部分を示し、25はデータの
型対応テーブル、241はオプション解析手段、242
は内部テーブル解析手段、243は入出力処理手段であ
る。
FIG. 2 is a block diagram showing another example of a computer system to which the unformatted input / output processing system of the present invention is applied. The same reference numerals as those in FIG. 1 denote the same parts, 25 denotes a data type correspondence table, 241 is an option analysis means, 242
Is an internal table analysis means, and 243 is an input / output processing means.

【0033】図2に示した計算機システムにおいては、
実行時オプション12で第1オプション121のみを指
定し、図1の第2オプション122に代えて、自計算機
11上の各データの型が計算機15上でどう対応するか
を示すデータの型対応テーブル25をシステムとして内
部的に保持している。即ち、計算機11の整数型にかか
るFORTRAN1数値記憶単位が8バイト、計算機1
5の整数型にかかるFORTRAN1数値記憶単位が4
バイトとすると、図示の如く「INTEGER8 4」
という情報を保持している。なお、本実施例では、実数
型にかかる情報「REAL 8 8」に例示するように
双方とも同じ長さになるデータの型についての情報も保
持するようにしている。
In the computer system shown in FIG. 2,
Only the first option 121 is specified in the run-time option 12, and instead of the second option 122 in FIG. 1, a data type correspondence table indicating how each data type on the own computer 11 corresponds on the computer 15. 25 is internally held as a system. That is, the FORTRAN1 numerical storage unit of the integer type of the computer 11 is 8 bytes,
FORTRAN1 numeric storage unit for integer type 5 is 4
If it is a bite, as shown in the figure, "INTEGER84"
Holds the information. In the present embodiment, as illustrated in the information "REAL 8 8" related to the real number type, information about the type of data having the same length is also held in both.

【0034】以下、図2に示した実施例の動作を説明す
る。
The operation of the embodiment shown in FIG. 2 will be described below.

【0035】計算機11の利用者プログラム13のファ
イル17に対する書式なしWRITE文の実行により、
入出力処理ルーチン14に制御が移り、オプション解析
手段241が呼び出されると、オプション解析手段24
1は、実行時オプション12の第1オプション121を
解析することにより、今回入出力するファイル17がF
ORTRAN1数値記憶単位の異なる別の計算機15か
らも入出力を行うファイルであることを認識し、制御を
内部テーブル解析手段242へ移す。なお、第1オプシ
ョン121にSAMEが指定されている場合には通常の
処理へ移行する。
By executing the unformatted WRITE statement for the file 17 of the user program 13 of the computer 11,
When the control is transferred to the input / output processing routine 14 and the option analyzing means 241 is called, the option analyzing means 24
1 analyzes the first option 121 of the run-time option 12 so that the file 17 input / output this time is F
It recognizes that the file is input and output from another computer 15 having a different ORTRAN1 numerical storage unit, and transfers control to the internal table analysis means 242. It should be noted that when SAME is designated in the first option 121, the processing shifts to normal processing.

【0036】内部テーブル解析手段242は、オプショ
ン解析手段241から制御が渡されると、今回の入出力
にかかる変数Iは整数型なので、データの型対応テーブ
ル25中の整数型にかかる情報「INTEGER 8
4」を解析し、整数型を4バイトとして処理するよう指
示して入出力処理手段243に制御を移す。
When the internal table analysis means 242 receives the control from the option analysis means 241, the variable I relating to the input / output at this time is an integer type. Therefore, information "INTEGER 8" concerning the integer type in the data type correspondence table 25 is used.
4 ”is analyzed, an instruction is given to process the integer type as 4 bytes, and the control is transferred to the input / output processing means 243.

【0037】入出力処理手段243は、内部テーブル解
析手段242から指示された内容に従って変換を行いな
がらファイル17に対し入出力を行う。即ち、自計算機
11では変数Iが8バイト整数型として処理されている
が、整数型を4バイトで入出力するよう指定されている
ため、下位4バイト分のみをファイル17に出力する。
The input / output processing means 243 inputs / outputs to / from the file 17 while performing conversion according to the contents instructed by the internal table analysis means 242. That is, although the variable I is processed as an 8-byte integer type in the own computer 11, since the integer type is specified to be input / output in 4 bytes, only the lower 4 bytes are output to the file 17.

【0038】図2に示す実施例では、利用者は実行時オ
プション12において第1オプション121のみを指定
すれば良いので、FORTRAN1数値記憶単位の異な
る他計算機15で扱えるファイル17をより簡単に作成
することができる。
In the embodiment shown in FIG. 2, the user only needs to specify the first option 121 in the run-time option 12, so that the file 17 that can be handled by another computer 15 having a different FORTRAN1 numerical storage unit is created more easily. be able to.

【0039】図3は本発明を適用した計算機システムの
更に別の構成例を示すブロック図であり、図2と同一符
号は同一部分を示し、35はデータの型対応ファイル、
342はファイル解析手段である。
FIG. 3 is a block diagram showing still another configuration example of the computer system to which the present invention is applied. The same reference numerals as those in FIG. 2 denote the same parts, and 35 denotes a data type corresponding file,
Reference numeral 342 is a file analysis means.

【0040】図3の実施例は、図2に示した実施例にお
けるデータの型対応テーブル25をファイルとして、即
ち、自計算機11上の各データの型が計算機15上でど
う対応するかを示すデータの型対応ファイル35として
保有し、そのため入出力処理ルーチン14における図2
の内部テーブル解析手段242に代えてファイル解析手
段342を備えるようにしたものである。
In the embodiment of FIG. 3, the data type correspondence table 25 in the embodiment shown in FIG. 2 is shown as a file, that is, how each data type on the own computer 11 corresponds on the computer 15. It is retained as a data type correspondence file 35, and therefore, in the input / output processing routine 14 shown in FIG.
The file analysis means 342 is provided in place of the internal table analysis means 242.

【0041】動作にあっては、利用者プログラム13の
ファイル17に対する書式なしWRITE文の実行によ
り、入出力処理ルーチン14に制御が移り、オプション
解析手段241が呼び出され、実行時オプション12の
第1オプション121の解析により制御がファイル解析
手段342へ移されると、ファイル解析手段342は、
今回の入出力にかかる変数Iは整数型なので、データの
型対応ファイル35中の整数型にかかる情報「INTE
GER 8 4」を解析し、整数型を4バイトとして処
理するよう指示して入出力処理手段243に制御を移
し、入出力処理手段243はその指示に従って変換を行
いながらファイル17に対し入出力を行うものである。
In operation, by executing the unformatted WRITE statement for the file 17 of the user program 13, control is transferred to the input / output processing routine 14, the option analysis means 241 is called, and the first option 12 of the runtime option 12 is executed. When the control is transferred to the file analysis means 342 by the analysis of the option 121, the file analysis means 342
Since the variable I related to input / output this time is an integer type, the information “INTE” related to the integer type in the data type correspondence file 35
GER 8 4 "is analyzed, an instruction to process the integer type as 4 bytes is given, and the control is transferred to the input / output processing means 243. The input / output processing means 243 performs input / output with respect to the file 17 while performing conversion according to the instruction. It is something to do.

【0042】図3の実施例では、目的に合ったデータの
型対応ファイル35をシステムで準備しておくことがで
きると共に、利用者が目的に合ったデータの型対応ファ
イル35を準備しておくこともできるので、図2の実施
例よりも柔軟な運用が可能になる。
In the embodiment of FIG. 3, the data type correspondence file 35 suitable for the purpose can be prepared by the system, and the user prepares the data type correspondence file 35 suitable for the purpose. Since this is also possible, more flexible operation is possible than in the embodiment of FIG.

【0043】[0043]

【発明の効果】以上説明したように、本発明の書式なし
入出力処理方式によれば、FORTRAN1数値記憶単
位の異なる他の計算機からも入出力が行われるファイル
の場合には、その他の計算機に合ったデータの型に変換
しつつ書式なし入出力文を実行することができるので、
利用者プログラムを修正することなしに、FORTRA
N1数値記憶単位が異なる計算機間で同一ファイルに対
し書式なし入出力文の動作が可能となり、計算機間の移
行性が高まり、使い勝手が良くなる。
As described above, according to the unformatted input / output processing method of the present invention, in the case of a file which is input / output also from another computer having a different FORTRAN1 numerical storage unit, the other computer is input to the other computer. Since you can execute unformatted I / O statements while converting to the matched data type,
FORTRA without modifying the user program
It becomes possible to operate unformatted input / output statements for the same file between computers having different N1 numerical storage units, which improves the transferability between computers and improves usability.

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

【図1】本発明の書式なし入出力処理方式を適用した計
算機システムの一例を示すブロック図である。
FIG. 1 is a block diagram showing an example of a computer system to which an unformatted input / output processing method of the present invention is applied.

【図2】本発明の書式なし入出力処理方式を適用した計
算機システムの別の例を示すブロック図である。
FIG. 2 is a block diagram showing another example of a computer system to which the unformatted input / output processing method of the present invention is applied.

【図3】本発明の書式なし入出力処理方式を適用した計
算機システムの更に別の例を示すブロック図である。
FIG. 3 is a block diagram showing still another example of a computer system to which the unformatted input / output processing method of the present invention is applied.

【符号の説明】[Explanation of symbols]

11,15…計算機 12…実行時オプション 13,16…利用者プログラム 14…入出力処理ルーチン 17…ファイル 25…データの型対応テーブル 35…データの型対応ファイル 121…第1オプション 122…第2オプション 141…第1オプション解析手段 142…第2オプション解析手段 143…入出力処理手段 241…オプション解析手段 242…内部テーブル解析手段 243…入出力処理手段 342…ファイル解析手段 11, 15 ... Computer 12 ... Runtime option 13, 16 ... User program 14 ... Input / output processing routine 17 ... File 25 ... Data type correspondence table 35 ... Data type correspondence file 121 ... First option 122 ... Second option 141 ... First option analysis means 142 ... Second option analysis means 143 ... Input / output processing means 241 ... Option analysis means 242 ... Internal table analysis means 243 ... Input / output processing means 342 ... File analysis means

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 計算機における書式なし入出力処理方式
において、 利用者プログラムのファイルに対する書式なし入出力文
の実行時、実行時オプション中の第1オプションに基づ
き、前記利用者プログラムが入出力を行おうとするファ
イルがFORTRAN1数値記憶単位の異なる別の計算
機からも入出力を行うファイルであるか否かを判定する
第1オプション解析手段と、 該第1オプション解析手段によって別の計算機からも入
出力されるファイルであると判定されることにより、前
記実行時オプション中の第2オプションに基づき、今回
の入出力にかかるデータの型をどう変換するかを判定す
る第2オプション解析手段と、 該第2オプション解析手段の判定結果に従って、入出力
並びに指定された型を変換しながら、前記書式なし入出
力文にかかる入出力を行う入出力処理手段とを具備した
ことを特徴とする書式なし入出力処理方式。
1. In an unformatted I / O processing method for a computer, when the unformatted I / O statement for a file of the user program is executed, the user program performs input / output based on the first option in the runtime options. First option analysis means for determining whether or not the file to be processed is also a file to be input / output from / to another computer having a different FORTRAN1 numerical storage unit, and input / output from / to another computer by the first option analysis means. Second option analysis means for determining how to convert the type of data relating to the current input / output based on the second option in the run-time options by determining that the file is a file that includes the second option. The unformatted input / output is performed while converting the input / output and the specified type according to the determination result of the option analysis means. An unformatted input / output processing method comprising an input / output processing means for inputting / outputting a sentence.
【請求項2】 計算機における書式なし入出力処理方式
において、 利用者プログラムのファイルに対する書式なし入出力文
の実行時、実行時オプションに基づき、前記利用者プロ
グラムが入出力を行おうとするファイルがFORTRA
N1数値記憶単位の異なる別の計算機からも入出力を行
うファイルであるか否かを判定するオプション解析手段
と、 該オプション解析手段によって別の計算機からも入出力
されるファイルであると判定されることにより、データ
の型対応テーブルの内容を参照して今回の入出力にかか
るデータの型をどう変換するかを判定する内部テーブル
解析手段と、 該内部テーブル解析手段の判定結果に従って、入出力並
びに指定された型を変換しながら、前記書式なし入出力
文にかかる入出力を行う入出力処理手段とを具備したこ
とを特徴とする書式なし入出力処理方式。
2. In the unformatted input / output processing method in a computer, the file that the user program is going to perform input / output is FORTRA, when the unformatted input / output statement for the file of the user program is executed, based on the runtime option.
Option analysis means for determining whether or not the file is input / output from / to another computer having a different N1 numerical storage unit, and the option analysis means determines to be a file / output to / from another computer. The internal table analysis means for determining how to convert the type of data relating to the current input / output by referring to the contents of the data type correspondence table, and the input / output and An unformatted input / output processing method comprising: an input / output processing means for performing input / output relating to the unformatted input / output statement while converting a designated type.
【請求項3】 計算機における書式なし入出力処理方式
において、 利用者プログラムのファイルに対する書式なし入出力文
の実行時、実行時オプションに基づき、前記利用者プロ
グラムが入出力を行おうとするファイルがFORTRA
N1数値記憶単位の異なる別の計算機からも入出力を行
うファイルであるか否かを判定するオプション解析手段
と、 該オプション解析手段によって別の計算機からも入出力
されるファイルであると判定されることにより、データ
の型対応ファイルの内容を参照して今回の入出力にかか
るデータの型をどう変換するかを判定するファイル解析
手段と、 該ファイル解析手段の判定結果に従って、入出力並びに
指定された型を変換しながら、前記書式なし入出力文に
かかる入出力を行う入出力処理手段とを具備したことを
特徴とする書式なし入出力処理方式。
3. In the unformatted input / output processing method in a computer, the file that the user program is going to perform input / output is FORTRA based on the execution time and the runtime option of the unformatted input / output statement for the file of the user program.
Option analysis means for determining whether or not the file is input / output from / to another computer having a different N1 numerical storage unit, and the option analysis means determines to be a file / output to / from another computer. By doing so, the file analysis unit that refers to the contents of the data type corresponding file to determine how to convert the data type related to the current input / output, and the input / output and the designation are performed according to the determination result of the file analysis unit. An unformatted input / output processing method comprising: an input / output processing means for performing input / output relating to the unformatted input / output statement while converting the type.
JP25574992A 1992-08-31 1992-08-31 Formless input output processing system Pending JPH0683576A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25574992A JPH0683576A (en) 1992-08-31 1992-08-31 Formless input output processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25574992A JPH0683576A (en) 1992-08-31 1992-08-31 Formless input output processing system

Publications (1)

Publication Number Publication Date
JPH0683576A true JPH0683576A (en) 1994-03-25

Family

ID=17283101

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25574992A Pending JPH0683576A (en) 1992-08-31 1992-08-31 Formless input output processing system

Country Status (1)

Country Link
JP (1) JPH0683576A (en)

Similar Documents

Publication Publication Date Title
JPS6124729B2 (en)
JPH0683576A (en) Formless input output processing system
JP2000122876A (en) Information processor
JPH09179759A (en) Device and method for processing data base for variable length object and storage medium for storing data base processing program
JPH04362738A (en) Variable control method
JP3327662B2 (en) Program translation device and program translation method
KR970011897B1 (en) Words interpretating device
JPH07110769A (en) Vliw type computer
JPH0430239A (en) Command option designation processing system
JPS62282329A (en) Information processor
JPH10111801A (en) Program call controller
JP2848609B2 (en) Logic circuit conversion method and device
JPH02101550A (en) File-form conversion system without format
JPS61253577A (en) Japanese word processing filter
JPS63214838A (en) Data flow graph preparing system
JP2719277B2 (en) Automatic program analyzer
JPH03123937A (en) File description system conversion method
JPH01270154A (en) File converter
JPH0233222A (en) Method for converting internal expression form of character string
JPH04147341A (en) Automatic module execution controller
JPH01255934A (en) Inference device
JPS61147333A (en) Register select circuit
JPH04248624A (en) Program conversion processor
JPH02280228A (en) System for converting input data
JPH02222032A (en) Optimization system for addition/subtraction instruction