JPH06187100A - Record extraction device - Google Patents

Record extraction device

Info

Publication number
JPH06187100A
JPH06187100A JP4355642A JP35564292A JPH06187100A JP H06187100 A JPH06187100 A JP H06187100A JP 4355642 A JP4355642 A JP 4355642A JP 35564292 A JP35564292 A JP 35564292A JP H06187100 A JPH06187100 A JP H06187100A
Authority
JP
Japan
Prior art keywords
record
block
buffer
data
extraction
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
JP4355642A
Other languages
Japanese (ja)
Inventor
Akira Shirai
彰 白井
Shiyouji Karakida
章次 柄木田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP4355642A priority Critical patent/JPH06187100A/en
Publication of JPH06187100A publication Critical patent/JPH06187100A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To extract records in a short processing time from a storage device for performing storage with a block provided with a size unrelated to the size of the record as a unit. CONSTITUTION:An input means 2 makes a block buffer 30 read data from the storage device 10 by a block unit. A record extraction means 3a successively extracts the records from the block buffer 30, outputs extraction information and also outputs detection signals when the record (divided record) spread over two blocks is present. A transfer means 5 transfers the unprocessed data of the divided record from the block buffer 30 to a record buffer 40 and requests next block data to the input means 2. Also, the remaining data of the divided record present in returned block data are transferred to the record buffer 40. The record extraction means 3b extracts the records inside the record buffer 40 and outputs the extraction information. A record processing means 4 processes the record indicated by the extraction information of the record extraction means 3a and 3b.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、レコードを単位として
構成されるデータからレコードを抽出するレコード抽出
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a record extracting device for extracting a record from data constituted by a record.

【0002】[0002]

【従来の技術】固定磁気ディスクからブロックバッファ
にブロック単位でデータを読み出し、それをレコード単
位で処理してプリントイメージに変換した後、プリンタ
に送出するような場合、ブロックバッファから1レコー
ドずつデータを抽出する必要がある。しかし、磁気ディ
スクのブロックの長さは固定長で、レコードの長さは任
意(可変長)である場合が一般的であり、1つのレコー
ドが2つ以上のブロックに跨がって存在する場合が生じ
てくる。
2. Description of the Related Art When data is read from a fixed magnetic disk into a block buffer in block units, processed in record units, converted into a print image, and then sent to a printer, data is recorded from the block buffer one record at a time. Need to be extracted. However, in general, the block length of a magnetic disk is fixed and the record length is arbitrary (variable length), and one record exists across two or more blocks. Will occur.

【0003】そのように、レコードが2つ以上のブロッ
クに跨がって存在する場合でも処理できるようにしたレ
コード抽出装置として、次のような技術が開発されてい
る。図14は、従来のレコード抽出装置の概要を示すブ
ロック図である。図14において、1はファイル切換手
段、2は入力手段、3はレコード抽出手段、4はレコー
ド処理手段、5は転送手段、8はデータ移動手段、10
は磁気ディスク、20はプリンタ、30はブロックバッ
ファ、40はレコードバッファである。また、実線矢印
は検出信号,制御信号,情報信号の流れを示しており、
点線矢印はファイルデータの流れを示している(以下、
同様)。
The following technique has been developed as a record extracting device capable of processing even when a record exists in two or more blocks. FIG. 14 is a block diagram showing an outline of a conventional record extraction device. In FIG. 14, 1 is a file switching means, 2 is an input means, 3 is a record extracting means, 4 is a record processing means, 5 is a transferring means, 8 is a data moving means, 10
Is a magnetic disk, 20 is a printer, 30 is a block buffer, and 40 is a record buffer. The solid arrows indicate the flow of the detection signal, control signal, and information signal,
The dotted arrows indicate the flow of file data (hereinafter,
As well).

【0004】入力手段2は、磁気ディスク10に格納さ
れているファイルのデータをブロック単位でブロックバ
ッファ30に読み込ませる。転送手段5は、ブロックバ
ッファ30のデータを、最大レコード長以上のサイズを
有するレコードバッファ40に、それが一杯になるまで
転送する。レコード抽出手段3は、レコードバッファ4
0内の先頭位置から順次レコードの先頭アドレスとサイ
ズを抽出し、レコード処理手段4に送る。レコード処理
手段4は、レコード抽出手段3から送られてきたレコー
ドの先頭アドレスとサイズに基づいてレコードバッファ
40からレコードデータを読み出し、プリントイメージ
への変換等の処理を施した後、プリンタ20に送出す
る。
The input means 2 causes the block buffer 30 to read the data of the file stored in the magnetic disk 10 in block units. The transfer unit 5 transfers the data in the block buffer 30 to the record buffer 40 having a size equal to or larger than the maximum record length until it becomes full. The record extracting means 3 includes a record buffer 4
The start address and size of the record are sequentially extracted from the start position within 0 and sent to the record processing means 4. The record processing means 4 reads the record data from the record buffer 40 based on the head address and size of the record sent from the record extracting means 3, performs processing such as conversion into a print image, and then sends it to the printer 20. To do.

【0005】また、レコード抽出手段3は、レコードの
終端アドレス(先頭アドレスとレコードサイズとの和)
がレコードバッファ40の終端アドレスをオーバーして
いるレコードを検出した場合、その検出信号をデータ移
動手段8に送る。データ移動手段8は、それを受けてレ
コードバッファ40内の未処理データをレコードバッフ
ァ40の先頭位置に移動させ、転送手段5に対して、再
びデータ転送を指示する。転送手段5は、ブロックバッ
ファ30内の未転送のデータをレコードバッファ40の
先頭位置に移動された未処理データの後に転送する。
Further, the record extracting means 3 uses the end address of the record (the sum of the start address and the record size).
Detects a record exceeding the end address of the record buffer 40, it sends the detection signal to the data moving means 8. In response to this, the data moving means 8 moves the unprocessed data in the record buffer 40 to the head position of the record buffer 40, and instructs the transfer means 5 again to transfer the data. The transfer unit 5 transfers the untransferred data in the block buffer 30 after the unprocessed data moved to the head position of the record buffer 40.

【0006】ここで、レコードバッファ40でのデータ
の処理について図15を参照しながら説明する。図15
において、30は、レコードのデータR1,2,3 を読
み込んだ状態のブロックバッファ、40−1は、ブロッ
クバッファ30から最初のレコードのデータR1 及び次
のレコードの前半部のデータR2 −1が転送された状態
のレコードバッファ、40−2は、データ移動手段8に
よってレコード前半部のデータR2 −1が先頭位置に移
動され、その後ろに転送手段5がブロックバッファ30
から続きのデータを転送した状態のレコードバッファを
示している。S1,2 はレコードのサイズを示してい
る。
Here, the processing of data in the record buffer 40 will be described with reference to FIG. Figure 15
, 30 is a block buffer in a state where the record data R 1, R 2 and R 3 are read, 40-1 is the data R 1 of the first record and the data R of the first half of the next record from the block buffer 30. record buffer of state 2 -1 has been transferred, 40-2, the data moving means 8 data R 2 -1 records the first half portion is moved to the head position, the transfer means 5 is block buffer 30 behind it
It shows the record buffer in a state where the following data has been transferred. S 1 and S 2 indicate the record size.

【0007】まず、図15(イ)に示すように、転送手
段5がブロックバッファ30からレコードバッファ40
に、レコードバッファ40のサイズ一杯のデータを転送
する。そして、レコード抽出手段3がポインタをレコー
ドバッファ40の先頭アドレスAに置き、レコードの先
頭位置にセットされているレコードサイズS1 を抽出す
る。最初のレコードR1 は、1レコード分のデータが全
てレコードバッファ40に入っているので、抽出したレ
コードをレコード処理手段4によって処理する。
First, as shown in FIG. 15A, the transfer means 5 transfers data from the block buffer 30 to the record buffer 40.
Then, the data having the full size of the record buffer 40 is transferred. Then, the record extracting means 3 places the pointer at the head address A of the record buffer 40 and extracts the record size S 1 set at the head position of the record. Since the first record R 1 contains all the data for one record in the record buffer 40, the record processing means 4 processes the extracted record.

