JPH02280240A - File processing system for program - Google Patents

File processing system for program

Info

Publication number
JPH02280240A
JPH02280240A JP1102457A JP10245789A JPH02280240A JP H02280240 A JPH02280240 A JP H02280240A JP 1102457 A JP1102457 A JP 1102457A JP 10245789 A JP10245789 A JP 10245789A JP H02280240 A JPH02280240 A JP H02280240A
Authority
JP
Japan
Prior art keywords
storage device
external storage
file
definition information
change definition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1102457A
Other languages
Japanese (ja)
Inventor
Tomoko Kano
狩野 知子
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 JP1102457A priority Critical patent/JPH02280240A/en
Publication of JPH02280240A publication Critical patent/JPH02280240A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To obtain a necessary result in a shorter time by providing a means to change an output destination to an external storage device in a degree sufficient for storing an output file based on the change definition information of the external storage device. CONSTITUTION:Not only when a file to be prepared can be stored in the specific external storage device to be output-designated by a user but also when the file cannot be stored, change definition information 502 of the external storage device designated by the user is read. When the external storage device in the degree sufficient for storing an output file 703 based on the change definition information 502 of the external storage device exists, the output destination can be changed from the specific external storage device to be output-designated by the user into the other external storage device. Thus, without generating the suspension of the processing due to the size shortage of the external storage device, a main body processing can be executed, and the necessary result is obtained in the shorter time.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ファイルを入力し外部記憶装置にファイルを
出力するプログラムのファイル処理方式〔従来の技術〕 従来のプログラムのファイル処理方式においては、第7
図に示すように入力ファイル701を入力し、出力ファ
イル703を出力する機能を持つプログラム702を例
とする。ここで、出力ファイルにはプログラム処理中に
生成され、プログラム処理終了時に消去される一時的フ
アイルも含む。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention provides a file processing method for a program that inputs a file and outputs a file to an external storage device [Prior Art] In a conventional file processing method for a program, 7th
As shown in the figure, a program 702 having a function of inputting an input file 701 and outputting an output file 703 is taken as an example. Here, the output files also include temporary files that are generated during program processing and are deleted when the program processing ends.

第8図に示すようにプログラム702の走行するホスト
マシン801は、ユーザのコマンドを受は付ける入出力
装置802、プログラムの本体処理を行う演算装置80
3、ファイルを格納する外部記憶装置804をもつ。
As shown in FIG. 8, a host machine 801 on which a program 702 runs includes an input/output device 802 that receives and receives user commands, and an arithmetic device 80 that processes the main body of the program.
3. It has an external storage device 804 that stores files.

プログラム702は、第2図に示すようにプログラム起
動時に指定されたファイル名およびパラメータの解析処
理を行う起勤行解析部1oo、入力ファイルを入力する
ファイル入力部105、プログラムの主処理を行う本体
部106、主処理に基づきファイルを生成する出力ファ
イル生成部107および終了処理部108より構成され
る。
As shown in FIG. 2, the program 702 includes a departure and departure analysis section 1oo that analyzes the file name and parameters specified at the time of program startup, a file input section 105 that inputs an input file, and a main body section that performs the main processing of the program. 106, an output file generation section 107 that generates a file based on main processing, and a termination processing section 108.

従来のプログラムのファイル処理方式では、起勤行解析
部100の処理が終わるとただちにファイル入力部10
5で入力ファイルを読み込み、前記各処理部の処理を行
っていた。
In the conventional file processing method of the program, the file input section 10 immediately after the processing of the departure and departure analysis section 100 is completed.
5, the input file was read and the processing by each of the processing units was performed.

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

プログラムの走行するホストマシンとして、例えばパー
ソナル・コンピュータを想定した場合、出力ファイルを
格納する外部記憶装置として、フロッピ・ディスク装置
や小容量のハード・ディスク装置や、メモリ・ディスク
装置などがある。これらの外部記憶装置のサイズはフロ
ッピ・ディスク装置でIMバイト程度、メモリ・ディス
ク装置で数Mバイト程度、小容量のハード・ディスク装
置で数10Mバイト程度である。そのため、プログラム
を実行させる以前の外部記憶装置の状態によっでは、プ
ログラム実行時に使用可能な、外部記憶装置の空きサイ
ズは数100にバイト以下の場合も多い。
Assuming that the host machine on which the program runs is, for example, a personal computer, external storage devices for storing output files include floppy disk devices, small-capacity hard disk devices, memory disk devices, and the like. The size of these external storage devices is approximately IM bytes for a floppy disk device, approximately several megabytes for a memory disk device, and approximately several tens of megabytes for a small capacity hard disk device. Therefore, depending on the state of the external storage device before the program is executed, the free size of the external storage device that can be used when the program is executed is often several hundred bytes or less.

一方、プログラムの出力ファイルのサイズは数にバイト
から数100にバイトになることもある。
On the other hand, the size of a program's output file can range from a few bytes to hundreds of bytes.

従ってプログラムの処理中に、出力ファイルを外部記憶
装置に出力している途中で外部記憶装置が満杯になり、
プログラムの処理が続行不可能となる場合があった。
Therefore, during program processing, the external storage device becomes full while outputting the output file to the external storage device.
There were cases where program processing could not be continued.

通常、プログラムの処理開始から終了までは、出力ファ
イルのサイズにより数分から数10分かかる。
Normally, it takes from several minutes to several tens of minutes from the start to the end of program processing, depending on the size of the output file.

