Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3004940B2 - Data transfer method and device - Google Patents
[go: Go Back, main page]

JP3004940B2 - Data transfer method and device - Google Patents

Data transfer method and device

Info

Publication number
JP3004940B2
JP3004940B2 JP9079692A JP7969297A JP3004940B2 JP 3004940 B2 JP3004940 B2 JP 3004940B2 JP 9079692 A JP9079692 A JP 9079692A JP 7969297 A JP7969297 A JP 7969297A JP 3004940 B2 JP3004940 B2 JP 3004940B2
Authority
JP
Japan
Prior art keywords
data
area
transfer
file
memory
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.)
Expired - Fee Related
Application number
JP9079692A
Other languages
Japanese (ja)
Other versions
JPH10275103A (en
Inventor
武嗣 三角
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP9079692A priority Critical patent/JP3004940B2/en
Publication of JPH10275103A publication Critical patent/JPH10275103A/en
Application granted granted Critical
Publication of JP3004940B2 publication Critical patent/JP3004940B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、データベース処理
システムに用いられるデータ転送装置に関し、特に、ソ
ート装置のソートデータをメモリまたはファイルへ転送
するデータ転送装置にする。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data transfer device used in a database processing system, and more particularly to a data transfer device for transferring sort data of a sort device to a memory or a file.

【0002】[0002]

【従来の技術】図12には、ソート装置を備えたデータ
処理システムの全体構成を示す。
2. Description of the Related Art FIG. 12 shows an overall configuration of a data processing system provided with a sorting device.

【0003】このデータベース処理システム20は、デ
ィスク装置25に記録されている複数のデータを各デー
タに含まれている項目キー毎に並べ替えて主記憶装置や
CPUに書き戻すためのシステムである。
The database processing system 20 is a system for rearranging a plurality of data recorded on a disk device 25 for each item key included in each data and writing the data back to a main storage device or a CPU.

【0004】具体的には、このデータベース処理システ
ム20において、上記動作を行う場合には、まず、ディ
スク制御装置24を介してディスク装置25からデータ
が読み出され、一旦ソート装置26に書き込まれる。こ
のソート装置26では、指定された項目毎の並べ替え方
式により各データが並べ替えられ、ソートデータが生成
される。そして、このソートデータは、予め指定された
転送先領域サイズに従い、転送先である主記憶装置23
やCPU21の指定されたアドレスに順次転送される。
Specifically, in the database processing system 20, when performing the above operation, first, data is read from the disk device 25 via the disk control device 24, and is temporarily written to the sort device 26. In the sorting device 26, each data is rearranged according to a specified rearrangement method for each item, and sorted data is generated. The sort data is transferred to the main storage device 23 as the transfer destination in accordance with the transfer destination area size specified in advance.
And to the address specified by the CPU 21 sequentially.

【0005】転送先では、ソートデータはそれぞれ個々
の転送データレコードとして記憶され、ここで記録され
たデータに基づき、集計処理が行われる。集計処理は、
各データの項目毎にロールアップ、キューブなどの集計
演算を行い、各項目毎の集計値及び全データに基づく集
計値等が算出される。各集計値は、データ列の項目毎の
区切り位置等にそれぞれ集計レコードとして挿入され、
集計後データが生成される。
At the transfer destination, the sort data is stored as individual transfer data records, and a totaling process is performed based on the data recorded here. The aggregation process is
Aggregation calculations such as roll-up and cube are performed for each data item, and a total value for each item, a total value based on all data, and the like are calculated. Each summary value is inserted as a summary record at the delimiter position of each item of the data column, etc.
Post-aggregation data is generated.

【0006】図13には、前記ソート装置により各支店
における製品別売上を求める作業を行った場合の例を示
す。なお、この場合はロールアップ処理により集計処理
を行った。各支店における製品別売上がディスク装置2
5にランダムな順序で入力される(a)。入力データに
は、第一キーフィールド28には支店名が、第二キーフ
ィールド29には製品名が書き込まれている。なお、こ
れら第一キーフィールド28および第二キーフィール2
9に記録されている支店名および製品名がソート処理時
の基準項目となる。また、集計フィールド30には売上
数が示され、フィールド31にはデータの種類、即ち、
売上データであるか集計データであるかが書き込まれて
いる。
FIG. 13 shows an example of a case where the sorting device performs an operation of obtaining sales by product at each branch. In this case, the tallying process was performed by a roll-up process. Product sales by product at each branch is disk unit 2
5 are input in a random order (a). In the input data, the branch name is written in the first key field 28, and the product name is written in the second key field 29. The first key field 28 and the second key field 2
The branch name and the product name recorded in 9 are the reference items in the sorting process. The total number field 30 indicates the number of sales, and the field 31 indicates the type of data, that is, the number of sales.
Whether the data is sales data or total data is written.

【0007】このディスク装置25に入力されたデータ
は、ソート装置26により、上述した支店名および製品
名を基準項目としてソート処理が行われる。ここでは、
支店名を第一項目とし、次いで、製品名を第二項目とし
て並べ替えが行われ、結果として、図13(b)のソー
トデータが生成される。このソートデータは、データ転
送装置により、主記憶装置23やCPU21に送信され
て、転送データレコードとして記憶され、集計処理が行
われる。
The data input to the disk device 25 is sorted by the sorting device 26 using the above-mentioned branch name and product name as reference items. here,
Sorting is performed with the branch name as the first item and then the product name as the second item. As a result, the sort data in FIG. 13B is generated. This sort data is transmitted by the data transfer device to the main storage device 23 or the CPU 21, where it is stored as a transfer data record, and a tallying process is performed.

【0008】集計処理は、各支店の製品毎の売上数、各
支店の全製品の売上数、全支店の全売上数などの集計値
が算出される。ここで算出された集計値は転送データレ
コードの各項目の終端などに集計レコードとして挿入記
録され、集計後データが生成される(c)。具体的に
は、図13(c)に示す集計レコード32には、藤沢支
店におけるテレビの全売上台数の集計値が記録される。
また、集計レコード33には、藤沢支店における全製品
の売上数の集計値が記録される。また、集計レコード3
4には、藤沢支店および鎌倉支店における全製品の売上
数の集計値が記録される。
In the tabulation process, tabulated values such as the number of sales for each product in each branch, the number of sales of all products in each branch, and the total number of sales in all branches are calculated. The calculated tally value is inserted and recorded as a tally record at the end of each item of the transfer data record, and the tally data is generated (c). Specifically, the total record 32 shown in FIG. 13C records the total value of the total number of TV units sold at the Fujisawa branch.
Further, in the total record 33, a total value of the number of sales of all products in the Fujisawa branch is recorded. In addition, aggregation record 3
In 4, the total value of the sales amount of all products at the Fujisawa branch and the Kamakura branch is recorded.

【0009】このように転送先において集計処理が行わ
れた場合には、集計値が書き込まれた集計レコードが挿
入されるため、転送したデータのレコード数よりも集計
レコードのレコード数分だけ増加することになる。
When the tabulation process is performed at the transfer destination as described above, a tabulated record in which the tabulated value is written is inserted, so that the number of records is increased by the number of tabulated records from the number of records of the transferred data. Will be.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、データ
転送装置がソートデータを転送する際に、予め集計後に
増加するレコード数を知ることはできない。そのため
に、転送先の主記憶装置やCPUの記憶容量一杯に転送
データを転送してしまう場合がある。このような状態で
集計処理を行った場合には、集計レコードを記録する容
量が不足し、書き込みができないことになる。
However, when the data transfer device transfers the sort data, it is not possible to know in advance the number of records that will increase after aggregation. For this reason, the transfer data may be transferred to the full storage capacity of the transfer destination main storage device or CPU. If the tallying process is performed in such a state, the capacity for recording the tally record is insufficient, and writing cannot be performed.

【0011】一方、上記のような問題を回避するため
に、データ転送装置によりソートデータを転送先に転送
する際に、各データレコード毎に集計レコード数として
必要となる最大レコード数を確保することも考えられ
る。具体的には、上述した従来の技術の場合には、一つ
の項目区切り位置において集計レコードとして必要なレ
コード数は 最大で2レコード分であり、この最大レコ
ード数を一律に各ソートデータ転送時に確保することも
考えられる。このように予め集計レコードを書き込む領
域を確保することにより、確実に集計レコードの記録を
行うことができる。
On the other hand, in order to avoid the above-mentioned problem, when transferring the sorted data to the transfer destination by the data transfer device, it is necessary to secure the maximum number of records required as the total number of records for each data record. Is also conceivable. Specifically, in the case of the above-described conventional technology, the number of records required as a totaling record at one item delimiter position is a maximum of two records, and this maximum number of records is uniformly secured at the time of each sort data transfer. It is also possible to do. In this way, by securing the area for writing the total record in advance, the total record can be reliably recorded.

【0012】しかし、各ソートデータ転送時に、集計レ
コードとして最大レコード数を転送先に確保した場合、
転送先の記憶領域の有効活用ができないことになる。即
ち、これら確保された領域すべてに集計レコードが記録
されるわけではなく、多くは無駄な空き領域として残さ
れることになる。
However, when the maximum number of records as a total record is secured at the transfer destination at the time of each sort data transfer,
The storage area at the transfer destination cannot be used effectively. That is, the tally record is not recorded in all of these secured areas, and many are left as useless empty areas.

【0013】また、上記のような無駄な空き領域を減ら
すために、各ソートデータ毎に確保されるレコード数を
減らした場合、例えば、上述した2レコードを1レコー
ドに減らした場合には、集計中に領域の不足が発生する
可能性がある。仮に、集計中に領域が不足した場合に
は、一旦データを退避させ、領域を確保し直すなどの大
きなオーバーヘッドが発生する。
When the number of records secured for each sort data is reduced to reduce the useless free space as described above, for example, when the above-described two records are reduced to one record, There may be a shortage of space inside. If the area becomes insufficient during the aggregation, a large overhead such as temporarily saving the data and re-allocating the area occurs.

【0014】そこで、本発明は、上記課題に鑑みてなさ
れたものであり、その目的は、集計処理などのデータを
書き込むための空き領域を適切に転送先に確保できるデ
ータ転送方法及びデータ転送装置を提供することであ
る。
SUMMARY OF THE INVENTION The present invention has been made in consideration of the above problems, and has as its object to provide a data transfer method and a data transfer apparatus capable of appropriately securing a free space for writing data such as a tallying process at a transfer destination. It is to provide.

【0015】[0015]

【課題を解決するための手段】上記目的を達成するため
に、本発明のデータ転送方法は、前記ソートデータを順
次メモリまたはファイルへ転送する転送工程と、転送さ
れるデータ列に対して、項目別区切り位置を検出する区
切り位置検出工程と、前記項目別区切り位置検出時に所
定の空き領域をメモリまたはファイルに指定する空き領
域指定工程と、を含むことを特徴とする。
In order to achieve the above object, a data transfer method according to the present invention comprises: a transfer step of sequentially transferring the sort data to a memory or a file; It is characterized by including a break position detecting step of detecting a separate break position, and a free area designating step of designating a predetermined free area in a memory or a file when the item-specific break position is detected.

【0016】上記発明によれば、転送先でソートデータ
に基づき、集計処理などが行われた場合に、項目毎に集
計値等を記録する領域が確保されることになる。
According to the present invention, when a totaling process or the like is performed at the transfer destination based on the sort data, an area for recording a total value or the like is secured for each item.

【0017】本発明のデータ転送装置は、データベース
処理システムに用いられ、ソート装置のソートデータを
メモリまたはファイルへ転送するデータ転送装置であっ
て、前記ソートデータを順次メモリまたはファイルへ転
送する転送手段と、転送されるデータ列に対して、項目
別区切り位置を検出する区切り位置検出手段と、前記項
目別区切り位置検出時に所定の空き領域をメモリまたは
ファイルに指定する空き領域指定手段と、を含むことを
特徴とする。
The data transfer device of the present invention is used in a database processing system and is a data transfer device for transferring the sort data of the sort device to a memory or a file, and a transfer means for sequentially transferring the sort data to a memory or a file. And a break position detecting means for detecting a break position for each item in the transferred data string, and a free area designating means for specifying a predetermined free area in a memory or a file when the break position for each item is detected. It is characterized by the following.

【0018】上記発明によれば、転送手段が、ソートデ
ータを順次メモリまたはファイルへ転送し、この転送時
に区切り位置検出手段が、転送されるデータ列に対して
項目別区切り位置を検出する。この区切り位置検出手段
が区切り位置を検出すると、空き領域指定手段が、所定
の空き領域をメモリまたはファイルに指定する。
According to the invention, the transfer means sequentially transfers the sort data to the memory or the file, and at the time of this transfer, the break position detecting means detects the break position for each item in the transferred data string. When the break position detecting means detects the break position, the free area specifying means specifies a predetermined free area in a memory or a file.

【0019】上記データ転送装置において、前記区切り
位置検出手段が、ソート装置によりソートデータに付さ
れたフラグを認識して、前記データ列の項目別区切り位
置を検出するように構成することができる。
In the above data transfer device, the delimiter position detecting means may recognize the flag attached to the sort data by the sorter and detect the delimiter position of each item of the data string.

【0020】上記構成によれば、転送手段が、ソートデ
ータを順次メモリまたはファイルへ転送し、この転送時
に区切り位置検出手段が、転送されるソートデータに付
されたフラグを認識して、前記データ列の項目別区切り
位置を検出する。そして、この区切り位置検出手段が区
切り位置を検出すると、空き領域指定手段が、所定の空
き領域をメモリまたはファイルに指定することになる。
According to the above arrangement, the transfer means sequentially transfers the sort data to the memory or the file, and at the time of this transfer, the delimiter position detecting means recognizes the flag attached to the sort data to be transferred, and Detects column breaks by column. When the break position detecting means detects the break position, the free area specifying means specifies a predetermined free area in a memory or a file.

【0021】上記データ転送装置において、空き領域指
定手段が、区切り位置検出手段により検出されたフラグ
の種類に基づき、所定のレコード数の空き領域をメモリ
またはファイルに指定するように構成することができ
る。
In the above data transfer apparatus, the free area designating means can be configured to designate a predetermined number of free areas in the memory or the file based on the type of the flag detected by the delimiter position detecting means. .

【0022】上記構成によれば、予めフラグの種類によ
り指定する空き領域のレコード数を設定しておくことに
より、適切なレコード数の空き領域がメモリまたはファ
イルに確保される。
According to the above configuration, by setting the number of records of the free area specified by the type of the flag in advance, a free area of an appropriate number of records is secured in the memory or the file.

【0023】本発明のデータ転送装置は、上記構成にさ
らに、メモリまたはファイル内にソートデータの転送ま
たは空き領域の指定を行うための残存領域の有無をモニ
タするモニタ手段と、前記モニタ手段において残存領域
が無いかまたは不足していることが検知された場合に該
ソートデータの転送を制御する転送制御手段と、を含む
ことを特徴とする。
The data transfer device of the present invention may further comprise a monitor means for monitoring the presence or absence of a remaining area for transferring sort data or designating a free area in a memory or a file; Transfer control means for controlling the transfer of the sort data when it is detected that there is no or insufficient area.

【0024】上記発明によれば、モニタ手段が、メモリ
またはファイル内にソートデータの転送または空き領域
の指定を行うための残存領域の有無を監視し、前記モニ
タ手段において残存領域が無いかまたは不足しているこ
とが検知された場合に転送制御手段は、該ソートデータ
の転送を停止させる。
According to the present invention, the monitor means monitors the presence or absence of a remaining area for transferring sort data or designating a free area in a memory or a file, and the monitor means has no or insufficient remaining area. When it is detected that the sorting is performed, the transfer control means stops the transfer of the sort data.

【0025】上記発明において、前記転送手段はデータ
列を各項目毎にメモリまたはファイル内の開始領域から
連続するように転送し、また、前記空き領域指定手段
は、メモリまたはファイルに転送された各項目毎のデー
タ列の終端に所定の空き領域を指定するように構成した
場合には 前記モニタ手段に、メモリまたはファイルの
終了領域位置を記憶させ、この終了領域位置と各ソート
データの転送領域位置または指定される空き領域位置と
を比較することによりメモリまたはファイル内の残存領
域の有無を監視させることができる。
In the above invention, the transfer means transfers the data string for each item so as to be continuous from a start area in a memory or a file, and the free area designating means transfers each data string to the memory or the file. When a predetermined free area is designated at the end of the data string for each item, the monitor means stores the end area position of the memory or the file, and stores the end area position and the transfer area position of each sort data. Alternatively, the presence or absence of a remaining area in a memory or a file can be monitored by comparing with a designated free area position.

【0026】また、前記モニタ手段は、転送されたソー
トデータの記録領域のレコード数及び指定された空き領
域のレコード数の総計とメモリまたはファイルの全領域
数とに基づき残存領域をモニタさせることができる。
The monitor means may monitor the remaining area based on the total number of records in the recording area of the transferred sort data and the total number of records in the designated free area and the total number of areas in the memory or file. it can.

【0027】本発明のデータ転送装置は、上記構成にさ
らに、転送されるデータ列の項目毎の集計値を算出する
集計手段と、前記空き領域指定手段によりメモリまたは
ファイルに指定される空き領域に集計値を転送する集計
値転送手段と、を備えることができる。
The data transfer apparatus according to the present invention may further comprise a totaling means for calculating a total value for each item of the data string to be transferred, and a free area designated in a memory or a file by said free area specifying means. A total value transfer unit that transfers the total value.

【0028】上記構成によれば、集計手段が、転送され
るデータ列の項目毎の集計値を算出し、集計値転送手段
は、前記空き領域指定手段によりメモリまたはファイル
に指定される空き領域に集計値を転送する。
According to the above arrangement, the tallying means calculates the tally value for each item of the data string to be transferred, and the tally value transfer means stores the tally value in the free space designated in the memory or file by the free space designation means. Transfer the summary value.

【0029】[0029]

【発明の実施の形態】以下に、本発明の好適な実施の形
態を図面を用いて説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below with reference to the drawings.

【0030】[第一の実施の形態]図1には、第一の実
施の形態のデータ転送装置40を示す。
[First Embodiment] FIG. 1 shows a data transfer apparatus 40 according to a first embodiment.

【0031】データ転送装置40は、ソート装置からの
ソートデータを媒介して転送するための転送手段401
として、入力バッファ402と出力バッファ404が備
えられている。この出力バッファ404は、後述する制
御回路422の指示に従い、転送先にソートデータを転
送する。
The data transfer device 40 is a transfer means 401 for transferring the sort data from the sort device via the sort device.
, An input buffer 402 and an output buffer 404 are provided. The output buffer 404 transfers the sort data to the transfer destination according to an instruction of the control circuit 422 described later.

【0032】この入力バッファ402と出力バッファ4
04との間には、ソート装置において各ソートデータに
対しブレークフラグを検出を行うブレークフラグ検出回
路406が設けられている。ソート装置はソートデータ
を作成するとともに、データ列の項目別区切り位置に適
切なブレークフラグを付加する。従って、ブレークフラ
グ検出回路406は、このブレークフラグを介してデー
タ列の項目別区切り位置を検出する区切り位置検出手段
として機能する。
The input buffer 402 and the output buffer 4
A break flag detection circuit 406 for detecting a break flag for each sort data in the sorting apparatus is provided between the apparatus and the apparatus. The sort device creates the sort data and adds an appropriate break flag at the item-separated position of the data string. Therefore, the break flag detecting circuit 406 functions as a break position detecting means for detecting a break position for each item of the data string via the break flag.

【0033】このブレークフラグ検出回路406には、
レコード構成情報レジスタ408が接続され、このレコ
ード構成情報レジスタ408には、ソートデータ内のブ
レークフラグの位置や転送先のレコード長などのフィー
ルド構成情報が設定されている。このレコード構成情報
レジスタ408は、この設定されている情報をブレーク
フラグ検出回路406や後述する乗算回路に供給する。
即ち、上述したブレークフラグ検出回路406によるブ
レークフラグの検出は、レコード構成情報レジスタ40
8より供給される情報に基づき行われる。
The break flag detection circuit 406 includes:
A record configuration information register 408 is connected, and field configuration information such as the position of the break flag in the sort data and the record length of the transfer destination is set in the record configuration information register 408. The record configuration information register 408 supplies the set information to the break flag detection circuit 406 and a multiplication circuit described later.
That is, the break flag detection by the above-described break flag detection circuit 406 is performed by the record configuration information register 40.
8 is performed based on the information supplied.

【0034】ブレークフラグ検出回路406に接続され
たレコード数演算回路410は、ブレークフラグ検出回
路406において検出されたブレークフラグを受信し、
そのブレークフラグの種類により、転送先に指定する空
き領域用のレコード数を演算する。
The record number calculation circuit 410 connected to the break flag detection circuit 406 receives the break flag detected by the break flag detection circuit 406,
Based on the type of the break flag, the number of records for the free area designated as the transfer destination is calculated.

【0035】レコード数演算回路410とレコード構成
情報レジスタ408とに接続された乗算回路412は、
レコード数演算回路410からのレコード数とレコード
構成情報レジスタに設定されているレコード長に基づき
空き領域として必要な領域の大きさを算出する。
The multiplication circuit 412 connected to the record number calculation circuit 410 and the record configuration information register 408
The size of an area required as an empty area is calculated based on the number of records from the record number calculation circuit 410 and the record length set in the record configuration information register.

【0036】この乗算回路412に接続された加算回路
414は、乗算回路において算出された空き領域として
必要な領域の大きさに、ソートデータを記録する必要な
領域の大きさを加算する。
An adding circuit 414 connected to the multiplying circuit 412 adds the size of the area required to record the sort data to the size of the area required as a free area calculated by the multiplying circuit.

【0037】加算回路414に接続された転送アドレス
レジスタ416には、転送先の領域内の転送開始アドレ
スが記憶され、この記憶された転送開始アドレスから転
送するソートデータ、空き領域のアドレスを割り当て
る。アドレス出力バッファ424は、ここで割り当てら
れた転送アドレスを一旦記憶し、後述する制御回路42
2の指令に従い、転送先に出力する。
The transfer address register 416 connected to the addition circuit 414 stores the transfer start address in the transfer destination area, and assigns the sort data to be transferred and the address of the free area from the stored transfer start address. The address output buffer 424 temporarily stores the transfer address assigned here, and stores it in the control circuit 42 described later.
Output to the transfer destination according to the instruction of 2.

【0038】即ち、これらレコード数演算回路410、
乗算回路412、加算回路414、転送アドレスレジス
タ416及びアドレス出力バッファ424が連係して空
き領域指定手段405としての機能を果たす。
That is, these record number calculation circuits 410,
The multiplication circuit 412, the addition circuit 414, the transfer address register 416, and the address output buffer 424 cooperate to function as the empty area specifying means 405.

【0039】一方、前記転送アドレスレジスタ416
は、比較回路418に接続されている。この比較回路4
18は、転送先に残存領域の有無を監視するモニタ手段
として機能する。具体的には、終了アドレスレジスタ4
20に設定されている転送先の領域の終了アドレスと、
転送アドレスレジスタ416において割り当てられた転
送アドレスの次のアドレスとを比較することにより監視
する。
On the other hand, the transfer address register 416
Are connected to the comparison circuit 418. This comparison circuit 4
Reference numeral 18 functions as monitoring means for monitoring the presence or absence of a remaining area at the transfer destination. Specifically, the end address register 4
20, the end address of the transfer destination area set in
Monitoring is performed by comparing the transfer address assigned in the transfer address register 416 with the next address.

【0040】この比較回路418に接続された制御回路
422は、比較回路418の比較結果に基づき、データ
転送装置全体の制御を行う。即ち、制御回路422は、
比較回路418において最終アドレスと比較アドレスと
が一致した場合にはデータ転送を停止させ、一方、一致
しない場合には、データ転送を実行させる。
The control circuit 422 connected to the comparison circuit 418 controls the entire data transfer device based on the comparison result of the comparison circuit 418. That is, the control circuit 422
In the comparison circuit 418, when the final address and the comparison address match, the data transfer is stopped, and when they do not match, the data transfer is executed.

【0041】以下に、上記の通り構成されたデータ転送
装置40により、図2に示すソートデータを転送する場
合の作用を説明する。なお、ここでは複数の支店におい
て販売された製品の販売数を集計した。
The operation of the data transfer apparatus 40 configured as described above when transferring the sort data shown in FIG. 2 will be described below. Here, the number of products sold at a plurality of branches is counted.

【0042】図2に示すソートデータ440は、第一キ
ーフィールド441に記録された支店名および第二キー
フィールド442に記録された製品名に基づきソート処
理されたデータである。集計フィールド443には、売
上数が記録され、後にこの数値に基づき集計演算が行わ
れる。フラグ列444には、ブレークフラグの数値が記
載されている。このブレークフラグは、データ列の下段
データと比較した際に、第一キーフィールド441の支
店名が異なる場合には「1」が付され、または、第二キ
ーフィールド442の製品名が異なる場合には「2」が
付される。また、第一キーフィールド441および第二
キーフィールド442の支店名が一致している場合に
は、「0」が付される。具体的には、データ445とデ
ータ446とでは、第二キーフィールド442の製品名
が異なるため、「2」が付され、またデータ447とデ
ータ448とでは、第一キーフィールド441の支店名
が異なるため、「1」が付されている。
The sort data 440 shown in FIG. 2 is data sorted based on the branch name recorded in the first key field 441 and the product name recorded in the second key field 442. The total number of sales is recorded in the total field 443, and a total operation is performed later based on this numerical value. The flag column 444 describes the numerical value of the break flag. This break flag is added with “1” when the branch name of the first key field 441 is different from the lower data of the data string, or when the product name of the second key field 442 is different. Is appended with "2". If the branch names in the first key field 441 and the second key field 442 match, “0” is added. Specifically, since the product name of the second key field 442 is different between the data 445 and the data 446, “2” is added, and the branch name of the first key field 441 is the same between the data 447 and the data 448. Since they are different, “1” is added.

【0043】このように適切なブレークフラグが付され
たソートデータ41は、主記憶装置やCPUなどのファ
イルやメモリに転送するために、データ転送装置40に
入力される。各ソートデータは、入力バッファ402を
介して出力バッファ404に入力され、転送先への転送
待機の状態になり、この間に、以下の動作により転送先
のアドレスの指定が行われる。
The sort data 41 with the appropriate break flag is input to the data transfer device 40 for transfer to a file or memory such as a main storage device or a CPU. Each sort data is input to the output buffer 404 via the input buffer 402, and is in a standby state for transfer to the transfer destination. During this time, the address of the transfer destination is specified by the following operation.

【0044】即ち、ブレークフラグ検出回路406は、
入力バッファ402から出力バッファ404にソートデ
ータが送信される際に、レコード構成情報レジスタ40
8の情報に基づきソートデータに付されたブレークフラ
グを検出する。ここで、検出したブレークフラグの情報
はレコード数演算回路410に送られる。レコード数演
算回路410では、ブレークフラグの種類に基づき転送
先に指定する空き領域用のレコード数が演算される。具
体的には、ブレークフラグが「1」の場合には、空き領
域用のレコード数は2レコード分となり、ブレークフラ
グが「2」の場合には、空き領域用のレコード数は1レ
コード分となる。また、ブレークフラグ「0」の場合に
は、空き領域のレコード数は0レコード分、即ち不要と
判断される。この数値は乗算回路412に送られ、乗算
回路412において、レコード構成情報レジスタ408
に設定されているレコード長が乗算されて空き領域とし
て必要な領域の大きさが算出される。
That is, the break flag detection circuit 406
When the sort data is transmitted from the input buffer 402 to the output buffer 404, the record configuration information register 40
The break flag attached to the sort data is detected based on the information of No. 8. Here, information on the detected break flag is sent to the record number calculation circuit 410. The record number calculation circuit 410 calculates the number of records for a free area designated as a transfer destination based on the type of the break flag. Specifically, when the break flag is "1", the number of records for the free area is two records, and when the break flag is "2", the number of records for the free area is one record. Become. If the break flag is "0", the number of records in the free area is determined to be 0, that is, unnecessary. This numerical value is sent to the multiplication circuit 412, where the record configuration information register 408
Is multiplied by the record length set in, and the size of the area required as a free area is calculated.

【0045】加算回路414は、ここで算出された空き
領域及びソートデータを記録するための総領域の大きさ
が算出される。転送アドレスレジスタ416では、ここ
で求められた総領域を転送するアドレスを、開始アドレ
スから終了アドレス方向に順次指定し、この転送アドレ
スを、アドレス出力バッファ424に送る。
The adding circuit 414 calculates the size of the free area calculated here and the total area for recording the sort data. In the transfer address register 416, addresses to transfer the total area obtained here are sequentially specified from the start address to the end address, and the transfer address is sent to the address output buffer 424.

【0046】一方、転送アドレスレジスタ416は、ア
ドレス出力バッファ424に転送アドレスを送信後、次
に指定されるアドレスを比較回路418に送る。この比
較回路418では、送られたアドレスを終了アドレスレ
ジスタ420に設定されている終了アドレスと比較し
て、終了アドレスを超えていた場合には、制御回路42
2により、上記ソートデータの転送を停止させ、一方、
超えていない場合には、転送を実行させる。その結果、
アドレス出力バッファ424からはアドレスの指定が行
われ、この指定されたアドレスに出力バッファ404か
ら送られたソートデータが記録され、結果として、図3
の通り転送後データ451が生成される。
On the other hand, after transmitting the transfer address to the address output buffer 424, the transfer address register 416 sends the next specified address to the comparison circuit 418. The comparison circuit 418 compares the sent address with the end address set in the end address register 420, and if the address exceeds the end address, the control circuit 42
2, the transfer of the sort data is stopped,
If not, transfer is executed. as a result,
An address is designated from the address output buffer 424, and the sort data sent from the output buffer 404 is recorded at the designated address. As a result, FIG.
As described above, the post-transfer data 451 is generated.

【0047】転送後データ451は、レコード452の
ように、フラグ列444に「2」のブレークフラグが付
されている場合には次のアドレスに1レコード分の空き
領域453が形成され、レコード454のように、フラ
グ列444に「1」のブレークフラグが付されている場
合には次のアドレスに2レコード分の空き領域453、
454が形成される。また、レコード457のように、
フラグ列444に「0」のブレークフラグが付されてい
る場合には空き領域は形成されないことになる。
In the post-transfer data 451, when a break flag of "2" is added to the flag column 444 as in the record 452, a free area 453 for one record is formed at the next address, and the record 454 is recorded. In the case where the break flag of "1" is added to the flag column 444 as shown in FIG.
454 are formed. Also, like record 457,
When a break flag of “0” is attached to the flag column 444, no free area is formed.

【0048】このように、ソートデータに付されたブレ
ークフラグを読み取り空き領域を指定することにより、
転送先で集計処理を行った際の集計値を書き込む領域が
確保される。従って、従来のように集計処理後に領域不
足を生じることを防止することができる。また、適切な
レコード数の空き領域を設定することにより、転送先の
領域の有効活用を図ることができる。
As described above, by reading the break flag attached to the sort data and designating an empty area,
An area for writing a tally value when tally processing is performed at the transfer destination is secured. Therefore, it is possible to prevent the shortage of the area after the aggregation processing as in the related art. In addition, by setting an empty area having an appropriate number of records, the area of the transfer destination can be effectively used.

【0049】なお、本実施の形態においては、キーフィ
ールドが2つとしているが、キーフィールドの数を任意
に増やすこともできる。この場合には、ブレークフラグ
の種類を増やし、適切なレコード数の空き領域を設定す
ることができる。
In the present embodiment, the number of key fields is two, but the number of key fields can be arbitrarily increased. In this case, the number of types of break flags can be increased, and an empty area having an appropriate number of records can be set.

【0050】[第二の実施の形態]図4に第二の実施の
形態のデータ転送装置を示す。以下、上記と同一の構成
には、同一の符号を付してその説明を省略する。
[Second Embodiment] FIG. 4 shows a data transfer device according to a second embodiment. Hereinafter, the same components as those described above are denoted by the same reference numerals, and description thereof will be omitted.

【0051】この第二の実施の形態のデータ転送装置5
0は、上記第一の実施の形態のデータ転送装置40と
は、ブレークフラグ検出回路406に代えてブレーク検
出回路502を備えた点で異なりその他の構成は同様で
ある。このブレーク検出回路502は、ブレークフラグ
検出回路とは異なり、ブレークフラグを介してブレー
ク、即ち、データ列の項目別の区切り位置を検出するも
のではなく、直接ブレークを検出する機能を有する。具
体的には、図2のようなソートデータの場合が、転送さ
れる際に一つ前に転送したデータのキーフィールド情報
を記憶しておき、この情報と転送するデータのキーフィ
ールド情報との違いを検出する。この場合にも、予め第
一キーフィールド441の情報が異なっている場合と、
第二キーフィールド442の情報が異なっている場合と
で、次のレコード数演算回路410に送信する信号を異
ならせることができる。そして、この異なった信号を受
信したレコード数演算回路410は、信号に応じたレコ
ード数を演算するように設定することができる。なお、
レコード数演算回路においてレコード数が演算された後
の動作は、上記第一の実施の形態のデータ転送装置40
と同様に行われ、結果として、転送先には、上記と同様
に図3に示す転送後データ451が形成される。
The data transfer device 5 according to the second embodiment
0 is different from the data transfer device 40 of the first embodiment in that a break detection circuit 502 is provided instead of the break flag detection circuit 406, and other configurations are the same. Unlike the break flag detection circuit, the break detection circuit 502 has a function of detecting a break via a break flag, that is, detecting a break directly, instead of detecting a break position for each item of a data string. Specifically, in the case of the sort data as shown in FIG. 2, when the data is transferred, the key field information of the data transferred immediately before is stored, and the key field information of this information and the key field information of the data to be transferred are stored. Detect differences. Also in this case, when the information of the first key field 441 is different in advance,
The signal to be transmitted to the next record number calculation circuit 410 can be different depending on whether the information in the second key field 442 is different. Then, the record number calculation circuit 410 receiving the different signal can be set to calculate the number of records according to the signal. In addition,
The operation after the number of records is calculated in the record number calculation circuit is the same as that of the data transfer device 40 of the first embodiment.
As a result, the post-transfer data 451 shown in FIG. 3 is formed at the transfer destination in the same manner as described above.

【0052】以上の通り、本実施の形態では、ブレーク
検出回路502が、データ列のブレークを検出すること
から、ソート装置がブレークフラグを付加する機能を有
さない場合にも、転送先に集計用の空き領域を形成させ
ることが可能となる。
As described above, in the present embodiment, since the break detection circuit 502 detects a break in a data string, even if the sorting device does not have a function of adding a break flag, the break detection circuit 502 counts the transfer destination. Free space can be formed.

【0053】[第三の実施の形態]図5に第二の実施の
形態のデータ転送装置60を示す。
[Third Embodiment] FIG. 5 shows a data transfer device 60 according to a second embodiment.

【0054】この第三の実施の形態のデータ転送装置6
0は、上記データ転送装置40、50とは、レコード数
演算回路を備えていない点で異なり、その他の構成は同
様である。また、図5には、データ列の項目別区切り位
置の検出を行うものとして、第一の実施の形態のブレー
クフラグ検出回路406を示しているが、これは、上記
第二の実施の形態におけるブレーク検出回路502を用
いることもできる。
The data transfer device 6 according to the third embodiment
0 is different from the data transfer devices 40 and 50 in that it does not include a record number calculation circuit, and the other configuration is the same. FIG. 5 shows the break flag detection circuit 406 of the first embodiment for detecting the break position of each item in the data string. The break detection circuit 502 can also be used.

【0055】上記の通り構成することにより、データ列
のブレークをブレーク検出回路502により直接または
ブレークフラグ検出回路406によりブレークフラグを
介して検出する。図2のようなソートデータ440の場
合には、フラグ列に付されたブレークフラグを読み取
る。具体的には、このブレークフラグが「1」、「2」
の場合には、ブレークが検出される。また、「0」の場
合には、ブレーク位置でないことが確認される。
With the above configuration, the break in the data string is detected directly by the break detection circuit 502 or by the break flag detection circuit 406 via the break flag. In the case of the sort data 440 as shown in FIG. 2, the break flag attached to the flag column is read. Specifically, this break flag is "1", "2"
In this case, a break is detected. If it is "0", it is confirmed that the position is not the break position.

【0056】ここで確認されたブレークの有無は、例え
ば、検出信号「1」、非検出信「0」として乗算回路4
12に送られる。乗算回路412では、受信した信号に
レコード構成情報レジスタに設定されているレコード長
を乗算し、ブレークを検出した場合には一律の空き領域
の大きさを求める。そして、加算回路414では、ここ
で求められた空き領域の大きさに、転送するソートデー
タを記録する領域の大きさを加算し、この加算値を転送
アドレスレジスタ416に転送する。転送アドレスレジ
スタ416では、上記と同様に空き領域及び転送するソ
ートデータのアドレスの割り当が行われて、アドレス出
力バッファ424を介して転送先に指定される。
The presence / absence of a break confirmed here is determined, for example, as a detection signal "1" and a non-detection signal "0".
12 is sent. The multiplication circuit 412 multiplies the received signal by the record length set in the record configuration information register, and when a break is detected, obtains a uniform empty area size. Then, the adding circuit 414 adds the size of the area for recording the sort data to be transferred to the size of the free area obtained here, and transfers the added value to the transfer address register 416. In the transfer address register 416, a free area and the address of the sort data to be transferred are assigned in the same manner as described above, and the destination is designated via the address output buffer 424.

【0057】この場合、例えば、図2に示すソートデー
タ440は、転送先において図6に示す転送後データ6
00として形成される。本実施の形態では、集計用のレ
コード領域として最大で2レコード分であるため、この
転送後データ600では、ブレーク位置の次の領域に一
律に2レコード分の空き領域が設定される。具体的に
は、データ領域604のようにフラグ列602に「2」
が付されている場合や、データ領域606のようにフラ
グ列602に「1」が付されている場合には、次の領域
に2レコード分の空き領域608、610が形成され
る。
In this case, for example, the sort data 440 shown in FIG.
00 is formed. In this embodiment, since the maximum number of record areas for totaling is two records, in the post-transfer data 600, an empty area for two records is uniformly set in the area next to the break position. Specifically, “2” is added to the flag column 602 as in the data area 604.
, Or when “1” is added to the flag column 602 as in the data area 606, free areas 608 and 610 for two records are formed in the next area.

【0058】なお、この空き領域に必要なレコード数
は、ソートデータのキーフィールドの数などに応じて、
予めレコード構成情報レジスタ408にその情報を設定
しておくことにより、所望の数を形成させることができ
る。
The number of records necessary for this free space is determined according to the number of key fields of the sort data and the like.
By setting the information in the record configuration information register 408 in advance, a desired number can be formed.

【0059】以上の通り、本実施の形態によれば、転送
先において多少余計な空き領域が形成されることになる
が、データ転送装置として構成を簡略化することができ
るとともに、処理速度を向上させることが可能となる。
As described above, according to the present embodiment, some extra free space is formed at the transfer destination, but the structure as a data transfer device can be simplified and the processing speed can be improved. It is possible to do.

【0060】[第四の実施の形態]図7に第四の実施の
形態のデータ転送装置70を示す。
[Fourth Embodiment] FIG. 7 shows a data transfer apparatus 70 according to a fourth embodiment.

【0061】この第四の実施の形態のデータ転送装置7
0は、上述したデータ転送装置とは、空き領域の指定方
法が異なる。上述したデータ転送装置では、実際に転送
先に空き領域を指定し確保していたが、本実施の形態の
場合には、ブレークを検出した際に、必要な空き領域を
算出し、空き領域分を仮想的に指定するものである。
The data transfer device 7 of the fourth embodiment
0 is different from the above-described data transfer apparatus in the method of specifying a free area. In the data transfer device described above, an empty area is actually specified and secured as a transfer destination. In the case of the present embodiment, when a break is detected, a necessary empty area is calculated and the empty area is calculated. Is virtually specified.

【0062】具体的には、以下の構成を有する。Specifically, it has the following configuration.

【0063】ブレークフラグ検出回路406には、上記
と同様に、転送レコード数演算回路410が接続されて
いる。この転送レコード数演算回路410では、ブレー
クフラグ検出回路406において検出されたブレークフ
ラグに応じて空き領域用のレコード数を求める。そし
て、この数に転送するソートデータを記録するレコード
数を加算した総レコード数を算出する。減算回路702
は、後述する領域残存レコード数704におけるカウン
タ値を受け取り、上記転送先レコード数演算回路410
において算出されたレコード数を減算し、減算値を領域
残存レコード数カウンタ704に送信する。
The transfer record number calculation circuit 410 is connected to the break flag detection circuit 406 in the same manner as described above. The transfer record number calculation circuit 410 calculates the number of records for a free area according to the break flag detected by the break flag detection circuit 406. Then, the total number of records is calculated by adding the number of records for recording the sort data to be transferred to this number. Subtraction circuit 702
Receives the counter value of the area remaining record number 704 described later, and
Is subtracted, and the subtracted value is transmitted to the area remaining record number counter 704.

【0064】この領域残存レコード数704は、転送先
に確保されている全領域のサイズをレコード数として換
算され設定されている。この値は、上述した通り、ソー
トデータ転送毎に前記減算回路702により更新され
る。最終的に、残存レコード数が0になると、領域残存
レコード数カウンタ704は制御回路422に信号を送
り、データ転送装置70を停止させる。
This area remaining record number 704 is set by converting the size of all areas secured at the transfer destination into the number of records. This value is updated by the subtraction circuit 702 every time the sort data is transferred, as described above. Finally, when the number of remaining records becomes 0, the area remaining record counter 704 sends a signal to the control circuit 422 to stop the data transfer device 70.

【0065】上記の通り構成されたデータ転送装置70
において、図2に示すソートデータ41を転送する場合
を以下に示す。
The data transfer device 70 configured as described above
In the following, a case where the sort data 41 shown in FIG. 2 is transferred will be described below.

【0066】各ソートデータは、上記と同様に入力バッ
ファ402を介して順次出力バッファ404に入力さ
れ、この間に、以下の動作により転送先のアドレスの指
定が行われる。
Each sort data is sequentially input to the output buffer 404 via the input buffer 402 in the same manner as described above, and during this time, the destination address is specified by the following operation.

【0067】ブレークフラグ検出回路406は、レコー
ド構成情報レジスタ408のブレークフラグの位置情報
に基づきソートデータに付されたブレークフラグを検出
し、検出したブレークフラグの情報をレコード数演算回
路410に送る。レコード数演算回路410は、ブレー
クフラグの種類に基づき転送先に指定する空き領域用の
レコード数を演算し、この値に転送するソートデータを
記録するレコード数を加算した値を求める。具体的に
は、ブレークフラグが「1」の場合には、空き領域用の
レコード数は2レコード分となり、これにソートデータ
を記録するための1レコード分を加算する。この加算値
は減算回路702に転送され、減算回路702におい
て、領域残存レコード数カウンタ704におけるカウン
タ値から減算される。この減算値は、領域残存レコード
数カウンタ704に戻され、転送先に現在残存している
領域のレコード数が更新される。そして、この更新され
た値に基づき制御回路422が、データ転送を制御す
る。即ち、更新された値が0以下でなければ、制御回路
422はソートデータの転送を実行させ、一方、0以下
となった場合には、制御回路422はソートデータの転
送を停止させる。
The break flag detection circuit 406 detects a break flag attached to the sort data based on the position information of the break flag in the record configuration information register 408, and sends the detected break flag information to the record number calculation circuit 410. The record number calculation circuit 410 calculates the number of records for a free area designated as a transfer destination based on the type of the break flag, and obtains a value obtained by adding the number of records for recording the sort data to be transferred to this value. Specifically, when the break flag is "1", the number of records for the free area is two records, and one record for recording the sort data is added to this. This addition value is transferred to the subtraction circuit 702, and the subtraction circuit 702 subtracts the added value from the counter value of the area remaining record number counter 704. This subtraction value is returned to the area remaining record number counter 704, and the number of records of the area currently remaining at the transfer destination is updated. Then, the control circuit 422 controls the data transfer based on the updated value. That is, if the updated value is not equal to or less than 0, the control circuit 422 executes the transfer of the sort data, and if the updated value is equal to or less than 0, the control circuit 422 stops the transfer of the sort data.

【0068】制御回路422によりソートデータの転送
の実行が指示されると、出力バッファ404のソートデ
ータが、転送アドレスレジスタ416により指定された
アドレスに転送される。従って、図8に示す転送後デー
タ710は、上記とは異なり、各項目別の区切り位置に
は、実際に空き領域が確保されず、集計後に増加する領
域のレコード分が仮想的に確保されることになる。
When the transfer of sort data is instructed by the control circuit 422, the sort data in the output buffer 404 is transferred to the address specified by the transfer address register 416. Accordingly, in the post-transfer data 710 illustrated in FIG. 8, unlike the above, an empty area is not actually secured at the break position of each item, and a record for an area that increases after aggregation is virtually secured. Will be.

【0069】[第五の実施の形態]図9に第五の実施の
形態のデータ転送装置80を示す。
[Fifth Embodiment] FIG. 9 shows a data transfer device 80 according to a fifth embodiment.

【0070】本実施の形態のデータ転送装置80は、デ
ータ変換回路802を備え、このデータ変換回路802
により、転送先に集計用の空き領域を形成させるととも
に、この空き領域に書き込まれるキーフィールド情報を
転送する。
The data transfer device 80 of the present embodiment includes a data conversion circuit 802.
As a result, the transfer destination forms a free area for aggregation, and the key field information to be written into this free area is transferred.

【0071】具体的には、上記と同様に、ブレークフラ
グ検出回路406によりソートデータのブレークフラグ
が検出され、この情報は、レコード数演算回路410に
送信される。レコード数演算回路410は、受信したブ
レークフラグの種類に応じて、空き領域としての適切な
レコード数を演算する。ここで求められたレコード数
は、データ変換回路802に送られ、このレコード数分
だけ転送を繰り返す。この際、データ変換回路802で
は、入力バッファから受け取ったキーフィールド情報を
順に1個ずつALL値でマスクする。一方、転送アドレ
スレジスタ416は、データ変換回路802を介して転
送を繰り返す毎に1レコード分ずつ増加し、実際に転送
されている領域のアドレスをカウントする。
Specifically, similarly to the above, the break flag of the sort data is detected by the break flag detection circuit 406, and this information is transmitted to the record number calculation circuit 410. The record number calculation circuit 410 calculates an appropriate number of records as an empty area according to the type of the received break flag. The number of records obtained here is sent to the data conversion circuit 802, and the transfer is repeated by the number of records. At this time, the data conversion circuit 802 masks the key field information received from the input buffer one by one with the ALL value. On the other hand, the transfer address register 416 increases by one record each time the transfer is repeated via the data conversion circuit 802, and counts the address of the area actually transferred.

【0072】なお、本実施の形態においても、比較回路
418において、終了アドレスレジスタ420に設定さ
れている終了アドレスと、転送アドレスレジスタ416
の転送アドレスとを比較して、その結果に従い、制御回
路422によりデータ転送の制御が行われる。
In this embodiment, also in the comparison circuit 418, the end address set in the end address register 420 and the transfer address register 416
And the control circuit 422 controls the data transfer according to the result.

【0073】上記データ転送装置80により、図2に示
すソートデータを転送先に転送した後の転送後データを
図10に示す。図10に示すように、本データ転送装置
80の場合には、単に、集計用空き領域が形成されるだ
けでなく、集計用の領域には、キーフィールドに項目が
記載されることになる。即ち、図10において、転送レ
コード816のように各製品毎のデータ列の終端の次の
アドレスには、集計用領域818が設定され、この領域
には、第一及び第二キーフィールド812、814の情
報が書き込まれることになる。また、転送レコード82
0のように各支店毎のデータ列の終端の次のアドレスに
は、2レコード分の集計用領域822、824が設定さ
れる。このうち集計用領域822には、上記と同様に、
第一及び第二キーフィールドの情報が書き込まれ、集計
用領域824には、第一キーフィールドの情報が書き込
まれるとともに、ALL値でマスクされることになる。
FIG. 10 shows post-transfer data after the sort data shown in FIG. 2 has been transferred to the transfer destination by the data transfer device 80. As shown in FIG. 10, in the case of the present data transfer device 80, not only a total free area is formed, but also an item is described in a key field in the total area. That is, in FIG. 10, a totaling area 818 is set at the address next to the end of the data string for each product as in the transfer record 816, and the first and second key fields 812 and 814 are set in this area. Is written. Also, the transfer record 82
Totaling areas 822 and 824 for two records are set at the address next to the end of the data string for each branch, such as 0. Of these, the aggregation area 822 contains
The information of the first and second key fields is written, and the information of the first key field is written in the totaling area 824, and is masked with the ALL value.

【0074】従って、本実施の形態によれば、転送先で
は、単に集計フィードの数値を計算するだけでよいこと
になる。そのため、転送先の機能を簡略化することがで
きる。
Therefore, according to the present embodiment, the transfer destination only needs to calculate the numerical value of the total feed. Therefore, the function of the transfer destination can be simplified.

【0075】[第六の実施の形態]図11に第六の実施
の形態のデータ転送装置90を示す。
[Sixth Embodiment] FIG. 11 shows a data transfer device 90 according to a sixth embodiment.

【0076】本実施の形態のデータ転送装置90には、
集計演算回路902を備え、ソートデータの転送ととも
に集計処理を行い、集計結果を書き込んだ集計データを
転送する機能を有する。具体的には、本データ転送装置
90は、上述したデータ転送装置80におけるデータ変
換回路802の代わりに、集計演算回路902が備えら
れている。その他の構成は、第五の実施の形態のデータ
転送装置80と同様の構成を有する。
The data transfer device 90 of the present embodiment includes
An aggregation operation circuit 902 is provided, which has a function of performing an aggregation process together with the transfer of the sort data and transferring the aggregation data in which the aggregation result is written. Specifically, the data transfer device 90 is provided with a tally operation circuit 902 instead of the data conversion circuit 802 in the data transfer device 80 described above. Other configurations are the same as those of the data transfer device 80 of the fifth embodiment.

【0077】集計演算回路902は、上記データ変換回
路802の有する機能に加えて、集計処理機能をも有
し、単に、キーフィールド情報だけでなく、集計結果を
も書き込んだ集計データを生成し出力バッファに送信す
る。
The counting operation circuit 902 has a counting processing function in addition to the function of the data conversion circuit 802, and generates and outputs the counting data in which not only the key field information but also the counting result is written. Send to buffer.

【0078】その結果、本データ転送装置90によりソ
ートデータを転送先に転送することにより、転送先で
は、図13(c)に示す集計後データが形成されること
になる。
As a result, by transferring the sort data to the transfer destination by the data transfer apparatus 90, the post-aggregation data shown in FIG. 13C is formed at the transfer destination.

【0079】従って、本データ転送装置90は、転送先
に集計処理機能を備えていない場合に有効となる。
Therefore, the data transfer device 90 is effective when the transfer destination does not have a totaling function.

【0080】上述した実施の形態は、それぞれ単独で実
施することもできるが、上記実施の形態の構成を任意に
組み合わせて実施することもできる。
Each of the above-described embodiments can be implemented independently, but can also be implemented by arbitrarily combining the configurations of the above-described embodiments.

【0081】さらに、本実施の形態では、ハードウエア
による制御例を示したが、上述したデータ転送方法をソ
フトウエア上で実現することも可能である。また、デー
タ転送装置に適応できるソート装置も、ハードウエアま
たはソフトウエアのいずれを使用してもよい。
Further, in the present embodiment, an example of control by hardware has been described, but the above-described data transfer method can be realized by software. Also, a sorting device applicable to the data transfer device may use either hardware or software.

【0082】[0082]

【発明の効果】以上説明したように、本発明のデータ転
送方法及び装置は、ソートデータ転送時に、転送先で発
生する集計結果等を書き込む領域を予め計算し、そのた
めの領域を確保する。その結果、従来のように、転送先
に転送されたデータに基づき集計を行った後に集計結果
を書き込む領域が不足するという問題を回避することが
できる。
As described above, the data transfer method and apparatus of the present invention preliminarily calculates an area for writing a total result or the like generated at a transfer destination at the time of sort data transfer, and secures an area for that. As a result, it is possible to avoid the problem that the area for writing the tally result after the tally is performed based on the data transferred to the transfer destination becomes insufficient as in the related art.

【0083】また、本発明のデータ転送装置は、集計結
果等を書き込む領域を正確に計算することができため、
確保する領域を必要最小限にすることができる。その結
果、転送先の領域を無駄なスペースを残すことなく、有
効活用することも可能である。
Further, since the data transfer device of the present invention can accurately calculate the area in which the result of aggregation and the like are to be written,
The area to be secured can be minimized. As a result, the transfer destination area can be effectively utilized without leaving useless space.

【0084】さらに、本発明のデータ転送装置に集計処
理手段を保持させることにより、手データ転送と同時に
集計結果をも転送することができる。
Further, by having the data transfer device of the present invention hold the tally processing means, the tally result can be transferred simultaneously with the hand data transfer.

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

【図1】 第一の実施の形態のデータ転送装置の全体構
成を示す図である。
FIG. 1 is a diagram illustrating an overall configuration of a data transfer device according to a first embodiment.

【図2】 転送前のソートデータを示す図である。FIG. 2 is a diagram showing sort data before transfer.

【図3】 第一の実施の形態のデータ転送装置により転
送先にデータを転送した際の転送後データを示す図であ
る。
FIG. 3 is a diagram illustrating post-transfer data when data is transferred to a transfer destination by the data transfer device according to the first embodiment;

【図4】 第二の実施の形態のデータ転送装置の全体構
成を示す図である。
FIG. 4 is a diagram illustrating an overall configuration of a data transfer device according to a second embodiment.

【図5】 第三の実施の形態のデータ転送装置の全体構
成を示す図である。
FIG. 5 is a diagram illustrating an overall configuration of a data transfer device according to a third embodiment.

【図6】 第三の実施の形態のデータ転送装置により転
送先にデータを転送した際の転送後データを示す図であ
る。
FIG. 6 is a diagram illustrating post-transfer data when data is transferred to a transfer destination by the data transfer device according to the third embodiment.

【図7】 第四の実施の形態のデータ転送装置の全体構
成を示す図である。
FIG. 7 is a diagram illustrating an overall configuration of a data transfer device according to a fourth embodiment.

【図8】 第四の実施の形態のデータ転送装置により転
送先にデータを転送した際の転送後データを示す図であ
る。
FIG. 8 is a diagram illustrating data after transfer when data is transferred to a transfer destination by the data transfer device according to the fourth embodiment.

【図9】 第五の実施の形態のデータ転送装置の全体構
成を示す図である。
FIG. 9 is a diagram illustrating an overall configuration of a data transfer device according to a fifth embodiment.

【図10】 第五の実施の形態のデータ転送装置により
転送先にデータを転送した際の転送後データを示す図で
ある。
FIG. 10 is a diagram illustrating post-transfer data when data is transferred to a transfer destination by the data transfer device according to the fifth embodiment.

【図11】 第六の実施の形態のデータ転送装置の全体
構成を示す図である。
FIG. 11 is a diagram illustrating an overall configuration of a data transfer device according to a sixth embodiment.

【図12】 従来のデータベース処理システムの全体構
成を示す図である。
FIG. 12 is a diagram showing an overall configuration of a conventional database processing system.

【図13】 従来のデータベース処理システムにより入
力されたデータを転送先に転送し、集計処理を行った場
合の行程を示す図である。
FIG. 13 is a diagram showing a process in a case where data input by a conventional database processing system is transferred to a transfer destination and tabulation processing is performed.

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

40、50、60、70、80、90 データ転送装
置、401 転送手段、406 ブレークフラグ検出回
路、440 ソートデータ、502 ブレーク検出回
路、405 空き領域指定手段、418 比較回路、7
04 転送領域残カウンタ、422 制御回路、902
集計演算回路。
40, 50, 60, 70, 80, 90 Data transfer device, 401 transfer means, 406 break flag detection circuit, 440 sort data, 502 break detection circuit, 405 free area designation means, 418 comparison circuit, 7
04 transfer area remaining counter, 422 control circuit, 902
Aggregation operation circuit.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平1−232425(JP,A) 特開 平4−264637(JP,A) 特開 平4−337867(JP,A) 特開 平6−103144(JP,A) 特開 平7−281939(JP,A) 特開 平8−286966(JP,A) 特開 平8−314819(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 12/00 G06F 13/00 ────────────────────────────────────────────────── ─── Continuation of front page (56) References JP-A-1-232425 (JP, A) JP-A-4-264637 (JP, A) JP-A-4-337867 (JP, A) JP-A-6-320 103144 (JP, A) JP-A-7-281939 (JP, A) JP-A 8-286966 (JP, A) JP-A 8-314819 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 12/00 G06F 13/00

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 データベース処理システムに用いられる
データ転送方法であって、ソート装置のソートデータを
メモリまたはファイルへ転送するデータ転送方法におい
て、 前記ソートデータを順次メモリまたはファイルへ転送す
る転送工程と、 転送されるデータ列に対して、項目別区切り位置を検出
する区切り位置検出工程と、 前記項目別区切り位置検出時に所定の空き領域をメモリ
またはファイルに指定する空き領域指定工程と、を含む
ことを特徴とするデータ転送方法。
1. A data transfer method for use in a database processing system, wherein a data transfer method for transferring sort data of a sort device to a memory or a file, wherein a transfer step of sequentially transferring the sort data to a memory or a file; The method includes a step of detecting a break position by item for a transferred data string, and a step of specifying a free space in a memory or a file at the time of detecting the break position by item. Characteristic data transfer method.
【請求項2】 データベース処理システムに用いられる
データ転送装置であって、ソート装置のソートデータを
メモリまたはファイルへ転送するデータ転送装置におい
て、 前記ソートデータを順次メモリまたはファイルへ転送す
る転送手段と、 転送されるデータ列に対して、項目別区切り位置を検出
する区切り位置検出手段と、 前記項目別区切り位置検出時に所定の空き領域をメモリ
またはファイルに指定する空き領域指定手段と、を含む
ことを特徴とするデータ転送装置。
2. A data transfer device for use in a database processing system, wherein the data transfer device transfers the sort data of the sort device to a memory or a file; a transfer means for sequentially transferring the sort data to a memory or a file; For a transferred data string, a break position detecting means for detecting a break position for each item, and a free area designating means for specifying a predetermined free area in a memory or a file when the break position for each item is detected are included. Characteristic data transfer device.
【請求項3】 前記区切り位置検出手段が、ソート装置
によりソートデータに付されたフラグを認識して、前記
データ列の項目別区切り位置を検出することを特徴とす
る請求項2に記載のデータ転送装置。
3. The data according to claim 2, wherein the delimiter position detecting means recognizes a flag attached to the sort data by a sorter and detects a delimiter position for each item of the data string. Transfer device.
【請求項4】 空き領域指定手段が、区切り位置検出手
段により検出されたフラグの種類に基づき、所定のレコ
ード数の空き領域をメモリまたはファイルに指定するこ
とを特徴とする請求項3に記載のデータ転送装置。
4. The apparatus according to claim 3, wherein the free area specifying means specifies a predetermined number of free areas in the memory or the file based on the type of the flag detected by the delimiter position detecting means. Data transfer device.
【請求項5】 メモリまたはファイル内にソートデータ
の転送または空き領域の指定を行うための残存領域の有
無をモニタするモニタ手段と、 前記モニタ手段において残存領域が無いかまたは不足し
ていることが検知された場合に、該ソートデータの転送
を制限する転送制御手段と、をさらに含むことを特徴と
する請求項2〜4のいずれかに記載のデータ転送装置。
5. A monitoring means for monitoring the presence or absence of a remaining area for transferring sort data or designating a free area in a memory or a file, and wherein said monitoring means has no or insufficient remaining area. 5. The data transfer device according to claim 2, further comprising: a transfer control unit that restricts transfer of the sorted data when the data is detected.
【請求項6】 前記転送手段は、データ列を各項目毎に
メモリまたはファイル内の開始領域から連続するように
転送し、 前記空き領域指定手段は、メモリまたはファイルに転送
された各項目毎のデータ列の終端に所定の空き領域を指
定し、 また、前記モニタ手段は、メモリまたはファイルの終了
領域位置を記憶し、この終了領域位置と各ソートデータ
の転送領域位置または指定される空き領域位置とを比較
することによりメモリまたはファイル内の残存領域の有
無をモニタすることを特徴とする請求項5に記載のデー
タ転送装置。
6. The transfer means transfers the data string so as to be continuous from a start area in a memory or a file for each item, and the empty area designation means transfers a data string for each item transferred to a memory or a file. A predetermined free area is specified at the end of the data string. The monitor means stores the end area position of the memory or the file, and stores the end area position and the transfer area position of each sort data or the specified free area position. 6. The data transfer device according to claim 5, wherein the presence or absence of a remaining area in the memory or the file is monitored by comparing the data with the data.
【請求項7】 前記モニタ手段が、転送されたソートデ
ータの記録領域のレコード数及び指定された空き領域の
レコード数と、メモリまたはファイルの全領域数とに基
づき残存領域をモニタすることを特徴とする請求項5に
記載のデータ転送装置。
7. The monitor means monitors the remaining area based on the number of records in the recording area of the transferred sort data, the number of records in the designated free area, and the total number of areas in the memory or the file. The data transfer device according to claim 5, wherein
【請求項8】 転送されるデータ列の項目毎の集計値を
算出する集計手段と、 前記空き領域指定手段によりメモリまたはファイルに指
定される空き領域に集計値を転送する集計値転送手段
と、をさらに含むことを特徴とする請求項2〜7のいず
れかに記載のデータ転送装置。
8. A totaling means for calculating a total value for each item of a data string to be transferred, a total value transferring means for transferring the total value to a free area designated in a memory or a file by said free area specifying means, The data transfer device according to claim 2, further comprising:
JP9079692A 1997-03-31 1997-03-31 Data transfer method and device Expired - Fee Related JP3004940B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9079692A JP3004940B2 (en) 1997-03-31 1997-03-31 Data transfer method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9079692A JP3004940B2 (en) 1997-03-31 1997-03-31 Data transfer method and device

Publications (2)

Publication Number Publication Date
JPH10275103A JPH10275103A (en) 1998-10-13
JP3004940B2 true JP3004940B2 (en) 2000-01-31

Family

ID=13697268

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9079692A Expired - Fee Related JP3004940B2 (en) 1997-03-31 1997-03-31 Data transfer method and device

Country Status (1)

Country Link
JP (1) JP3004940B2 (en)

Also Published As

Publication number Publication date
JPH10275103A (en) 1998-10-13

Similar Documents

Publication Publication Date Title
US5127088A (en) Disk control apparatus
US7058839B2 (en) Cached-counter arrangement in which off-chip counters are updated from on-chip counters
CA1279407C (en) Buffer storage control system
JP3004940B2 (en) Data transfer method and device
JP3076044B2 (en) Error information storage method for pipeline
US5590279A (en) Memory data copying apparatus
JP3265226B2 (en) Bank access control method
JPH0581337A (en) Data processing device
JPS634223B2 (en)
JP2666732B2 (en) Load control method for computer system
US20070171043A1 (en) Method of controlling monitoring control apparatus, computer program product, monitoring control apparatus, and electronic apparatus
JP3405794B2 (en) Multiprocessor system
JP2697021B2 (en) Alarm collection method
JP3068451B2 (en) Electronic computer
JPS6020779B2 (en) Composite computer system
JPS5837755A (en) Free space detection device
JP3098414B2 (en) Load module storage method
JP2609768B2 (en) Error detection method for control information read data
JPH0764818A (en) Method and circuit for tracing data
JPS61269545A (en) Computer system
JPH0782427B2 (en) Sort processing method
JPH01188959A (en) Information history memory
JPH04205044A (en) Buffer circuit
JPS62144263A (en) data input/output device
JPH05346892A (en) Information processor

Legal Events

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