【0008】続いて、レコード抽出手段3はポインタを
2番目のレコードR2 の先頭アドレスBに移し、2番目
のレコードR2 の先頭位置にセットされているレコード
サイズS2 を抽出する。そして、アドレスBにレコード
サイズS2 を加えた値が、レコードバッファ40の最後
尾のアドレスを越えているとき、レコードR2 のデータ
は、一部が欠けていることになるのでそのままでは処理
できない。そこで、図15(ロ)に示すように、データ
移動手段8はポインタの指すアドレスBからレコードバ
ッファ40の最後尾までのデータを、レコードバッファ
40の先頭位置に移動させ、転送手段5がその後にブロ
ックバッファ30から続きのデータを転送する。
[0008] Then, the record extraction unit 3 pointer was transferred to a second start address B of the record R 2, it extracts the record size S 2 that is set to the beginning of the second record R 2. When the value obtained by adding the record size S 2 to the address B exceeds the last address of the record buffer 40, the data of the record R 2 is partly missing, and therefore cannot be processed as it is. . Therefore, as shown in FIG. 15B, the data moving means 8 moves the data from the address B pointed to by the pointer to the end of the record buffer 40 to the head position of the record buffer 40, and the transfer means 5 then moves. The subsequent data is transferred from the block buffer 30.

【0009】その結果、2番目のレコードR2 の全ての
データがレコードバッファ40に入ることになるので、
レコード抽出手段3により抽出し、レコード処理手段4
によって処理する。3番目のレコードR3 以降は、これ
らの処理を繰り返し、転送手段5がブロックバッファ3
0の全てのデータが転送し終わったら、入力手段2は磁
気ディスク10の次のブロックのデータをブロックバッ
ファ30に読み出して、同様に処理する。この従来技術
によれば、レコードが2つ以上のブロックに跨がってい
る場合でも、レコード抽出が可能である。
As a result, all the data of the second record R 2 will be stored in the record buffer 40.
The record is extracted by the record extracting means 3, and the record processing means 4 is used.
Process by. After the third record R 3 , these processes are repeated, and the transfer means 5 causes the block buffer 3
When all the data of 0 has been transferred, the input means 2 reads the data of the next block of the magnetic disk 10 into the block buffer 30 and processes it in the same manner. According to this conventional technique, it is possible to extract a record even if the record spans two or more blocks.

【0010】なお、このようなレコード抽出装置に関連
する従来の文献としては、例えば、発明協会公開技報9
2−268号がある。
As a conventional document related to such a record extracting device, for example, the Institute of Invention and Innovation open technical report 9
There is No. 2-268.

【0011】[0011]

【発明が解決しようとする課題】[Problems to be Solved by the Invention]

(問題点)しかしながら、前記した従来の技術には、ブ
ロックバッファ30に読み込まれた全てのデータをレコ
ードバッファ40に転送する必要があり、また、レコー
ドバッファ40内のレコード抽出できなかったデータ
を、一旦レコードバッファ40の先頭部に移動する必要
があるため、レコード抽出処理に多くの時間を要すると
いう問題点があった。
(Problem) However, in the above-mentioned conventional technique, it is necessary to transfer all the data read into the block buffer 30 to the record buffer 40, and the data that cannot be extracted from the record in the record buffer 40 is Since it is necessary to once move to the head of the record buffer 40, there is a problem that it takes a lot of time for the record extraction processing.

【0012】(問題点の説明)上記従来技術では、ま
ず、データをブロックバッファ30に読み込み、読み込
んだ全てのデータを順次レコードバッファ40に転送し
てから処理するようにしていた。そのように、全てのデ
ータをレコードバッファ40に転送するため、転送する
データ量が多くなり、転送時間が長くなっていた。ま
た、レコードバッファ40内で、レコードの終端アドレ
スがレコードバッファ40の終端アドレスをオーバーし
ているレコードの未処理データは、レコードバッファ4
0の先頭位置まで移動させる必要があり、そのための時
間も必要であった。その結果、レコードを抽出するまで
の処理に多くの時間を要していた。本発明は、以上のよ
うな問題点を解決することを課題とするものである。
(Explanation of Problems) In the above conventional technique, first, the data is read into the block buffer 30, and all the read data are sequentially transferred to the record buffer 40 before being processed. Since all the data is transferred to the record buffer 40 in this way, the amount of data to be transferred is large and the transfer time is long. In the record buffer 40, the unprocessed data of the record whose end address exceeds the end address of the record buffer 40 is the record buffer 4
It was necessary to move it to the start position of 0, and it also took time. As a result, it took a lot of time to process the record extraction. An object of the present invention is to solve the above problems.

【0013】[0013]

【課題を解決するための手段】前記課題を解決するた
め、第1の発明では、レコードを単位として構成される
データをブロックを単位として記憶する記憶装置からレ
コードを抽出するレコード抽出装置において、上記記憶
装置からデータをブロック単位でブロックバッファに読
み込ませる入力手段と、上記ブロックバッファからレコ
ードを順次抽出して抽出情報を出力すると共に、ブロッ
クバッファ内に収まらないレコードの検出信号を出力す
る第1のレコード抽出手段と、上記第1のレコード抽出
手段からの上記検出信号を受けてブロックバッファ内の
未処理データをレコードバッファに転送した後、上記入
力手段に次のブロックデータを要求し、返されたブロッ
クデータの先頭部分にある、上記ブロックバッファに収
まらないレコードの残りデータをレコードバッファに転
送すると共に、ブロックバッファ内からのレコード抽出
の再開を上記第1のレコード抽出手段に指示する転送手
段と、上記転送手段が転送したレコードバッファ内のレ
コードを抽出し、その抽出情報を出力する第2のレコー
ド抽出手段と、上記第1のレコード抽出手段と第2のレ
コード抽出手段の抽出情報が指すレコードを処理するレ
コード処理手段とを設けることとした。
In order to solve the above-mentioned problems, in the first invention, in a record extracting device for extracting a record from a storage device for storing data constituted by a record as a unit in a block, Input means for reading data from a storage device into a block buffer in block units; first extraction of records from the block buffer to output extraction information; and a first detection signal for a record that does not fit in the block buffer. Upon receiving the detection signal from the record extracting means and the first record extracting means, the unprocessed data in the block buffer is transferred to the record buffer, and then the next block data is requested from the input means and returned. For the record that does not fit in the above block buffer at the beginning of the block data Transfer data to the record buffer, transfer means for instructing the first record extracting means to restart record extraction from the block buffer, and a record in the record buffer transferred by the transfer means, A second record extracting means for outputting the extraction information, and a record processing means for processing the record indicated by the extraction information of the first record extracting means and the second record extracting means are provided.

【0014】また、第2の発明では、レコードを単位と
して構成されるデータをブロックを単位として記憶する
記憶装置からレコードを抽出するレコード抽出装置にお
いて、上記記憶装置からデータをブロック単位で2つ以
上のブロックバッファに順番に繰り返して読み込ませる
入力手段と、上記ブロックバッファからレコードを順次
抽出して抽出情報を出力すると共に、ブロックバッファ
内に収まらないレコードの検出信号を出力するレコード
抽出手段と、上記レコード抽出手段からの抽出情報が指
すレコードを処理する第1のレコード処理手段と、上記
レコード抽出手段からの上記検出信号を受けてブロック
バッファ内の未処理データの先頭位置と長さを第1のレ
コード情報としてレコード情報バッファに登録した後、
上記入力手段に対して次のブロックデータを別のブロッ
クバッファに読み込ませることを要求し、返されたブロ
ックデータの中の、上記ブロックバッファ内に収まらな
いレコードの残りデータの先頭位置と長さを第2のレコ
ード情報としてレコード情報バッファに登録し、そのよ
うな処理を当該レコードの最後部のデータがブロックバ
ッファに読み込まれるまで繰り返し、登録した各レコー
ド情報を出力すると共に、ブロックバッファ内からのレ
コード抽出の再開を上記レコード抽出手段に指示するレ
コード情報作成手段と、2つ以上のブロックバッファ内
に分かれて読み込まれたレコードの処理はフィールド単
位で行い、かつ、レコードの分割位置にあるフィールド
の処理はバイト単位で行い、境界のバイト位置における
処理対象バイトを指すポインタの切り換えを上記各レコ
ード情報に基づいて行う第2のレコード処理手段とを設
けることとした。
According to the second aspect of the invention, in a record extracting device for extracting a record from a storage device that stores data constituted by a record as a unit in a block, two or more data are stored in a block unit from the storage device. Input means for reading the block buffer repeatedly in order, record extraction means for sequentially extracting records from the block buffer and outputting the extracted information, and outputting a detection signal of a record that does not fit in the block buffer, A first record processing means for processing a record indicated by the extraction information from the record extracting means, and a first position and a length of the unprocessed data in the block buffer in response to the detection signal from the record extracting means. After registering as record information in the record information buffer,
Request the input means to read the next block data into another block buffer, and specify the start position and length of the remaining data of the record that does not fit in the block buffer in the returned block data. It is registered in the record information buffer as the second record information, and such processing is repeated until the last data of the record is read into the block buffer, and each registered record information is output and the record from the block buffer is output. The record information creating means for instructing the record extracting means to restart the extraction, and the processing of the records read separately in two or more block buffers are performed in field units, and the processing of the fields at the record division positions is performed. Is performed in byte units, and the target byte at the boundary byte position is Switching to the pointer was the provision of a second record processing means for performing, based on the respective record information.