従来のプログラムのファイル処理方式では、外部記憶装
置が満杯になるまでプログラム処理を続けてから実行を
中止することになり、ホストマシンがその時間占有され
てしまう欠点と、利用者は再度プログラムを実行させな
くてはならず、二度手間になる欠点と、プログラムが実
行を中止するまでに行った処理は無意味となり、利用者
が必要とする結果が予定した時間内に得られず、開発効
率が低下するという欠点があった。
In conventional program file processing methods, program processing continues until the external storage device is full and then execution is stopped, which occupies the host machine for that time, and the user has to run the program again. The disadvantage is that the process is redundant, and the processing performed before the program stops execution becomes meaningless, resulting in the user not being able to obtain the results he or she wants within the planned time, which reduces development efficiency. The disadvantage was that it decreased.

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

本発明のプログラムのファイル処理方式は、生成される
ファイルサイズを予測する手段(103)と、外部記憶
装置の残量を読みだす手段(104)と、前記生成され
るファイルサイズを予測する手段と前記残量を読みだ″
す手段とから得られる情報を比較する手段(109)と
、外部記憶装置の変更定義情報を読み出す手段(110
)と、前記外部記憶装置の変更定義情報に基づき前記出
力ファイルを格納するのに充分なだけの外部記憶装置に
出力先を変更する手段(112>とを有する。
The file processing method of the program of the present invention includes a means (103) for predicting the size of the generated file, a means (104) for reading the remaining capacity of the external storage device, and a means for predicting the size of the generated file. Read the remaining amount.
means (109) for comparing information obtained from
), and means (112>) for changing the output destination to an external storage device sufficient to store the output file based on change definition information of the external storage device.

〔作用〕[Effect]

以下、本発明を図面を参照して説明する。 Hereinafter, the present invention will be explained with reference to the drawings.

第1図は本発明の処理手順を示す流れ図である。FIG. 1 is a flowchart showing the processing procedure of the present invention.

まず、起勤行解析部で起勤行を解析し入力ファイル名を
得る(ステップ100)。次に、外部記憶装置の変更定
義情報読み出しの初期設定を行なう(ステップ101)
、例えば、外部記憶装置の変更定義情報の存在する場所
を設定し、外部記憶装置の変更定義情報を読み出すため
の準備を行なう。
First, the starting line analysis section analyzes the starting line and obtains an input file name (step 100). Next, perform initial settings for reading change definition information from the external storage device (step 101).
For example, the location where the change definition information exists in the external storage device is set, and preparations are made for reading the change definition information from the external storage device.

次に、前記入力ファイル名からホストマシン上のオペレ
ーティング・システムを介して、入力ファイルのサイズ
を読みだす(ステップ102)。
Next, the size of the input file is read from the input file name via the operating system on the host machine (step 102).

次に、前記入力ファイルのサイズに基づいて、生成され
る出力ファイルのサイズ予測値を、出力ファイルのサイ
ズ予測値の計算部で計算する(ステップ103)、前記
計算で使用される入力ファイルのサイズと生成される出
力ファイルのサイズとの間の関数は、まず従来のファイ
ル処理方式を用いたプログラムに対して、複数の入力フ
ァイルを入力し、生成される各々の出力ファイルのサイ
ズを実測することにより、入力ファイルのサイズと出力
ファイルのサイズの関係から統計的に導く。
Next, based on the size of the input file, a predicted size of the output file to be generated is calculated by an output file size predicted value calculation unit (step 103), the size of the input file used in the calculation. To determine the function between the size of the output file and the size of the generated output file, first input multiple input files to a program using the conventional file processing method and measure the size of each generated output file. This is statistically derived from the relationship between the input file size and the output file size.

この関数は、プログラムごとに固有であるので、プログ
ラムとしであるファイル・コンバータを例にして、具体
的に得られる関数を説明する。
Since this function is unique to each program, the function obtained will be specifically explained using a file converter as an example of the program.

ここでは関数を得るなめに例として異なる20本の入力
ファイルを用いることとする。この20本の入力ファイ
ルを前記ファイル・コンバータに入力し、出力されたフ
ァイルのサイズを第9図に示す。
Here, we will use 20 different input files as an example to obtain the function. These 20 input files are input to the file converter, and the size of the output files is shown in FIG.

第9図をグラフ化したものすなわち、この20本の入力
ファイルを前記ファイル・コンバータに入力し、入力フ
ァイルのサイズ(以下Xとする)と、生成されるファイ
ルのサイズ(以下yとする)の関数を第10図に示す。
A graph of FIG. 9, in which these 20 input files are input to the file converter, and the size of the input file (hereinafter referred to as X) and the size of the generated file (hereinafter referred to as y) are calculated. The function is shown in FIG.

この場合−次間数で近似できると仮定し、最小2乗法を
適用すると、第10図の線分1001に示すように、3
/=3.4x+Q、9となる。生成される出力ファイル
の予測サイズを求める関数が予想する出力ファイルのサ
イズは、前記20本の入力ファイルが実際に生成したフ
ァイルのサイズを上回るものとすると、前記関数として
は最小2乗法でもとめた間数の切片を上方に変更して、
第10図の線分1o02に示すように、y=3.4x+
4.4となる。これが、この例における求める関数とな
る。
In this case, assuming that it can be approximated by the -order number and applying the least squares method, 3
/=3.4x+Q, 9. Assuming that the size of the output file predicted by the function that calculates the predicted size of the output file to be generated is larger than the size of the file actually generated by the 20 input files, the function calculates the size using the least squares method. Change the intercept of the interval number upwards,
As shown in line segment 1o02 in Figure 10, y=3.4x+
It becomes 4.4. This is the function to be sought in this example.

以上前記関数を用いて出力ファイルのサイズを予測した
後、続いてホストマシン上のオペレーティング・システ
ムを介して、プログラム実行前の利用者が使用可能な外
部記憶装置の空きサイズを読み出すく第1図のステップ
104)。ここでは、利用者が使用している外部記憶装
置をAとする。
After predicting the size of the output file using the above function, the free size of the external storage device that can be used by the user before program execution is read out via the operating system on the host machine. step 104). Here, let A be the external storage device used by the user.

そして前記生成される出力ファイルの予測値と前記Aと
いう外部記憶装置の空きサイズを比較し、Aという外部
記憶装置に出力ファイルが記憶可能か否かを判定する(
ステップ109)。Aという外部記憶装置の空きサイズ
が生成される出力ファイルの予測値を越えている場合(
ステップ109− Y e sの場合)、記憶可能であ
ると判定し、逆にAという外部記憶装置の空きサイズが
生成される出力ファイルの予測値を越えていない場合(
ステップ109−Noの場合)、記憶可能でないと判定
する。
Then, the predicted value of the generated output file is compared with the free size of the external storage device A, and it is determined whether the output file can be stored in the external storage device A (
Step 109). If the free size of external storage device A exceeds the expected value of the output file to be generated (
Step 109 - In the case of Yes), it is determined that storage is possible, and conversely, if the free size of the external storage device A does not exceed the predicted value of the output file to be generated (
Step 109 - In the case of No), it is determined that the data cannot be stored.

前記判定の結果から出力ファイルがAという外部記憶装
置に記憶可能である場合、(ステップ109−Yesの
場合)従来通り入力ファイルを入力しくステップ105
)、入力ファイルを本体部により解析しくステップ10
6)、出力ファイルを生成しくステップ107)、終了
処理を行い(ステップ108)、プログラムを終了する
If the output file can be stored in the external storage device A based on the result of the determination, (step 109 - Yes) the input file is input as usual (step 105).
), the input file is analyzed by the main unit in step 10.
6), generate an output file (step 107), perform termination processing (step 108), and terminate the program.

しかし、出力ファイルがAという外部記憶装置に記憶可
能でない場合(ステップ109−Noの場合)、外部記
憶装置の変更定義情報部の読み出す(ステップ110)
。次に、外部記憶装置の変更定義情報が存在するがどう
かを判断する(ステップ111)。
However, if the output file cannot be stored in the external storage device A (step 109 - No), the change definition information section of the external storage device is read (step 110).
. Next, it is determined whether change definition information for the external storage device exists (step 111).

例えば、外部記憶装置の変更定義情報Bが存在するとし
た場合(ステップ111−Yesの場合)ステップ11
2で外部記憶装置をAがらBに変更する。
For example, if change definition information B of the external storage device exists (step 111 - Yes), step 11
Step 2 changes the external storage device from A to B.

次に、次の外部記憶装置の変更定義情報の読み出し準備
(ステップ113)を行なう。
Next, preparations are made to read the change definition information from the next external storage device (step 113).

その後、Bという外部記憶装置の空きサイズを読み出し
くステップ104)、出力ファイルの予測値と前記残量
との比較を行い(ステップ109)、外部記憶装置の空
きサイズが生成される出力ファイルの予測値を越えてい
る場合(ステップ109−Yesの場合)、記憶可能で
あると判定し、入力ファイルを入力しくステップ105
)、プログラム処理を゛正常に続行させる。しがし記憶
可能でない場合(ステップ109−Noの場合)、外部
記憶装置の変更定義情報部の読み出しくステップ110
)を行なう。
After that, the free size of the external storage device B is read (step 104), the predicted value of the output file is compared with the remaining amount (step 109), and the free size of the external storage device is used to predict the output file to be generated. If it exceeds the value (step 109 - Yes), it is determined that the input file can be stored, and the input file is input.Step 105
), program processing continues normally. If storage is not possible (step 109 - No), read the change definition information section of the external storage device (step 110).
).

外部記憶装置の変更定義情報が存在しない場合(ステッ
プ111−Noの場合)、入力ファイルを入力すること
なく、プログラムの終了処理を行う(ステップ108)
If the external storage device change definition information does not exist (step 111 - No), the program is terminated without inputting the input file (step 108).
.

〔実施例〕〔Example〕

第3図は本発明を用いた第1実施例のプログラムの処理
を示す流れ図である。ここで、第3図を用いて具体的に
説明する。
FIG. 3 is a flowchart showing the processing of the program of the first embodiment using the present invention. Here, a specific explanation will be given using FIG. 3.