【0015】そしてまた、第3の発明では、レコードを
単位として構成されるデータをブロックを単位として記
憶する記憶装置からレコードを抽出するレコード抽出装
置において、上記記憶装置からデータを複数ブロック単
位でブロックバッファに読み込ませる入力手段と、上記
ブロックバッファからレコードを順次抽出して抽出情報
を出力すると共に、ブロックバッファ内に収まらないレ
コードの検出信号を出力するレコード抽出手段と、上記
レコード抽出手段の抽出情報が指すレコードを処理する
レコード処理手段と、上記レコード抽出手段からの上記
検出信号を受けてブロックバッファ内の未処理データが
記憶されているファイル内のブロック番号とブロック内
のオフセットとを算出し、上記ブロック番号のブロック
から上記ブロックバッファに再びデータを読み込むこと
を上記入力手段に要求し、返されたデータを上記オフセ
ット位置から処理することを上記レコード抽出手段に指
示する入力制御手段とを設けることとした。
According to the third aspect of the invention, in a record extracting device for extracting a record from a storage device that stores data constituted by a record as a unit in a block, the data is blocked from the storage device in a unit of a plurality of blocks. Input means for reading in the buffer, record extracting means for sequentially extracting records from the block buffer and outputting extraction information, and outputting a detection signal of a record that does not fit in the block buffer, and extraction information for the record extracting means Record processing means for processing the record pointed to, by receiving the detection signal from the record extraction means to calculate the block number and the offset within the block in the file in which the unprocessed data in the block buffer is stored, From the block with the above block number to the above block Again to read the data in Ffa requests to said input means, the returned data to be processed from the offset position and providing an input control means for instructing the above record extraction means.

【0016】[0016]

【作 用】第1の発明では、レコードの抽出を通常は
ブロックバッファで行い、ブロックバッファ内に収まら
ないレコードだけ、レコードバッファに転送し、そこで
レコードを組み立ててからレコードの抽出を行う。その
ため、全てのデータをブロックバッファからレコードバ
ッファに転送する必要はなく、転送するのはブロックバ
ッファ内に収まらないレコードだけである。その結果、
転送するデータの量が少なくなって、転送に要する時間
は短くなる。また、レコードバッファ内でデータを移動
させるようなことはしないので、その分の処理時間も短
縮される。
[Operation] In the first invention, records are normally extracted in a block buffer, and only records that do not fit in the block buffer are transferred to the record buffer. Then, the records are assembled and then the records are extracted. Therefore, it is not necessary to transfer all the data from the block buffer to the record buffer, and only the records that do not fit in the block buffer are transferred. as a result,
Since the amount of data to be transferred is small, the time required for the transfer is short. Further, since the data is not moved within the record buffer, the processing time can be shortened accordingly.

【0017】第2及び第3の発明では、ブロックバッフ
ァ内のデータを移動させずにレコード抽出を行う。その
ため、ブロックバッファからレコードバッファへのデー
タ転送を行う必要もなくなる。その結果、その分の処理
時間も短縮される。
In the second and third inventions, record extraction is performed without moving the data in the block buffer. Therefore, it is not necessary to transfer data from the block buffer to the record buffer. As a result, the processing time is shortened accordingly.

【0018】[0018]

【実施例】実施例の説明に入る前に、本発明の実施例で
前提としている事項について説明する。固定磁気ディス
クは、固定長ブロックを単位としてデータをファイルに
記憶する。各ファイルは、図16に示すように、システ
ムディレクトリファイルによりそれらの開始ブロック番
号とブロック数(ファイルサイズ)が管理されている。
また、各ファイルの先頭ブロックには、次にリンクする
ファイル名を書き込んである。また、データの単位であ
るレコードは、図7に示すようにレコード長を示すフィ
ールド(RLF)をレコード先頭に持つ可変長レコード
形式とし、任意の長さを持つ。以下、本発明の実施例を
図面に基づいて詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Before starting the description of the embodiments, the premise of the embodiments of the present invention will be described. The fixed magnetic disk stores data in files in units of fixed length blocks. As shown in FIG. 16, the start block number and the block number (file size) of each file are managed by the system directory file.
The file name to be linked next is written in the head block of each file. A record, which is a unit of data, has a variable length record format having a field (RLF) indicating the record length at the head of the record as shown in FIG. 7, and has an arbitrary length. Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

【0019】(第1の発明)図1は、第1の発明の概要
を示すブロック図である。符号は、図14のものに対応
し、3a,3bはレコード抽出手段である。第1の発明
では、上記従来技術のように全てのデータをレコードバ
ッファ40に転送することはせずに、レコードの抽出は
通常はレコード抽出手段3aがブロックバッファ30で
行い、ブロックバッファ30の中に収めきれなかったレ
コードだけを転送手段5がレコードバッファ40に転送
する。そして、入力手段2がブロックバッファに読み込
ませた次のブロックデータの中のレコードの残りデータ
を、転送手段5がレコードバッファ40に転送し、レコ
ードバッファ40の中に1レコード分のデータを組み立
ててからレコードの抽出を行う。
(First Invention) FIG. 1 is a block diagram showing an outline of the first invention. Reference numerals correspond to those in FIG. 14, and 3a and 3b are record extracting means. In the first aspect of the invention, all the data is not transferred to the record buffer 40 as in the prior art described above, but the record extraction means 3a normally performs the record extraction in the block buffer 30. The transfer unit 5 transfers only the records that cannot be stored in the record buffer 40. Then, the transfer unit 5 transfers the remaining data of the record in the next block data read by the input unit 2 to the block buffer to the record buffer 40, and assembles one record of data in the record buffer 40. Records are extracted from.

【0020】図2は、第1の発明におけるレコードバッ
ファ内での処理を説明するための図である。図2(イ)
は、現在処理中のファイルのn番目のブロックデータを
読み込んだ状態を示している。このブロックデータに
は、複数のレコードが含まれているが、ブロックバッフ
ァ30内に収まっているレコードは順次抽出され、最後
部に斜線入りで示す部分にあるレコードは、1つのレコ
ードのデータがブロックバッファ30の中に収まりきれ
ず、次のブロックに跨がって入っている(以下、このよ
うなレコードを「分割レコード」という)。そのような
分割レコードが検出されたときは、図2(ハ)に示すよ
うに、先ず分割レコードの前半部をレコードバッファ4
0へ転送する。次に、磁気ディスク10からブロックバ
ッファ30に次のブロックデータを転送し(図2
(ロ))、その先頭部分に入っている上記分割レコード
の後半部をレコードバッファ40の上記前半部のデータ
の後ろに転送する。このようにして、レコードバッファ
40内でレコードデータを組立てて、そこからレコード
の抽出を行う。
FIG. 2 is a diagram for explaining the processing in the record buffer in the first invention. Figure 2 (a)
Indicates the state in which the n-th block data of the file currently being processed has been read. Although this block data includes a plurality of records, the records that fit in the block buffer 30 are sequentially extracted, and the records in the shaded area at the end are blocks of one record of data. The data cannot be stored in the buffer 30, and the data is contained in the next block (hereinafter, such a record is referred to as a “divided record”). When such a divided record is detected, the first half of the divided record is first recorded in the record buffer 4 as shown in FIG.
Transfer to 0. Next, the next block data is transferred from the magnetic disk 10 to the block buffer 30 (see FIG. 2).
(B)), the latter half of the divided record contained in the first portion is transferred after the data of the first half of the record buffer 40. In this way, the record data is assembled in the record buffer 40 and the record is extracted from it.

【0021】次に、第1の発明の動作を説明する。図3
は、第1の発明の動作を説明するためのフローチャート
である。 ステップ1…ファイル切換手段1は、磁気ディスク10
のシステムディレクトリファイルを参照して、ファイル
構成を調べ、各ファイルの開始ブロック番号とブロック
数を求める。 ステップ2…処理すべきファイルを指定する。 ステップ3…入力手段2は、指定されたファイルに処理
すべきブロックがあるか否かを判別する。 ステップ4…処理すべきブロックがあれば、そのブロッ
ク番号を指定する。 ステップ5…指定された番号のブロックデータをブロッ
クバッファ30に読み込む。 ステップ6…後述する転送フラグがセットされているか
否かを判別する。
Next, the operation of the first invention will be described. Figure 3
3 is a flowchart for explaining the operation of the first invention. Step 1 ... File switching means 1 is a magnetic disk 10
Check the file structure by referring to the system directory file of and obtain the starting block number and the number of blocks of each file. Step 2 ... Specify the file to be processed. Step 3 ... The input means 2 determines whether or not there is a block to be processed in the designated file. Step 4 ... If there is a block to be processed, specify the block number. Step 5 ... Read the block data of the designated number into the block buffer 30. Step 6 ... It is determined whether or not a transfer flag described later is set.