本実施例1では、外部記憶装置の変更定義情報が特定の
名前のファイルに格納されるものとする0例えば、外部
記憶装置の変更定義情報を格納する第5図のファイル5
01(ファイル名をINFOとするンに、外部記憶装置
の変更定義情報502としてBを格納する。
In the first embodiment, it is assumed that change definition information of an external storage device is stored in a file with a specific name.For example, file 5 in FIG. 5 stores change definition information of an external storage device.
01 (B is stored as change definition information 502 in the external storage device in the file name INFO.

まず、起勤行解析部で起勤行を解析し入力ファイル名を
得る(ステップ100)。次に、外部記憶装置の変更定
義情報を格納するファイル501をオープンしファイル
ポインタをファイル501の先頭に設定する(ステップ
301)。
First, the starting line analysis section analyzes the starting line and obtains an input file name (step 100). Next, the file 501 that stores change definition information in the external storage device is opened and the file pointer is set at the beginning of the file 501 (step 301).

次に、第1図のステップ102で説明したように、前記
入力ファイル名からホストマシン上のオペレーティング
・システムを介して、入力ファイルのサイズを読みだす
(ステップ102)。
Next, as explained in step 102 of FIG. 1, the size of the input file is read from the input file name via the operating system on the host machine (step 102).

次に、前記入力ファイルのサイズに基づいて、生成され
る出力ファイルのサイズ予測値を、出力ファイルのサイ
ズ予測値の計算部で計算する(ステップ103)。続い
てホストマシン上のオペレーティング・システムを介し
て、プログラム実行前の利用者が使用可能な外部記憶装
置の空きサイズを読みだす(ステップ104)、ここで
は、利用者が使用している外部記憶装置をAとする。
Next, based on the size of the input file, the predicted size of the output file to be generated is calculated by the predicted output file size calculation section (step 103). Next, the free size of the external storage device available to the user before program execution is read out via the operating system on the host machine (step 104). Let be A.

そして前記生成される出力ファイルの予測値と前記Aと
いう外部記憶装置の空きサイズを比較し、Aという外部
記憶装置に出力ファイルが記憶可能か否かを判定する(
ステップ109)、Aという外部記憶装置の空きサイズ
が生成させる出力ファイルの予測値を越えている場合(
ステップ109− Y e sの場合)、記憶可能であ
ると判定し、逆にAという外部記憶装置の空きサイズが
生成される出力ファイルの予測値を越えていない場合(
ステップ109−Noの場合)、記憶可能でないと判定
する。
Then, the predicted value of the generated output file is compared with the free size of the external storage device A, and it is determined whether the output file can be stored in the external storage device A (
Step 109) If the free size of the external storage device A exceeds the predicted value of the output file to be generated (
Step 109 - In the case of Yes), it is determined that storage is possible, and conversely, if the free size of the external storage device A does not exceed the predicted value of the output file to be generated (
Step 109 - In the case of No), it is determined that the data cannot be stored.

前記判定の結果から出力ファイルがAという外部記憶装
置に記憶可能である場合、(ステップ109−Yesの
場合)従来通り入力ファイルを入力しくステップ105
)、入力ファイルを本体部により解析しくステップ10
6)、出力ファイルを生成しくステップ107)、終了
処理を行い(ステップ108)、プログラムを終了する
If the output file can be stored in the external storage device A based on the result of the determination, (step 109 - Yes) the input file is input as usual (step 105).
), the input file is analyzed by the main unit in step 10.
6), generate an output file (step 107), perform termination processing (step 108), and terminate the program.

しかし、出力ファイルがAという外部記憶装置に記憶可
能でない場合(ステップ109−N。
However, if the output file cannot be stored in the external storage device A (step 109-N).

の場合)、外部記憶装置の変更定義情報を格納するファ
イル501から外部記憶装置の変更定義情報502を格
納する領域の内容を読み出す(ステップ110)、次に
、外部記憶装置の変更定義情報が存在するかどうかを判
断する(ステップ111)。
), the contents of the area that stores the change definition information 502 of the external storage device are read from the file 501 that stores the change definition information of the external storage device (step 110). Next, if the change definition information of the external storage device exists, It is determined whether or not to do so (step 111).

この場合、外部記憶装置の変更定義情報502を格納す
る領域の内容Bが存在するので(ステップ111−Ye
sの場合)、外部記憶装置をAからBに変更する。
In this case, since the content B of the area storing the change definition information 502 in the external storage device exists (Step 111-Ye
s), change the external storage device from A to B.

次に、ステップ112で外部記憶装置の変更定義情報を
格納するファイル501のファイルポインタを読み込ん
だ分ずらす(ステップ313)。
Next, in step 112, the file pointer of the file 501 storing change definition information in the external storage device is shifted by the amount read (step 313).

その後、Bという外部記憶装置の空きサイズを読み出し
くステップ104)、出力ファイルの予測値と前記残量
との比較を行い(ステップ109)、外部記憶装置の空
きサイズが生成される出力ファイルの予測値を越えてい
る場合(、ステップ109−Yesの場合)、記憶可能
であると判定し、入力ファイルを入力しくステップ10
5)、プログラム処理を正常に続行させる。しかし記憶
可能でない場合(ステップ109−Noの場合)、再び
外部記憶装置の変更定義情報502を格納する領域から
外部記憶装置の変更定義情報502を格納する領域の内
容を読み出す(ステップ110)。
After that, the free size of the external storage device B is read (step 104), the predicted value of the output file is compared with the remaining amount (step 109), and the free size of the external storage device is used to predict the output file to be generated. If it exceeds the value (step 109 - Yes), it is determined that the input file can be stored, and the input file is input.
5) Allow program processing to continue normally. However, if it is not possible to store the change definition information 502 (step 109 - No), the contents of the area storing the change definition information 502 in the external storage device are read again from the area storing the change definition information 502 in the external storage device (step 110).