【0022】ステップ7…転送フラグがセットされてい
なければ、レコード抽出手段3aは、ポインタをブロッ
クバッファ30の先頭に置く。 ステップ8…当該レコードの長さを示すためのフィール
ドであるRLF(レコードレングスフィールド)がブロ
ックバッファ30内に収まっているか否かを判別する。 ステップ9…収まっていれば、RLFからレコードサイ
ズSを取得し、取得フラグをセットする。 ステップ10…レコードサイズSに基づいて、該レコー
ドの終端がブロックの終端を越えているか否かを判別す
る。 ステップ11…越えていなければ、レコード抽出手段3
aは、レコード処理手段4に抽出すべきレコードの先頭
アドレスとサイズを通知し、レコード処理手段4は、当
該レコードを抽出して処理する。 ステップ12…レコード抽出手段3aは、ポインタを次
のレコードの先頭へ移動させる。
Step 7 ... If the transfer flag is not set, the record extracting means 3a places the pointer at the head of the block buffer 30. Step 8 ... It is determined whether or not an RLF (record length field), which is a field for indicating the length of the record, is contained in the block buffer 30. Step 9 ... If it is within the range, the record size S is acquired from the RLF and the acquisition flag is set. Step 10 ... It is determined based on the record size S whether or not the end of the record exceeds the end of the block. Step 11 ... If not exceeded, record extraction means 3
a notifies the record processing means 4 of the start address and size of the record to be extracted, and the record processing means 4 extracts and processes the record. Step 12 ... The record extracting means 3a moves the pointer to the beginning of the next record.

【0023】ステップ13…ステップ8でRLFがブロ
ックバッファ30内に収まっていないとき、現在のポイ
ンタが丁度ブロック終端にあるか否かを判別する。 ステップ14…現在のポインタが丁度ブロック終端では
ないとき、取得フラグをクリアする。 ステップ15…取得フラグをクリアした後、または、ス
テップ10でレコードの終端がブロックの終端を越えて
いるとき、当該レコードは分割レコードであると判断
し、転送手段5は、ブロックバッファ30内の未処理デ
ータを、レコードバッファ40へ転送する。 ステップ16…次の転送を再開させるアドレスB(図2
参照)と転送済部分のサイズS1 (同上)とを取得す
る。 ステップ17…分割レコードの残りデータをレコードバ
ッファ40に転送する状態にあることを示すため、転送
フラグをセットする。
Step 13 ... When the RLF is not stored in the block buffer 30 in step 8, it is determined whether or not the current pointer is just at the end of the block. Step 14 ... When the current pointer is not at the end of the block, the acquisition flag is cleared. Step 15 ... After clearing the acquisition flag, or when the end of the record exceeds the end of the block in step 10, it is determined that the record is a divided record, and the transfer means 5 determines that the record in the block buffer 30 has not been stored. The processed data is transferred to the record buffer 40. Step 16 ... Address B for restarting the next transfer (see FIG. 2
(See above) and the size S 1 of the transferred portion (same as above). Step 17 ... A transfer flag is set to indicate that the remaining data of the divided record is in the state of being transferred to the record buffer 40.

【0024】ステップ18…ステップ6で上記転送フラ
グがセットされているとき、転送手段5は、取得フラグ
がセットされているか否かをみて、レコードサイズSを
取得済であるか否かを判別する。 ステップ19…レコードサイズSをまだ取得していない
とき、まず、アドレスB(図2参照)からRLFまでの
データをブロックバッファ30からレコードバッファ4
0へ転送する。 ステップ20…転送されたRLFから当該レコードのサ
イズS(図2参照)を取得し、取得フラグをセットす
る。 ステップ21…転送手段5は、得られたレコードサイズ
Sに基づいて、当該レコードの残りのデータをブロック
バッファ30からレコードバッファ40へ転送する。 ステップ22…ステップ18でレコードサイズSを取得
済であるとき、ブロックバッファ30のデータを、アド
レスBからSとS1 との差に相当する量のデータをレコ
ードバッファ40へ転送する。
Step 18 ... When the transfer flag is set in step 6, the transfer means 5 determines whether or not the record size S has been acquired by checking whether or not the acquisition flag is set. . Step 19 ... When the record size S is not yet acquired, first, the data from the address B (see FIG. 2) to the RLF is transferred from the block buffer 30 to the record buffer 4.
Transfer to 0. Step 20 ... Acquire the size S (see FIG. 2) of the record from the transferred RLF and set the acquisition flag. Step 21 ... The transfer unit 5 transfers the remaining data of the record from the block buffer 30 to the record buffer 40 based on the obtained record size S. Step 22 ... When the record size S has been acquired in Step 18, the data in the block buffer 30 is transferred to the record buffer 40 in an amount corresponding to the difference between the addresses B to S and S 1 .

【0025】ステップ23…転送が終了したので、転送
フラグをクリアする。 ステップ24…レコード抽出手段3bは、ポインタをレ
コードバッファ40の先頭へ移動させる。 ステップ25…レコード処理手段4は、レコードを抽出
して処理する。 ステップ26…レコード抽出手段3bは、次のレコード
処理に移るため、ポインタをブロックバッファ30の次
のレコードの先頭へ移動させる。 ステップ27…ステップ3で、指定されたファイルに処
理すべきブロックがなくなったら、ファイル切換手段1
は、続けて処理すべきファイルがあるか否かを判別し、
あれば、ステップ2に戻って次のファイルを指定し、な
ければ、処理を終了する。
Step 23: Since the transfer is completed, the transfer flag is cleared. Step 24 ... The record extracting means 3b moves the pointer to the head of the record buffer 40. Step 25 ... The record processing means 4 extracts and processes the record. Step 26 ... The record extracting means 3b moves the pointer to the beginning of the next record in the block buffer 30 to move to the next record processing. Step 27 ... When there is no block to be processed in the designated file in step 3, the file switching means 1
Determines whether there is a file to be processed continuously,
If so, the process returns to step 2 to specify the next file, and if not, the process ends.

【0026】この第1の発明によれば、上記従来技術の
ように、全てのデータをブロックバッファからレコード
バッファに転送する必要はなく、転送するのはブロック
バッファ内に収まらないレコードだけである。その結
果、転送するために要する時間は短くなる。また、レコ
ードバッファ内でデータを移動させるようなことはしな
いので、その分処理時間を短縮できる。
According to the first aspect of the present invention, it is not necessary to transfer all the data from the block buffer to the record buffer as in the prior art described above, and only the records that do not fit in the block buffer are transferred. As a result, the time required to transfer is reduced. Moreover, since the data is not moved in the record buffer, the processing time can be shortened accordingly.

【0027】(第2の発明)図4は、第2の発明の概要
を示すブロック図である。符号は、図1のものに対応
し、6はレコード情報作成手段、60はレコード情報バ
ッファである。また、本発明では少なくとも2つのブロ
ックバッファが必要である。すなわち、レコードが3つ
のブロックに跨がって分割されている場合は、ブロック
バッファは3つ必要になる。ここでは、2つのブロック
バッファを使った実施例を説明する。第2の発明では、
第1の発明のレコードバッファを使って分割レコードを
組み立てる方法の代わりにレコード処理手段を2つ設
け、その内一方は、第1の発明と同様レコード単位で処
理し、他方は、レコードを構成するフィールド単位で処
理する。1つのブロックバッファに全てのデータを収め
られたレコードの抽出は、レコード抽出手段3で行い、
レコードデータの処理は、レコード単位で処理するレコ
ード処理手段4aで行う。2つのブロックバッファに跨
がっているレコード(分割レコード)の抽出はレコード
情報作成手段6で行い、レコードデータの処理は上記フ
ィールド単位で処理するレコード処理手段4bで行う。
(Second Invention) FIG. 4 is a block diagram showing an outline of the second invention. Reference numerals correspond to those in FIG. 1, 6 is a record information creating means, and 60 is a record information buffer. Also, the present invention requires at least two block buffers. That is, when a record is divided over three blocks, three block buffers are needed. Here, an embodiment using two block buffers will be described. In the second invention,
Instead of the method of assembling divided records using the record buffer of the first invention, two record processing means are provided, one of which processes in record units as in the first invention, and the other constitutes a record. Process in field units. The record extraction means 3 extracts a record in which all data is stored in one block buffer.
The record data processing is performed by the record processing means 4a which processes each record. The record information creating unit 6 extracts a record (divided record) straddling two block buffers, and the record processing unit 4b processes the record data in the field unit.

【0028】図5は、第2の発明におけるブロックバッ
ファ内の分割レコードとレコード情報バッファ内のデー
タとの関係を示す図である。図5(イ)は、現在処理中
のファイルのn番目のブロックデータを読み込んだ状態
を示している。ブロックバッファ内に収まっているレコ
ードは順次抽出され、最後部に斜線入りで示す部分にあ
るレコードは、1つのレコードのデータがブロックバッ
ファ30aの中に収まりきれず、分割レコードとなって
いる。そのような分割レコードが検出されたときは、図
5(ハ)に示すように、一方のブロックバッファ30a
に収まりきれなかったレコードの先頭アドレスAとその
サイズS1 とを、レコード情報バッファ60に格納す
る。
FIG. 5 is a diagram showing a relationship between divided records in the block buffer and data in the record information buffer in the second invention. FIG. 5A shows a state in which the n-th block data of the file currently being processed is read. The records that fit in the block buffer are sequentially extracted, and the records in the shaded area at the end are divided records because the data of one record cannot fit in the block buffer 30a. When such a divided record is detected, as shown in FIG. 5C, one block buffer 30a
The head address A and the size S 1 of the record that cannot be stored in the record information buffer 60 are stored in the record information buffer 60.

【0029】続いて、もう一方のブロックバッファ30
bに磁気ディスク10から次のブロックデータを読み込
み、その先頭アドレスBと残りのデータのサイズS2
を、レコード情報バッファ60に格納する。
Subsequently, the other block buffer 30
Then, the next block data is read from the magnetic disk 10 into the magnetic disk 10b, and its head address B and the remaining data size S 2 are stored in the record information buffer 60.

【0030】次に、第2の発明の動作を説明する。図6
は、第2の発明の動作を説明するためのフローチャート
である。ステップ1〜ステップ14及びステップ25
は、図2のものと同様であるので、説明を省略し、ステ
ップ15からステップ24まで説明する。 ステップ15…レコード抽出手段3は、RLFが分割さ
れているときは、分割されているRLFの前半部のデー
タを取得し、一時保持する。 ステップ16…レコード情報作成手段6は、未処理デー
タの先頭アドレスAとブロックバッファ30aにある未
処理データのサイズS1 をレコード情報バッファ60の
エントリ1に格納する。 ステップ17…分割レコードの処理中であることを示す
処理フラグをセットする。
Next, the operation of the second invention will be described. Figure 6
FIG. 7 is a flow chart for explaining the operation of the second invention. Step 1 to Step 14 and Step 25
2 is the same as that of FIG. 2, so the description thereof will be omitted and steps 15 to 24 will be described. Step 15 ... When the RLF is divided, the record extracting means 3 acquires the data of the first half of the divided RLF and temporarily holds the data. Step 16 ... The record information creating means 6 stores the start address A of the unprocessed data and the size S 1 of the unprocessed data in the block buffer 30a in the entry 1 of the record information buffer 60. Step 17 ... A processing flag indicating that the divided record is being processed is set.

【0031】ステップ18…ステップ6で処理フラグが
セットされているとき、取得フラグがセットされている
か否かをみて、当該レコードのサイズを取得済であるか
否かを判別する。 ステップ19…まだ取得してないとき、ブロックバッフ
ァ30bに読み込んだブロックデータの中にあるRLF
の後半部のデータを取得して、ステップ15で保持され
たRLFの前半部とあわせて当該レコードのサイズを取
得し、取得フラグをセットする。 ステップ20…レコード情報作成手段6は、ブロックバ
ッファ30bの先頭アドレスBと当該レコードの残りサ
イズS2 を、レコード情報バッファ60のエントリ2に
格納する。 ステップ21…ステップ18で当該レコードのサイズS
を取得済であるとき、ブロックバッファ30bの先頭ア
ドレスBと当該レコードの残りサイズS2 を、レコード
情報バッファ60のエントリ2に格納する。 ステップ22…処理フラグをリセットする。
Step 18 ... When the processing flag is set in step 6, it is determined whether or not the size of the record has been acquired by checking whether or not the acquisition flag is set. Step 19 ... RLF in the block data read into the block buffer 30b when not acquired yet
The data of the second half of the record is acquired, the size of the record is acquired together with the first half of the RLF held in step 15, and the acquisition flag is set. Step 20 ... The record information creating means 6 stores the start address B of the block buffer 30b and the remaining size S 2 of the record in the entry 2 of the record information buffer 60. Step 21 ... The size S of the record in step 18
Is acquired, the head address B of the block buffer 30b and the remaining size S 2 of the record are stored in the entry 2 of the record information buffer 60. Step 22 ... Reset the processing flag.

【0032】ステップ23…レコード処理手段4bは、
分割レコードの処理ルーチン(図8)をコールする。 ステップ24…レコード情報作成手段6は、ポインタを
次のレコードの先頭アドレスへ移動させる。
Step 23 ... The record processing means 4b
The divided record processing routine (FIG. 8) is called. Step 24 ... The record information creating means 6 moves the pointer to the head address of the next record.

【0033】次に、分割レコード処理について説明す
る。一般にレコードは、図7に示すように、当該レコー
ドのレコード長を保持するレコードレングスフィールド
(RLF)と、レコードの改行数やプリント制御コマン
ドとプリントデータを区別するレコードタイプ等を指定
する制御フィールドと、プリントデータや制御コマンド
データであるデータフィールドとを持っている。また、
本実施例では、データ量の多いデータフィールドを更に
複数のサブフィールドに分割する。
Next, the divided record processing will be described. Generally, as shown in FIG. 7, a record includes a record length field (RLF) that holds the record length of the record and a control field that specifies the number of line feeds in the record and the record type that distinguishes the print control command from the print data. , And a data field that is print data or control command data. Also,
In this embodiment, a data field having a large amount of data is further divided into a plurality of subfields.

【0034】図8は、分割レコード処理の手順を示すフ
ローチャートである。この処理は、レコード処理手段4
bにおいて行われる。 ステップ1…最初のフィールドの先頭アドレスと終端ア
ドレスとをセットする。 ステップ2…そのフィールドが分割されているか否かを
判別する。 ステップ3…分割されていなければ、ブロックバッファ
からそのフィールドの全データを読み込む。 ステップ4…フィールドデータの処理を行う。なお、そ
のフィールドデータだけでは処理できない場合は、後続
するフィールドデータと共に、処理できる単位となるま
でストアする。 ステップ5…次のフィールドの先頭アドレスと終端アド
レスとをセットする。 ステップ6…次のフィールドがあるか否かを判別する。
FIG. 8 is a flow chart showing the procedure of divided record processing. This processing is performed by the record processing means 4
b. Step 1: Set the start address and end address of the first field. Step 2 ... Determine whether or not the field is divided. Step 3: If not divided, read all the data of the field from the block buffer. Step 4 ... Processes field data. If the field data alone cannot be processed, the field data is stored together with the subsequent field data until it becomes a processable unit. Step 5 ... Set the start address and end address of the next field. Step 6 ... It is determined whether or not there is a next field.

【0035】ステップ7…ステップ2でフィールドが分
割されていれば、そのフィールドから1バイトのデータ
を読み込んでストアする。 ステップ8…ポインタを1バイト進める。 ステップ9…当該フィールドの全データの読み込みが済
んだか否かを判別する。 ステップ10…現在読み込んでいるバイトが分割アドレ
ス(ブロックバッファ30aの最終アドレス)と一致し
たか否かを判別する。 ステップ11…一致したら、レコード情報バッファ60
のエントリ2に格納されているアドレスにポインタを変
更する。
Step 7 ... If the field is divided in Step 2, 1-byte data is read from the field and stored. Step 8 ... Advance the pointer by 1 byte. Step 9 ... It is determined whether or not all the data in the field has been read. Step 10 ... It is determined whether or not the currently read byte matches the divided address (final address of the block buffer 30a). Step 11 ... If they match, the record information buffer 60
The pointer is changed to the address stored in the entry 2 of.

【0036】この第2の発明によれば、レコードの抽出
は全てブロックバッファから行うため、ブロックバッフ
ァからレコードバッファへのデータ転送を行う必要はな
い。その結果、処理時間を短縮できる。
According to the second aspect of the present invention, since all records are extracted from the block buffer, it is not necessary to transfer data from the block buffer to the record buffer. As a result, the processing time can be shortened.

【0037】(第3の発明)図9は、第3の発明の概要
を示すブロック図である。符号は、図1のものに対応
し、7は入力制御手段である。第3の発明では、ブロッ
クバッファは1つで、レコードバッファは設けない。分
割レコードが検出されたら、入力制御手段により、ブロ
ックバッファに再度そのレコードの先頭から読み込むよ
うにして、レコード処理を行う。
(Third Invention) FIG. 9 is a block diagram showing an outline of the third invention. Reference numerals correspond to those in FIG. 1, and 7 is an input control means. In the third invention, there is one block buffer and no record buffer is provided. When the divided record is detected, the input control means reads the record into the block buffer from the beginning again to perform the record processing.

【0038】図10は、ブロックバッファ内に複数のブ
ロック(ここでは7ブロック)が読み込まれた状態を示
す図である。ブロックバッファ30には、ファイルのm
番目のブロックからm+6番目のブロックまでを読み込
んでいるが、最後のm+6番目のブロック中の最後尾の
レコードが分割されている。そのようなブロックが検出
されたら、磁気ディスク10からブロックバッファ30
に再度m+6番目のブロックから読み込むようにする。
FIG. 10 is a diagram showing a state in which a plurality of blocks (here, 7 blocks) are read in the block buffer. In the block buffer 30, m of the file
Although the block from the th block to the m + 6 th block is read, the last record in the last m + 6 th block is divided. When such a block is detected, the magnetic disk 10 causes the block buffer 30
Read again from the m + 6th block.

【0039】なお、図10において、kは当該ファイル
のブロックサイズであり、nはブロックバッファ30内
のオフセット値である。n−6×kはブロック内のオフ
セットとなる。
In FIG. 10, k is the block size of the file, and n is the offset value in the block buffer 30. n−6 × k is an offset within the block.

【0040】図11は、第3の発明の動作を説明するた
めのフローチャートである。 ステップ1〜ステップ13及びステップ21は、図2の
ものと同様であるので、説明を省略し、ステップ14か
ら説明する。 ステップ14…レコード抽出手段3は、分割レコードの
処理中であることを示す処理フラグをセットする。 ステップ15…入力制御手段7は、未処理データを含ん
でいるブロックのブロック番号(m+6)とブロック内
のオフセット値(n−6×k)を求める。 ステップ16…ブロック番号(m+6)と、ブロックバ
ッファ30に一度に読み込めるブロック数を指定する。
FIG. 11 is a flow chart for explaining the operation of the third invention. Since steps 1 to 13 and step 21 are the same as those in FIG. 2, description thereof will be omitted, and description will be given from step 14. Step 14 ... The record extracting means 3 sets a processing flag indicating that the divided record is being processed. Step 15: The input control means 7 obtains the block number (m + 6) of the block containing the unprocessed data and the offset value (n-6 × k) within the block. Step 16 ... Designates the block number (m + 6) and the number of blocks that can be read into the block buffer 30 at one time.

【0041】ステップ17…入力手段2は、ステップ6
で処理フラグがセットされていないとき、ブロックバッ
ファに読み込まれた最後のブロックデータが、ファイル
における最終のブロックのものか否かを判別する。 ステップ18…最終のブロックではないとき、レコード
抽出手段3は、ブロックバッファ30の先頭からオフセ
ット値(n−6×k)だけ下がった位置Aにポインタを
置く。 ステップ19…処理フラグをリセットする。 ステップ20…ステップ17で最終のブロックであると
き、次のファイルの読み込みに備えて、ブロックバッフ
ァ30の空領域の先頭位置にデータ格納位置を指定す
る。
Step 17 ... The input means 2 performs Step 6
If the processing flag is not set at, it is determined whether or not the last block data read into the block buffer is the last block in the file. Step 18 ... When it is not the final block, the record extracting means 3 places the pointer at the position A which is lower than the head of the block buffer 30 by the offset value (n−6 × k). Step 19 ... Reset the processing flag. Step 20 ... When it is the final block in Step 17, the data storage position is specified at the beginning position of the empty area of the block buffer 30 in preparation for reading the next file.

【0042】この第3の発明によれば、ブロックバッフ
ァからレコードバッファへのデータ転送を行う必要はな
いので、上記第2の発明と同様処理時間を短縮できる。
ただ、分割レコードを含むブロックは、ブロックバッフ
ァ30に再度読み込む必要があるが、ブロックバッファ
30の容量を大きくすることにより、ダブって読み込む
回数を減らすことができる。また、第2の発明に比べて
アルゴリズムが単純であるという利点がある。
According to the third invention, it is not necessary to transfer data from the block buffer to the record buffer, so that the processing time can be shortened as in the second invention.
However, the block including the divided record needs to be read into the block buffer 30 again, but by increasing the capacity of the block buffer 30, the number of duplication and reading can be reduced. Further, there is an advantage that the algorithm is simpler than that of the second invention.

【0043】さらに、上記各発明を組み合わせてレコー
ド抽出処理を実施することもできる。例えば、第3の発
明において、ファイル間に分割されたレコードの抽出に
関する動作を、第1の発明において採用したレコードバ
ッファに転送する方法に代えて実施することができる。
図12は、第3の発明に第1の発明において採用したレ
コードバッファを組合せた実施例の処理手順を示すフロ
ーチャートである。この実施例では、第3の発明の処理
手順(図11のフローチャート)におけるステップ14
の次にステップ16として、分割レコードがファイルの
最終ブロックに含まれているものか否かを判別するよう
にしている。そして、最終ブロックに含まれていると
き、第1の発明の処理手順(図3のフローチャート)に
おけるステップ15及びステップ16を、ステップ17
及びステップ18として実施した後、次のファイルの先
頭ブロックを読む処理に移る。
Further, the record extraction processing can be carried out by combining the above inventions. For example, in the third invention, the operation related to the extraction of records divided between files can be carried out instead of the method of transferring to the record buffer adopted in the first invention.
FIG. 12 is a flowchart showing a processing procedure of an embodiment in which the record buffer adopted in the first invention is combined with the third invention. In this embodiment, step 14 in the processing procedure of the third invention (flowchart of FIG. 11) is performed.
Next, in step 16, it is determined whether or not the divided record is included in the final block of the file. When it is included in the final block, steps 15 and 16 in the processing procedure of the first invention (flowchart in FIG. 3) are replaced with step 17
After performing as step 18, the process moves to the process of reading the first block of the next file.

【0044】そしてまた、第3の発明の処理手順(図1
1のフローチャート)におけるステップ20の代わり
に、第1の発明の処理手順(図3のフローチャート)に
おけるステップ18〜ステップ26の処理を、ステップ
24〜ステップ32として行うようにしている。すなわ
ち、この実施例では、ファイルの最終ブロックにおいて
分割レコードが検出されたとき、ブロック内の未処理デ
ータをレコードバッファに転送する。引き続き次のブロ
ックデータを読み込み、分割レコードの残りデータをレ
コードバッファに転送してレコードバッファ内に組み立
てられたレコードを抽出し、そのレコードを処理するよ
うにしている。この動作以外の処理手順は、第3の発明
のものと同様である。
The processing procedure of the third invention (see FIG. 1)
Instead of step 20 in the flowchart of FIG. 1, the processing of steps 18 to 26 in the processing procedure of the first invention (the flowchart of FIG. 3) is performed as steps 24 to 32. That is, in this embodiment, when a divided record is detected in the final block of the file, the unprocessed data in the block is transferred to the record buffer. Subsequently, the next block data is read, the remaining data of the divided record is transferred to the record buffer, the record assembled in the record buffer is extracted, and the record is processed. The procedure other than this operation is the same as that of the third invention.

【0045】また、第3の発明において、ファイル間に
分割されたレコードの抽出に関する動作を、第2の発明
において採用したレコード情報を使う方法に代えて実施
することができる。図13は、第3の発明に第2の発明
において採用したレコード情報作成手段を組み合わせた
実施例の処理手順を示すフローチャートである。この実
施例では、第3の発明の処理手順(図11のフローチャ
ート)におけるステップ13の次にステップ14とし
て、第2の発明の処理手順(図6のフローチャート)に
おけるステップ15を入れている。また、それに続いて
処理フラグをセットした後、ステップ16として分割レ
コードがファイルの最終ブロックに含まれているものか
否かを判別するようにしている。そして、最終ブロック
に含まれているとき、第2の発明の処理手順(図6のフ
ローチャート)におけるステップ16を、ステップ17
として実施する。
Further, in the third invention, the operation relating to the extraction of the records divided between the files can be carried out instead of the method using the record information adopted in the second invention. FIG. 13 is a flowchart showing a processing procedure of an embodiment in which the record information creating means adopted in the second invention is combined with the third invention. In this embodiment, step 13 in the process procedure of the third invention (flowchart in FIG. 11) is followed by step 15 in the process procedure of the second invention (flowchart in FIG. 6) as step 14. Further, subsequently, after setting the processing flag, it is determined in step 16 whether or not the divided record is included in the final block of the file. When it is included in the final block, step 16 in the processing procedure of the second invention (flowchart in FIG. 6) is replaced with step 17
To implement.

【0046】そしてまた、第3の発明の処理手順(図1
1のフローチャート)におけるステップ20の代わり
に、第2の発明の処理手順(図6のフローチャート)に
おけるステップ18〜ステップ24の処理を、ステップ
23〜ステップ29として行うようにしている。すなわ
ち、この実施例では、ファイルの最終ブロックにおいて
分割レコードが検出されたとき、ブロック内の未処理デ
ータの先頭アドレスとサイズをレコード情報バッファに
登録し、引き続き次のブロックデータを読み込み、レコ
ードの残りデータの先頭アドレスとサイズをレコード情
報バッファに登録して、そのレコード情報を使って、分
割位置にあるレコード内のフィールドに対し、ポインタ
切り換え位置をモニタしながら各フィールドのデータを
処理するようにしている。この動作以外の処理手順は、
第3の発明のものと同様である。
The processing procedure of the third invention (see FIG. 1)
Instead of step 20 in the flowchart of FIG. 1, the processing of steps 18 to 24 in the processing procedure of the second invention (the flowchart of FIG. 6) is performed as steps 23 to 29. That is, in this embodiment, when the divided record is detected in the last block of the file, the start address and size of the unprocessed data in the block are registered in the record information buffer, the next block data is continuously read, and the remaining record remains. Register the start address and size of the data in the record information buffer, and use the record information to process the data in each field while monitoring the pointer switching position for the field in the record at the division position. There is. The procedure other than this operation is
It is similar to that of the third invention.

【0047】さらにまた、第2の発明で採用したレコー
ド情報を使う方法を全レコードの処理に使用することも
できる。その場合、図6のフローチャートのステップ1
1のレコード処理として、当該レコードの先頭アドレス
とサイズをレコード情報バッファに格納する処理と、図
8に示す分割レコード処理を入れることによって実現で
きる。
Furthermore, the method of using record information adopted in the second invention can be used for processing all records. In that case, step 1 of the flowchart of FIG.
The first record process can be realized by storing the start address and size of the record in the record information buffer and the divided record process shown in FIG.

【0048】以上の実施例では、可変長レコード形式の
レコード抽出について説明した。しかし、レコード長が
固定でRLFを持たない固定長レコード形式や、他のデ
ータと区別されたデリミタ文字(列)でレコードを区切
る不定長レコード形式のレコードについても、RLFか
らレコード長を求める箇所を変更するだけで各実施例の
適用は可能である。また、固定磁気ディスクに格納され
たファイルに対して本発明を適用しているが、例えば、
オンラインで転送され、一時的にブロックバッファに格
納されたデータからレコードを抽出する場合にも適用で
きる。さらに、ブロックサイズを超えるレコードが現れ
た場合でも、第1の発明では、3回以上レコードバッフ
ァへのデータ転送を行うことにより対応でき、第2の発
明では、レコード情報バッファのエントリを3個以上設
けること及びブロックバッファを3個以上設けることに
より対応でき、第3の発明では、ブロックバッファのサ
イズを充分大きくすることにより対応できる。
In the above embodiment, the record extraction in the variable length record format has been described. However, even for fixed-length record format that has a fixed record length and no RLF, or for records of indefinite-length record format that separates records with delimiter characters (columns) that are distinguished from other data, the location where the record length is calculated from the RLF is used. Each embodiment can be applied only by changing it. Further, although the present invention is applied to a file stored on a fixed magnetic disk, for example,
It can also be applied when extracting records from data transferred online and temporarily stored in the block buffer. Further, even if a record exceeding the block size appears, in the first invention, it can be dealt with by performing data transfer to the record buffer three times or more, and in the second invention, three or more entries of the record information buffer are provided. This can be dealt with by providing the block buffer and three or more block buffers. In the third invention, this can be dealt with by sufficiently increasing the size of the block buffer.

【0049】[0049]

【発明の効果】以上述べた如く、本発明のレコード抽出
装置によれば、次のような効果を奏する。第1の発明で
は、レコードの抽出を通常はブロックバッファから行
い、ブロックバッファ内に収まらないレコードだけ、レ
コードバッファに転送し、そこでレコードを組み立てて
からレコードの抽出を行う。そのため、全てのデータを
ブロックバッファからレコードバッファに転送する必要
はなく、転送するのはブロックバッファ内に収まらない
レコードだけである。その結果、従来技術に比べて転送
するために要する時間は短くなる。また、レコードバッ
ファ内でデータを移動させるようなことはしないので、
その分処理時間を短縮できる。
As described above, the record extracting device of the present invention has the following effects. In the first aspect of the invention, the record is normally extracted from the block buffer, and only the records that do not fit in the block buffer are transferred to the record buffer, the records are assembled there, and then the record is extracted. Therefore, it is not necessary to transfer all the data from the block buffer to the record buffer, and only the records that do not fit in the block buffer are transferred. As a result, the time required for the transfer is shorter than that in the conventional technique. Also, since we don't move data in the record buffer,
The processing time can be shortened accordingly.

【0050】第2及び第3の発明では、レコードの抽出
は全てブロックバッファから行う。そのため、ブロック
バッファからレコードバッファへのデータ転送を行う必
要もない。その結果、処理時間を短縮できる。
In the second and third aspects of the invention, all records are extracted from the block buffer. Therefore, it is not necessary to transfer data from the block buffer to the record buffer. As a result, the processing time can be shortened.

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

【図1】 第1の発明の概要を示すブロック図FIG. 1 is a block diagram showing an outline of a first invention.

【図2】 第1の発明におけるレコードバッファ内での
処理を説明するための図
FIG. 2 is a diagram for explaining processing in a record buffer in the first invention.

【図3】 第1の発明の動作を説明するためのフローチ
ャート
FIG. 3 is a flowchart for explaining the operation of the first invention.

【図4】 第2の発明の概要を示すブロック図FIG. 4 is a block diagram showing an outline of a second invention.

【図5】 第2の発明におけるブロックバッファ内の分
割レコードとレコード情報バッファ内のデータとの関係
を示す図
FIG. 5 is a diagram showing a relationship between divided records in a block buffer and data in a record information buffer in the second invention.

【図6】 第2の発明の動作を説明するためのフローチ
ャート
FIG. 6 is a flowchart for explaining the operation of the second invention.

【図7】 レコード内の各フィールドと分割フラグとの
関係を示す図
FIG. 7 is a diagram showing a relationship between each field in a record and a division flag.

【図8】 分割レコード処理の手順を示すフローチャー
FIG. 8 is a flowchart showing a procedure of divided record processing.

【図9】 第3の発明の概要を示すブロック図FIG. 9 is a block diagram showing an outline of a third invention.

【図10】 ブロックバッファ内に複数のブロックが読
み込まれた状態を示す図
FIG. 10 is a diagram showing a state in which a plurality of blocks are read in a block buffer.

【図11】 第3の発明の動作を説明するためのフロー
チャート
FIG. 11 is a flowchart for explaining the operation of the third invention.

【図12】 第3の発明に第1の発明において採用した
レコードバッファを組合せた実施例の処理手順を示すフ
ローチャート
FIG. 12 is a flowchart showing a processing procedure of an embodiment in which the record buffer adopted in the first invention is combined with the third invention.

【図13】 第3の発明に第2の発明において採用した
レコード情報作成手段を組み合わせた実施例の処理手順
を示すフローチャート
FIG. 13 is a flowchart showing a processing procedure of an embodiment in which the record information creating means adopted in the second invention is combined with the third invention.

【図14】 従来のレコード抽出装置の概要を示すブロ
ック図
FIG. 14 is a block diagram showing an outline of a conventional record extraction device.

【図15】 従来のレコード抽出装置におけるレコード
バッファ内での処理を説明するための図
FIG. 15 is a diagram for explaining processing in a record buffer in a conventional record extraction device.

【図16】 磁気ディスク中のファイル構成の概要を示
す図
FIG. 16 is a diagram showing an outline of a file structure in a magnetic disk.

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

1…ファイル切換手段、2…入力手段、3,3a,3b
…レコード抽出手段、4,4a,4b…レコード処理手
段、5…転送手段、6…レコード情報作成手段、7…入
力制御手段、8…データ移動手段、10…磁気ディス
ク、20…プリンタ、30,30a,30b…ブロック
バッファ、40…レコードバッファ
1 ... File switching means, 2 ... Input means, 3, 3a, 3b
... record extracting means, 4, 4a, 4b ... record processing means, 5 ... transfer means, 6 ... record information creating means, 7 ... input control means, 8 ... data moving means, 10 ... magnetic disk, 20 ... printer, 30, 30a, 30b ... Block buffer, 40 ... Record buffer

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 レコードを単位として構成されるデータ
をブロックを単位として記憶する記憶装置からレコード
を抽出するレコード抽出装置において、上記記憶装置か
らデータをブロック単位でブロックバッファに読み込ま
せる入力手段と、上記ブロックバッファからレコードを
順次抽出して抽出情報を出力すると共に、ブロックバッ
ファ内に収まらないレコードの検出信号を出力する第1
のレコード抽出手段と、上記第1のレコード抽出手段か
らの上記検出信号を受けてブロックバッファ内の未処理
データをレコードバッファに転送した後、上記入力手段
に次のブロックデータを要求し、返されたブロックデー
タの先頭部分にある、上記ブロックバッファに収まらな
いレコードの残りデータをレコードバッファに転送する
と共に、ブロックバッファ内からのレコード抽出の再開
を上記第1のレコード抽出手段に指示する転送手段と、
上記転送手段が転送したレコードバッファ内のレコード
を抽出し、その抽出情報を出力する第2のレコード抽出
手段と、上記第1のレコード抽出手段と第2のレコード
抽出手段の抽出情報が指すレコードを処理するレコード
処理手段とを具えることを特徴とするレコード抽出装
置。
1. A record extraction device for extracting a record from a storage device that stores data constituted by a record in a block unit, and an input means for reading data from the storage device in a block unit in a block buffer, Firstly, a record is sequentially extracted from the block buffer, the extracted information is output, and a detection signal for a record that does not fit in the block buffer is output.
Receiving the detection signal from the record extracting means and the first record extracting means, the unprocessed data in the block buffer is transferred to the record buffer, and then the next block data is requested from the input means and returned. Transfer means for transferring the remaining data of the record that does not fit in the block buffer at the beginning of the block data to the record buffer, and for instructing the first record extracting means to restart record extraction from the block buffer; ,
The second record extracting means for extracting the record in the record buffer transferred by the transferring means and outputting the extracted information, and the record indicated by the extraction information of the first record extracting means and the second record extracting means A record extracting device comprising: a record processing unit for processing.
【請求項2】 レコードを単位として構成されるデータ
をブロックを単位として記憶する記憶装置からレコード
を抽出するレコード抽出装置において、上記記憶装置か
らデータをブロック単位で2つ以上のブロックバッファ
に順番に繰り返して読み込ませる入力手段と、上記ブロ
ックバッファからレコードを順次抽出して抽出情報を出
力すると共に、ブロックバッファ内に収まらないレコー
ドの検出信号を出力するレコード抽出手段と、上記レコ
ード抽出手段からの抽出情報が指すレコードを処理する
第1のレコード処理手段と、上記レコード抽出手段から
の上記検出信号を受けてブロックバッファ内の未処理デ
ータの先頭位置と長さを第1のレコード情報としてレコ
ード情報バッファに登録した後、上記入力手段に対して
次のブロックデータを別のブロックバッファに読み込ま
せることを要求し、返されたブロックデータの中の、上
記ブロックバッファ内に収まらないレコードの残りデー
タの先頭位置と長さを第2のレコード情報としてレコー
ド情報バッファに登録し、そのような処理を当該レコー
ドの最後部のデータがブロックバッファに読み込まれる
まで繰り返し、登録した各レコード情報を出力すると共
に、ブロックバッファ内からのレコード抽出の再開を上
記レコード抽出手段に指示するレコード情報作成手段
と、2つ以上のブロックバッファ内に分かれて読み込ま
れたレコードの処理はフィールド単位で行い、かつ、レ
コードの分割位置にあるフィールドの処理はバイト単位
で行い、境界のバイト位置における処理対象バイトを指
すポインタの切り換えを上記各レコード情報に基づいて
行う第2のレコード処理手段とを具えることを特徴とす
るレコード抽出装置。
2. A record extraction device for extracting a record from a storage device that stores data configured in units of record in blocks, in which data is sequentially transferred from the storage device to two or more block buffers in block units. Input means for repeatedly reading, record extraction means for sequentially extracting records from the block buffer and outputting extraction information, and record detection means for outputting a detection signal of a record that does not fit in the block buffer, and extraction from the record extraction means First record processing means for processing the record pointed to by the information, and record information buffer with the start position and length of the unprocessed data in the block buffer as the first record information in response to the detection signal from the record extracting means. After registering in the Request to read in another block buffer, and the start position and length of the remaining data of the record that does not fit in the block buffer in the returned block data are stored in the record information buffer as the second record information. Register and repeat such processing until the data at the end of the record is read into the block buffer, output each record information registered, and instruct the record extraction means to restart record extraction from the block buffer. Record information creating means and processing of records read separately in two or more block buffers are performed in field units, and fields in record division positions are performed in byte units, and boundary byte positions are used. In the above records Record extraction apparatus characterized by comprising a second record processing means for performing, based on the distribution.
【請求項3】 レコードを単位として構成されるデータ
をブロックを単位として記憶する記憶装置からレコード
を抽出するレコード抽出装置において、上記記憶装置か
らデータを複数ブロック単位でブロックバッファに読み
込ませる入力手段と、上記ブロックバッファからレコー
ドを順次抽出して抽出情報を出力すると共に、ブロック
バッファ内に収まらないレコードの検出信号を出力する
レコード抽出手段と、上記レコード抽出手段の抽出情報
が指すレコードを処理するレコード処理手段と、上記レ
コード抽出手段からの上記検出信号を受けてブロックバ
ッファ内の未処理データが記憶されているファイル内の
ブロック番号とブロック内のオフセットとを算出し、上
記ブロック番号のブロックから上記ブロックバッファに
再びデータを読み込むことを上記入力手段に要求し、返
されたデータを上記オフセット位置から処理することを
上記レコード抽出手段に指示する入力制御手段とを具え
ることを特徴とするレコード抽出装置。
3. A record extraction device for extracting a record from a storage device that stores data constituted by a record in a block unit, and an input means for reading data from the storage device into a block buffer in a unit of a plurality of blocks. A record extraction unit for sequentially extracting records from the block buffer and outputting extraction information, and outputting a detection signal of a record that does not fit in the block buffer; and a record for processing the record indicated by the extraction information of the record extraction unit. In response to the detection signal from the processing means and the record extraction means, a block number and an offset within the block in the file in which the unprocessed data in the block buffer is stored are calculated, and from the block with the block number, the above Read data into block buffer again A record extraction device, comprising: input control means for requesting the input means to perform processing, and for instructing the record extraction means to process the returned data from the offset position.
JP4355642A 1992-12-19 1992-12-19 Record extraction device Pending JPH06187100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4355642A JPH06187100A (en) 1992-12-19 1992-12-19 Record extraction device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4355642A JPH06187100A (en) 1992-12-19 1992-12-19 Record extraction device

Publications (1)

Publication Number Publication Date
JPH06187100A true JPH06187100A (en) 1994-07-08

Family

ID=18445022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4355642A Pending JPH06187100A (en) 1992-12-19 1992-12-19 Record extraction device

Country Status (1)

Country Link
JP (1) JPH06187100A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11494409B2 (en) 2017-10-16 2022-11-08 Alteryx, Inc. Asynchronously processing sequential data blocks

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11494409B2 (en) 2017-10-16 2022-11-08 Alteryx, Inc. Asynchronously processing sequential data blocks

Similar Documents

Publication Publication Date Title
US6177956B1 (en) System and method for correlating processing data and image data within a digital camera device
US5867214A (en) Apparatus and method for increasing a digital camera image capture rate by delaying image processing
JPH0434345B2 (en)
JPH0779403A (en) Electronic still camera
US20030055840A1 (en) Image file apparatus and method
JPH05181905A (en) Retrieval information display device
JPH06187100A (en) Record extraction device
JP2006197561A (en) Data recording method and device
JP4251725B2 (en) File management method
JPH1011570A (en) Electronic filing device
JP2697824B2 (en) Control method in document image processing apparatus
JPH04292091A (en) Data management system for electronic exchange
JPS59132479A (en) Data processing circuit
JP2001275064A (en) Device and method for recording
JP3771969B2 (en) Information reading device
JP4250170B2 (en) Video encoder that sends the extracted image to the outside during encoding
JPH0664599B2 (en) Document file search device
JPH05159031A (en) Still picture processing system
JPH0830393A (en) Device and method for reproducing and recording image data
JPH05183606A (en) Pos system
JPH04192052A (en) File multi-address transfer device
JPH07107432A (en) Still picture reproducing device
JPH02135571A (en) Picture filing device
JPS6162976A (en) Image information storage system
JPH01290023A (en) File controller for extraction of read data