外部記憶装置の変更定義情報502を格納する領域の内
容を読み出した結果ファイルポインタがファイルの終わ
りになった場合(ステップ111−Noの場合)、入力
ファイルを入力することなく、プログラムの終了処理を
行う(ステップ108)。
If the file pointer reaches the end of the file as a result of reading the contents of the area that stores the change definition information 502 in the external storage device (step 111 - No), the program ends processing without inputting the input file. (step 108).

第4図は本発明を用いた第2実施例のプログラムの処理
を示す流れ図である。第1実施例では、外部記憶装置の
変更定義情報を特定の名前のファイルに格納していたの
に対し、本実施例では、コマンド起動を指定する入力行
に指定されるものとする。これにより、第1実施例では
、利用者が外部記憶装置の変更定義情報を、固定のファ
イルに格納しておかなければならなかったが、本実施例
では、コマンド起動を指定する入力行に指定できるため
外部記憶装置の変更定義情報を変更す度にファイルの内
容を変更する手間が省ける。
FIG. 4 is a flowchart showing the processing of a program according to a second embodiment of the present invention. In the first embodiment, change definition information in the external storage device is stored in a file with a specific name, whereas in this embodiment, it is specified in an input line that specifies command activation. As a result, in the first embodiment, the user had to store the change definition information in the external storage device in a fixed file, but in this embodiment, it is specified in the input line that specifies command startup. This saves the effort of changing the file contents every time the change definition information in the external storage device is changed.

例えば、起勤行に指定される外部記憶装置の変更定義情
報がBCである場合、第6図で示すように、外部記憶装
置の変更定義情報を格納するメモリ601において、メ
モリのアドレス602(x)に外部記憶装置の変更定義
情報603(B)を格納しメモリのアドレスx+1に外
部記憶装置の変更定義情報604 (C)を格納しメモ
リのアドレスx+2に外部記憶装置の変更定義情報60
5の指定が終了したことを示すOを格納する。また、第
6図において、外部記憶装置の変更定義情報が何番目(
カウンタ領域の内容607)であるかをカウンタ領域6
06に格納する。
For example, if the change definition information of the external storage device specified for the departure line is BC, as shown in FIG. The change definition information 603 (B) of the external storage device is stored in the memory address x+1, the change definition information 604 (C) of the external storage device is stored in the memory address x+2, and the change definition information 60 of the external storage device is stored in the memory address x+2.
Stores O indicating that the specification of 5 has been completed. In addition, in Figure 6, the change definition information of the external storage device is
Counter area 6
Store in 06.

まず、起勤行解析部で起勤行を解析し入力ファイル名を
得る(ステップ100)。次に、起勤行に指定された外
部記憶装置の変更定義情報をメモリに書き込み、カウン
タ領域606に1番目の外部記憶装置の変更定義情報を
示す1(カウンタ領域の内容607)を代入する(ステ
ップ401)。
First, the starting line analysis section analyzes the starting line and obtains an input file name (step 100). Next, the change definition information of the external storage device specified in the starting line is written in the memory, and 1 (contents of the counter area 607) indicating the change definition information of the first external storage device is assigned to the counter area 606 (step 401).

次に、第1実施例ですでに説明したように、前記入力フ
ァイル名からホストマシン上のオペレーティング・シス
テムを介して、入力ファイルのサイズを読みだすくステ
ップ102)。
Next, as already explained in the first embodiment, the size of the input file is read from the input file name via the operating system on the host machine (step 102).

次に、前記入力ファイルのサイズに基づいて、生成され
る出力ファイルのサイズ予測値を出力ファイルのサイズ
予測値の計算部で計算する(ステップ103)。続いて
ホストマシン上のオペレーティング・システムを介して
、プログラム実行前の利用者が使用可能な外部記憶装置
の空きサイズを読みだす(ステップ104)。ここでは
、利用者が使用している外部記憶装置をAとする。
Next, based on the size of the input file, the predicted output file size calculation unit calculates the predicted size of the output file to be generated (step 103). Next, the free size of the external storage device available to the user before program execution is read out via the operating system on the host machine (step 104). Here, let A be the external storage device used by the user.

そして前記生成される出力ファイルの予測値と前記Aと
いう外部記憶装置の空きサイズを比較し、Aという外部
記憶装置に出力ファイルが記憶可能か否かを判定する(
ステップ109)。Aという外部記憶装置の空きサイズ
が生成される出力ファイルの予測値・を越えている場合
(ステップ109−Yesの場合)、記憶可能であると
判定し、逆にAという外部記憶装置の空きサイズが生成
される出力ファイルの予測値を越えていない場合(ステ
ップ109−Noの場合)、記憶可能でないと判定する
Then, the predicted value of the generated output file is compared with the free size of the external storage device A, and it is determined whether the output file can be stored in the external storage device A (
Step 109). If the free size of the external storage device A exceeds the predicted value of the output file to be generated (step 109 - Yes), it is determined that storage is possible, and conversely, the free size of the external storage device A is does not exceed the predicted value of the output file to be generated (step 109 - No), it is determined that the file cannot be stored.

前記判定の結果から出力ファイルがAという外部記憶装
置に記憶可能である場合(ステップ109−Yesの場
合)、従来通り入力ファイルを入力しくステップ105
)、入力ファイルを本体部により解析しくステップ10
6)、出力ファイルを生成しくステップ107)、終了
処理を行い(ステップ108)、プログラムを終了する
If the result of the determination indicates that the output file can be stored in the external storage device A (step 109 - Yes), input the input file as usual.Step 105
), the input file is analyzed by the main unit in step 10.
6), generate an output file (step 107), perform termination processing (step 108), and terminate the program.

しかし、出力ファイルがAという外部記憶装置に記憶可
能でない場合(ステップ109−Noの場合)、外部記
憶装置の変更定義情報を格納するメモリ601からカウ
ンタ領域606の内容である1番目(内容607)の外
部記憶装置の変更定義情報を読み出すくステップ110
)、すなわち、メモリのアドレスXの外部記憶装置の変
更定義情報603を読み出す0次に、カウンタ領域60
6の内容607である1番目の外部記憶装置のの変更定
義情報が存在するかどうかを判断する(ステップ111
)、すなわち、メモリのアドレスXの外部記憶装置の変
更定義情報603が存在するかどうかを判断する。
However, if the output file cannot be stored in the external storage device A (step 109 - No), the first file (content 607) which is the content of the counter area 606 from the memory 601 that stores change definition information of the external storage device Step 110: Read change definition information from the external storage device.
), that is, read out the change definition information 603 of the external storage device at the memory address X. Next, the counter area 60
It is determined whether the change definition information of the first external storage device, which is the content 607 of step 6, exists (step 111
), that is, it is determined whether change definition information 603 of the external storage device at memory address X exists.

この場合、カウンタ領域606の内容607である1番
目の外部記憶装置の変更定義情報603は0ではない(
ステップ111−Yesの場合)、従って、外部記憶装
置をAからBに変更する。
In this case, the change definition information 603 of the first external storage device, which is the contents 607 of the counter area 606, is not 0 (
Step 111 - If Yes), therefore, change the external storage device from A to B.

次に、カウンタ領域606に1カウントアツプした値を
格納する(ステップ413)、すなわち、カウンタ領域
606の内容は2となる。
Next, the value incremented by 1 is stored in the counter area 606 (step 413), that is, the content of the counter area 606 becomes 2.

その後、Bという外部記憶装置の空きサイズを読み出し
くステップ104)、出力ファイルの予測値と前記残量
との比較を行い(ステップ109)、外部記憶装置の空
きサイズが生成される出力ファイルの予測値を越えてい
る場合(ステップ109−Yesの場合)、記憶可能で
あると判定し、入力ファイルを入力しくステップ105
)、プログラム処理を正常に続行させる。しかし記憶可
能でない場合(ステップ109−Noの場合)、再び外
部記憶装置の変更定義情報を格納するメモリ601から
カウンタ領域606の内容607である2番目の外部記
憶装置の変更定義情報を読み出す(ステップ110)、
すなわち、メモリのアドレスx+1の外部記憶装置の変
更定義情報604を読み出す。
After that, the free size of the external storage device B is read (step 104), the predicted value of the output file is compared with the remaining amount (step 109), and the free size of the external storage device is used to predict the output file to be generated. If it exceeds the value (step 109 - Yes), it is determined that the input file can be stored, and the input file is input.Step 105
), allowing program processing to continue normally. However, if the storage is not possible (step 109 - No), the change definition information of the second external storage device, which is the content 607 of the counter area 606, is read out again from the memory 601 that stores the change definition information of the external storage device (step 109). 110),
That is, the change definition information 604 of the external storage device at memory address x+1 is read.

この場合、カウンタ領域606の内容607である2番
目の外部記憶装置の変更定義情報604はOではない(
ステップ111−Yesの場合)、従って、ステップ1
12で外部記憶装置をBからCに変更する。
In this case, the change definition information 604 of the second external storage device, which is the content 607 of the counter area 606, is not O (
Step 111 - If Yes), therefore, Step 1
Step 12 changes the external storage device from B to C.

次に、カウンタ領域(ステップ606)に1カウントア
ツプした値を格納する(ステップ413)、すなわち、
カウンタ領域606の内容は3となる。
Next, the value incremented by 1 is stored in the counter area (step 606) (step 413), that is,
The content of the counter area 606 becomes 3.

その後、Cという外部記憶装置の空きサイズを読み出し
くステップ104)、出力ファイルの予測値と前記残量
との比較を行い(ステップ109)、外部記憶装置の空
きサイズが生成される出力ファイルの予測値を越えてい
る場合(ステップ109−Yesの場合)、記憶可能で
あると判定し、入力ファイルを入力しくステップ105
)、プログラム処理を正常に続行させる。しかし記憶可
能でない場合(ステップ109−Noの場合)、再び外
部記憶装置の変更定義情報を格納するメモリ601から
カウンタ領域606の内容607である3番目の外部記
憶装置の変更定義情報を読み出すくステップ110)、
すなわち、メモリのアドレスx+2の外部記憶装置の変
更定義情報605を読み出す。
After that, the free size of the external storage device C is read out (Step 104), the predicted value of the output file is compared with the remaining amount (Step 109), and the free size of the external storage device is used to predict the output file to be generated. If it exceeds the value (step 109 - Yes), it is determined that the input file can be stored, and the input file is input.Step 105
), allowing program processing to continue normally. However, if the storage is not possible (step 109 - No), read out the change definition information of the third external storage device, which is the content 607 of the counter area 606, again from the memory 601 that stores the change definition information of the external storage device. 110),
That is, the change definition information 605 of the external storage device at memory address x+2 is read.

3番目の外部記憶装置の変更定義情報を読み出した結果
、外部記憶装置の変更定義情報の指定が終了したことを
示す0であり、外部記憶装置の変更定義情報が存在しな
いので(ステップ111−NOの場合)、入力ファイル
を入力することなく、プログラムの終了処理を行う(ス
テップ108) 。
The result of reading the change definition information of the third external storage device is 0, which indicates that the specification of the change definition information of the external storage device has been completed, and since the change definition information of the external storage device does not exist (step 111-NO). ), the program is terminated without inputting the input file (step 108).

〔発明の効果〕 以上説明したように、本発明のファイル処理方式を用い
たプログラムでは、生成されるファイルを利用者が出力
指定した特定の外部記憶装置に格納可能な場合だけでな
く、格納不可能な場合でも利用者が指定した外部記憶装
置の変更定義情報を読み出し前記外部記憶装置の変更定
義情報に基づき前記出力ファイルを格納するのに充分な
だけの外部記憶装置が存在した場合には、利用者が出力
指定した特定の外部記憶装置から他の外部記憶装置に出
力先を変更できることにより、外部記憶装置のサイズ不
足による処理の中止を起こさずに、本体処理を行うこと
ができる。
[Effects of the Invention] As explained above, in the program using the file processing method of the present invention, the generated file can be stored not only in a specific external storage device specified by the user for output, but also in cases where it cannot be stored. Even if possible, if sufficient external storage exists to read the change definition information of the external storage specified by the user and store the output file based on the change definition information of the external storage, By being able to change the output destination from a specific external storage device designated by the user for output to another external storage device, main body processing can be performed without interrupting processing due to insufficient size of the external storage device.

これにより次の効果がある。This has the following effects.

(1)出力先の外部記憶装置に必要な空きサイズが存在
する場合には、プログラムを再実行させることがなくな
り二度手間にならず、必要とする結果をより短時間に得
ることができる。
(1) If the output destination external storage device has the necessary free space, the program does not need to be re-executed, thereby eliminating the need for double effort and allowing the required results to be obtained in a shorter time.

(2)出力先の外部記憶装置に必要な空きサイズがない
場合には、本体処理を行なう前に処理が終了するので、
従来処理を打ち切られるまでの時間占有されていたホス
トマシンを、別の目的に使用することができる。
(2) If the output destination external storage device does not have the necessary free space, the process will end before the main processing begins.
The host machine, which was traditionally occupied until processing was terminated, can now be used for another purpose.

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

第1図は本発明のファイル処理方式を用いたプログラム
の処理部の構成図、第2図は従来のプログラムの処理部
の構成図、第3図は本発明の第1実施例のファイル処理
方式を用いたプログラムの処理部の構成図、第4図は本
発明の第2実施例のファイル処理方式を用いたプログラ
ムの処理部の構成図、第5図は外部記憶装置の変更定義
情報を格納するファイルの構成図、第6図は外部記憶装
置の変更定義情報を格納するメモリの構成図、第7図は
プログラムの扱うファイルの構成図、第8図はプログラ
ムの走行するホストマシンの構成図、第9図は入力ファ
イル・サイズと出力ファイル・サイズの関係図、第10
図は入力ファイル・サイズと出力ファイル・サイズの関
係図(グラフ)である。 100・・・起勤行解析部、101・・・外部記憶装置
変更定義情報読み出しの初期設定部、102・・・入力
ファイルのサイズ読み出し部、103・・・出力ファイ
ルのサイズ予測値の計算部、104・・・外部記憶装置
の残量の計算部、105・・・ファイル入力部、106
・・・本体部、107・・・出力ファイル生成部、10
8・・・終了処理部、109・・・外部記憶装置に記憶
可能か否かの判定部、110・・・外部記憶装置の変更
定義情報部の読み出し、111・・・外部記憶装置の変
更定義情報があるか否かの判定部、112・・・外部記
憶装置の変更部、113・・・次の外部記憶装置変更定
義情報部の読み出し準備部、301・・・ファイルをオ
ーブンしファイルポインタを先頭に設定、313・・・
ファイルポインタを読み込んだ分ずらす、401・・・
外部記憶装置の変更定義情報をメモリに書き込みカウン
タ領域に1を代入、413・・・カウンタ領域を1カウ
ントアツプする、501・・・外部記憶装置の変更定義
情報を格納するファイル、502・・・外部記憶装置の
変更定義情報、601・・・外部記憶装置の変更定義情
報を格納するメモリ、602・・・メモリのアドレス、
603・・・外部記憶装置の変更定義情報、604・・
・外部記憶装置の変更定義情報、605・・・外部記憶
装置の変更定義情報、606・・・カウンタ領域、60
7・・・カウンタ領域の内容。
Fig. 1 is a block diagram of a processing section of a program using the file processing method of the present invention, Fig. 2 is a block diagram of a processing section of a conventional program, and Fig. 3 is a file processing scheme of the first embodiment of the present invention. Fig. 4 is a block diagram of a processing unit of a program using the file processing method of the second embodiment of the present invention, and Fig. 5 is a block diagram of a processing unit of a program using the file processing method of the second embodiment of the invention. Figure 6 is a configuration diagram of the memory that stores change definition information in the external storage device, Figure 7 is a configuration diagram of files handled by the program, and Figure 8 is a configuration diagram of the host machine on which the program runs. , Figure 9 is a relationship diagram between input file size and output file size, Figure 10
The figure is a relationship diagram (graph) between input file size and output file size. 100... Attendance line analysis unit, 101... Initial setting unit for reading external storage device change definition information, 102... Input file size reading unit, 103... Output file size prediction value calculation unit, 104... Remaining capacity calculation unit of external storage device, 105... File input unit, 106
... Main body part, 107... Output file generation part, 10
8... Termination processing unit, 109... Determining unit whether storage is possible in external storage device, 110... Reading change definition information section of external storage device, 111... Change definition of external storage device Determining unit whether information exists or not, 112... External storage device changing unit, 113... Read preparation unit for next external storage device change definition information unit, 301... Opening the file and changing the file pointer. Set at the beginning, 313...
Shift the file pointer by the amount read, 401...
Write change definition information of the external storage device to memory and assign 1 to the counter area, 413... Count up the counter area by 1, 501... File storing change definition information of the external storage device, 502... Change definition information of external storage device, 601...Memory for storing change definition information of external storage device, 602...Address of memory,
603... Change definition information of external storage device, 604...
- External storage device change definition information, 605... External storage device change definition information, 606... Counter area, 60
7...Contents of the counter area.

Claims (1)

【特許請求の範囲】[Claims] 生成されるファイルサイズを予測する手段と、外部記憶
装置の残量を読みだす手段と、前記生成されるファイル
サイズを予測する手段と前記残量を読みだす手段とから
得られる情報を比較する手段と、前記外部記憶装置の変
更定義情報部を読み出す手段と、前記外部記憶装置の変
更定義情報として指定された外部記憶装置に出力先を変
更する手段を有し、前記比較手段により前記生成される
ファイルサイズが前記外部記憶装置の残量を越えたと判
断した場合、前記外部記憶装置の変更定義情報部を読み
出す手段により外部記憶装置の変更定義情報を読み出し
、前記外部記憶装置の変更定義情報として指定された外
部記憶装置に出力先を変更する手段によって出力先を変
更することを特徴とするプログラムのファイル処理方式
means for predicting the size of the generated file; means for reading the remaining capacity of the external storage device; and means for comparing information obtained from the means for predicting the size of the generated file and the means for reading the remaining capacity. and means for reading out the change definition information part of the external storage device, and means for changing the output destination to an external storage device designated as the change definition information of the external storage device, If it is determined that the file size exceeds the remaining capacity of the external storage device, the change definition information of the external storage device is read by the means for reading the change definition information section of the external storage device, and is specified as the change definition information of the external storage device. A file processing method for a program characterized in that the output destination is changed by means of changing the output destination to an external storage device.
JP1102457A 1989-04-21 1989-04-21 File processing system for program Pending JPH02280240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1102457A JPH02280240A (en) 1989-04-21 1989-04-21 File processing system for program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1102457A JPH02280240A (en) 1989-04-21 1989-04-21 File processing system for program

Publications (1)

Publication Number Publication Date
JPH02280240A true JPH02280240A (en) 1990-11-16

Family

ID=14327997

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1102457A Pending JPH02280240A (en) 1989-04-21 1989-04-21 File processing system for program

Country Status (1)

Country Link
JP (1) JPH02280240A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009271883A (en) * 2008-05-12 2009-11-19 Hitachi Software Eng Co Ltd Sparse file monitoring system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63148343A (en) * 1986-12-12 1988-06-21 Hitachi Ltd System for assigning storage medium of file

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63148343A (en) * 1986-12-12 1988-06-21 Hitachi Ltd System for assigning storage medium of file

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009271883A (en) * 2008-05-12 2009-11-19 Hitachi Software Eng Co Ltd Sparse file monitoring system

Similar Documents

Publication Publication Date Title
US5881283A (en) Job scheduling analysis method and system using historical job execution data
JP2001265609A (en) Arithmetic processing unit
JPH02280240A (en) File processing system for program
US6085264A (en) Accounting-information outputting device
JP2504843B2 (en) Buffer expansion device
US6976041B2 (en) Recording medium recorded with program for detecting database operation timing, method of detecting database operation timing, and apparatus for detecting database operation timing
JPH09114661A (en) Register controller
JPH08137703A (en) Task switching device
JPH05241890A (en) Data trace system
JPH05334190A (en) Disk cache system
JPH0362238A (en) Back-up system for decision of file capacity
JPH05165686A (en) Data store control system
JPH04328647A (en) Method and device for automatic file extension
JPH06168079A (en) Data backup system
JPH06250732A (en) Programmable controller
JPH01233526A (en) Data access and program calling system
JPH0719255B2 (en) Dictionary region acquisition processing method in data processing system
JP2001265629A (en) Information processor, information processing method and recording medium
JPH02201541A (en) Compiling system
JPS60160466A (en) Device for controlling hierarchical sequence
JPH02253336A (en) Program starting system
JPH10154089A (en) File input-output device
JPH0272435A (en) Central arithmetic processor
JPH02126319A (en) Input job managing system
JPH06324882A (en) Compiler device