JP3316763B2 - Storage controller - Google Patents

Storage controller

Info

Publication number
JP3316763B2
JP3316763B2 JP17542188A JP17542188A JP3316763B2 JP 3316763 B2 JP3316763 B2 JP 3316763B2 JP 17542188 A JP17542188 A JP 17542188A JP 17542188 A JP17542188 A JP 17542188A JP 3316763 B2 JP3316763 B2 JP 3316763B2
Authority
JP
Japan
Prior art keywords
record
track
update
data
file
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
JP17542188A
Other languages
Japanese (ja)
Other versions
JPH0224876A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP17542188A priority Critical patent/JP3316763B2/en
Publication of JPH0224876A publication Critical patent/JPH0224876A/en
Application granted granted Critical
Publication of JP3316763B2 publication Critical patent/JP3316763B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は記憶装置に係り、更に詳しくはディスク装置
を制御する記憶制御装置に関する。
Description: BACKGROUND OF THE INVENTION The present invention relates to a storage device, and more particularly, to a storage control device for controlling a disk device.

〔従来の技術〕[Conventional technology]

ディスク装置はコンピュータシステムの記憶装置とし
て使用されている。そして、ディスク装置は一般的には
シリンダ、トラック、セクタの領域に分けて管理されて
いる。例えばnシリンダのmトラックの1セクタの指定
によって該当領域に記憶されているデータをアクセスで
きる様になっている。
The disk device is used as a storage device of a computer system. The disk device is generally managed by being divided into cylinder, track, and sector areas. For example, data stored in a corresponding area can be accessed by designating one sector of m tracks of n cylinders.

前述したシリンダ、トラック、セクタはディスク装置
の物理的な領域を示すものであるが、ユーザはファイル
別にデータを管理している。ファイルとはユーザ等が必
要とする多数のレコードデータから成るもので、例えば
売上集計ファイル、担当者別売上ファイル、品目ファイ
ル等がある。
The cylinders, tracks, and sectors described above indicate physical areas of the disk device, and the user manages data for each file. The file includes a large number of record data required by the user and the like, and includes, for example, a sales totaling file, a sales file for each person in charge, an item file, and the like.

OS等のシステムは、ファイルを書き込む或いは読み出
す時には、そのファイルがディスク装置内のどのシリン
ダのどのトラックのどのセクタに書き込まれているかを
管理している。セクタは一般的には128バイト、256バイ
ト、1024バイトやそれ以上の1個のデータブロックであ
り1トラック内に複数存在する。しかしながら、前述の
ファイルの全てのデータが1個のセクタに入ることはな
く、複数のセクタにまたがって記憶される。
When writing or reading a file, a system such as an OS manages which sector of which track of which cylinder in the disk device writes the file. The sector is generally one data block of 128 bytes, 256 bytes, 1024 bytes or more, and a plurality of sectors exist in one track. However, not all the data of the aforementioned file is stored in one sector, but is stored in a plurality of sectors.

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

前述したOS等のシステムが管理するファイルは複数の
セクタに記憶されるが、ディスク装置内のトラックの連
続するセクタに連続して書き込まれるとは限らず、複数
のトラックに亘って不連続に記憶される。特に、今まで
記憶されていたファイルを削除した様な場合には、その
ファイルが記憶されていた領域があき領域となり、次に
新たなファイルを書き込む場合には、そのあき領域にま
ず書き込み、その領域で足りない時には残りのデータを
他のあき領域のセクタに書く等して、記憶している。し
たがって、複数のファイルの書き込み、削除を繰り返し
た場合、書き込まれた各ファイルのセクタは連続して書
き込まれてはおらず、1セクタ単位で例えばヘッドを移
動させてアクセスしなくてはならない。このため、アク
セススピードが低下すると共に、OS等によるディスクの
管理が複雑になるという問題を有していた。
The files managed by the system such as the OS described above are stored in a plurality of sectors. However, the files are not always written continuously to the continuous sectors of the track in the disk device, and are stored discontinuously over a plurality of tracks. Is done. In particular, when a file stored up to now is deleted, the area where the file is stored becomes an open area, and when a new file is written next, the file is first written to the open area, and then When the area is not enough, the remaining data is stored by writing it to a sector in another open area. Therefore, when writing and deletion of a plurality of files are repeated, the sectors of each written file are not written continuously, and must be accessed by moving the head, for example, in units of one sector. For this reason, there has been a problem that the access speed is reduced and the disk management by the OS or the like becomes complicated.

また、ディスク装置に格納するファイルは複数のレコ
ードから成るものであるが、各レコードをレコードキー
順に配列して格納すればファイル内の各レコードの管理
が単純化され、レコードキーワードの指定によって求め
るレコードをアクセスできる。この際に問題になるの
は、レコードを削除したり、新たなレコードを追加する
場合であり、この場合には、その都度、レコード群を再
度レコードキーワード順に配列し直さなければならず、
このためのディスク処理に膨大な時間がかかる。特に、
各レコードが可変長データから成る場合には、各レコー
ドをレコードキーワード順に隙間なく格納することがで
きので記憶効率は良いが、レコードを削除したり、追加
した場合のみならず、ディスク装置内のレコードを訂正
したり、集計した結果により、レコード長が変った場合
には、全てのレコード群を再度レコードキーワード順に
配列し直さなければならない欠点が生じる。
Also, the file stored in the disk device is composed of a plurality of records. If the records are arranged in the order of the record key and stored, the management of each record in the file is simplified, and the record obtained by specifying the record keyword is determined. Can be accessed. The problem at this time is when a record is deleted or a new record is added. In this case, the record group must be rearranged in the order of the record keywords each time.
It takes an enormous amount of time for disk processing for this purpose. In particular,
When each record is composed of variable-length data, each record can be stored in the order of the record keyword without any gaps, so the storage efficiency is high, but not only when records are deleted or added, but also when If the record length changes as a result of correcting or totalizing, all the record groups must be rearranged in the order of the record keywords.

本発明の課題は目的のデータの読み出しをディスク装
置から高速に行え、更に記憶効率を低下させることなく
記憶し得るようにすることである。
An object of the present invention is to make it possible to read out target data from a disk device at high speed, and to store data without lowering storage efficiency.

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

本発明の記憶制御装置は、更新前の複数のレコード
と、該複数のレコードを更新するための更新種別情報を
含む入力情報を更新レコードとして更新前の複数のレコ
ードとは異なる記憶領域にトラック単位で記憶するディ
スク装置と、前記ディスク装置に記憶された前記更新前
のレコードと前記更新レコードのそれぞれの記憶領域を
示す位置情報を記憶する位置記憶手段と、前記位置記憶
手段の位置情報に基づいて、前記ディスク装置から前記
更新前のレコードと前記更新レコードそれぞれをトラッ
ク単位で読み出し、読み出された各々トラック内の複数
の更新前レコードと更新レコードのレコードキーを比較
し、更新レコードと同一レコードキーの更新前レコード
に対する更新処理を該更新レコードの更新種別情報に応
じて行うレコード更新手段と、前記レコード更新手段で
更新された更新後レコードと前記レコード更新手段で更
新されなかった更新前レコードとを前記ディスク装置の
前記更新レコードが記憶されている記憶領域につづく記
憶領域にトラック単位で書き込む更新手段と、前記更新
手段により更新後レコードおよび未更新レコードがトラ
ック単位で前記記憶領域に書き込まれると、前記レコー
ド位置記憶手段の個々の記憶位置情報を新たな記憶領域
を示す位置情報に書き換える位置情報管理手段と、を有
することを特徴とする。
The storage control device according to the present invention is configured such that a plurality of records before update and input information including update type information for updating the plurality of records are used as an update record in a storage area different from the plurality of records before update as a track unit. Based on the position information of the pre-updated record stored in the disk device and the position information indicating the storage area of each of the updated records, based on the position information of the position storage means Reading the pre-update record and the update record from the disk device in track units, comparing the read record keys of a plurality of pre-update records and the update record in each read track, and finding the same record key as the update record. Update that updates the record before the update according to the update type information of the update record And storing the updated record updated by the record updating means and the pre-update record not updated by the record updating means in the storage area of the disk device following the storage area where the updated record is stored in track units. When the updated record and the non-updated record are written to the storage area in track units by the updating means, the individual storage position information of the record position storage means is replaced with position information indicating a new storage area. Rewriting position information management means.

〔機能ブロック図〕[Function block diagram]

第1図(a)は本発明の機能ブロック図である。 FIG. 1A is a functional block diagram of the present invention.

ディスク装置1はレコードキーの順に更新前レコード
データを記憶する記憶装置である。
The disk device 1 is a storage device that stores pre-update record data in the order of record keys.

データ位置記憶手段2は前記更新前レコードデータの
前記ディスク装置1における記憶位置情報を記憶する。
The data position storage means 2 stores storage position information of the pre-update record data in the disk device 1.

更新レコード記憶手段3は前記更新前レコードデータ
の内容を更新する更新種別情報を含む更新レコードを記
憶する。
The update record storage means 3 stores an update record including update type information for updating the contents of the record data before update.

更新手段4はディスク装置1と更新レコード記憶手段
からレコードデータと更新レコードとをトラック単位で
読み出し、更新前レコードに対して更新レコードの更新
種別に応じて更新し、更新後レコードとしてレコードキ
ーの順に再び前記ディスク装置1の新たな記憶位置に書
込む。
The updating means 4 reads the record data and the updated record from the disk device 1 and the updated record storage means in track units, updates the record before the update according to the update type of the updated record, and sets the updated record in the order of the record key. The data is again written to a new storage location of the disk device 1.

位置情報書替手段5は前記データ位置記憶手段2の記
憶位置情報を前期更新手段4で書き込まれた新たな記憶
位置情報に書き替える。
The location information rewriting means 5 rewrites the storage location information of the data location storage means 2 with the new storage location information written by the updating means 4 in the previous term.

第1図(b)は本発明の第2の機能ブロック図であ
る。
FIG. 1B is a second functional block diagram of the present invention.

ディスク装置6はレコードデータを記憶する記憶装置
である。
The disk device 6 is a storage device that stores record data.

ディスク制御手段7はディスク装置6に対し、トラッ
ク単位でデータの読み出し、書き込みの制御を行う。メ
モリ8は例えば書き込みや読み出しにおける少なくとも
1トラック分のデータを記憶する。
The disk control means 7 controls the reading and writing of data on the disk device 6 in track units. The memory 8 stores, for example, data for at least one track in writing and reading.

処理手段9は1トラック分のデータに基づく処理を行
うと共に、処理終了時にディスク制御手段7にメモリ8
の内容をディスク装置6の内容をメモリ8に記憶させる
べき制御信号を加える。
The processing means 9 performs processing based on the data for one track, and stores the memory 8 in the disk control means 7 upon completion of the processing.
Of the disk device 6 in the memory 8 is added.

〔実施例〕〔Example〕

以下、一実施例を第2図ないし第8図を参照しながら
説明する。第2図は全体の回路構成図である。データ処
理回路10は例えばマイクロプロセッサ等より成る回路で
あり、各種の処理を行う。このデータ処理回路10にはワ
ークRAM11、リードデータRAMA12、リードデータRAMB1
3、ディスク制御回路14、ライトデータRAM15が接続され
ている。
Hereinafter, an embodiment will be described with reference to FIGS. 2 to 8. FIG. 2 is an overall circuit configuration diagram. The data processing circuit 10 is a circuit including, for example, a microprocessor or the like, and performs various processes. The data processing circuit 10 includes a work RAM 11, a read data RAMA12, and a read data RAMB1.
3. The disk control circuit 14 and the write data RAM 15 are connected.

データ処理回路10が何らかの処理例えば売上集計を行
っている時には各集計の一時的な演算結果はワークRAM1
1に格納される。すなわち、ワークRAM11をワーク領域と
してデータ処理回路10は処理を行う。そして、求めた結
果がディスク16に格納すべきデータである時には、ライ
トデータRAM15に格納する。尚、ディスク16に処理すべ
きデータが格納されている時には、データ処理回路10は
ディスク制御回路14に対し、目的のデータが格納されて
いる1トラック分のデータをディスク制御回路14を介し
て読み出し、リードデータRAMA12やリードデータRAMB13
に格納する。そしてデータ処理回路10はこのリードデー
タRAMA12やこのリードデータRAMB13に格納された1トラ
ック分のデータを用いて処理を行う。
When the data processing circuit 10 is performing some kind of processing, for example, totaling sales, a temporary calculation result of each totaling is stored in the work RAM 1.
Stored in 1. That is, the data processing circuit 10 performs processing using the work RAM 11 as a work area. Then, when the obtained result is data to be stored in the disk 16, the result is stored in the write data RAM 15. When data to be processed is stored in the disk 16, the data processing circuit 10 reads the data for one track in which the target data is stored through the disk control circuit 14 to the disk control circuit 14. , Read data RAMA12 and read data RAMB13
To be stored. The data processing circuit 10 performs processing using the data for one track stored in the read data RAMA12 and the read data RAMB13.

1レコードが複数のワードから成るデータをディスク
に格納するに先だってライトデータRAM15内に格納され
るが、この場合、ライトデータRAM15内に次の1ワード
を記憶できない場合には、まずデータ処理回路10はライ
トデータRAM15内の最後のデータの後ろにトラックエン
ドコードを格納する。そしてライトデータRAM15内の1
トラック分のデータをディスク16の今まで書き込まれて
いるトラックに続くトラックに格納する為に制御信号を
ディスク制御回路14に入力する。このディスク制御回路
14に制御信号が加わることにより、ディスク制御回路14
はライトデータRAM15内の1トラック分のデータをディ
スク16に書き込む制御を行う。
Prior to storing data consisting of a plurality of words of one record on the disk, the data is stored in the write data RAM 15. In this case, if the next one word cannot be stored in the write data RAM 15, the data processing circuit 10 Stores a track end code after the last data in the write data RAM 15. And 1 in the write data RAM 15
A control signal is input to the disk control circuit 14 in order to store the data for the track in the track following the track on which the data has been written on the disk 16. This disk control circuit
When the control signal is applied to the disk control circuit 14, the disk control circuit 14
Controls writing of data for one track in the write data RAM 15 to the disk 16.

前記ディスク16には、複数のレコードから成るファイ
ルが多数格納されるが、この各ファイルのデータ構造は
次の如く構成されている。即ち、ファイルの区切コード
を“§”、レコードの区切コードを“(”、ワードの区
切コードを“,"で表わすならば、各ファイルの先頭には
“§”なるファイル区切コードに続いてファイル名が、
次に“(”なるレコード区切コードに続いて第1番目の
キーワードRK1、続いてワード区切コード“,"、第2番
目のキーワードRK2、以下ワード区切コード“,"で区分
されるデータワードとなる。1ファイル中に複数のレコ
ードが存在する場合には各レコードの先頭に“(”なる
レコード区切コードが、以下同様に第1番目及び第2番
目のキーワードがワード区切コードで区分され、更に複
数のデータワードがワード区切コードで区切られる。な
お、前記各区切コードは、各ワードに用いられるデータ
には使用されない特定のコードで表わされる。
The disk 16 stores a large number of files composed of a plurality of records, and the data structure of each file is configured as follows. That is, if the file delimiter code is represented by “§”, the record delimiter code is represented by “(”, and the word delimiter code is represented by “,”, the file delimiter code “§” is added to the beginning of each file, followed by the file The name is
Next, the first keyword RK 1 following the record delimiter code “(”, followed by the word delimiter code “,”, the second keyword RK 2 , and the data words separated by the following word delimiter code “,” When a plurality of records exist in one file, a record delimiter code "(" is placed at the beginning of each record, and the first and second keywords are similarly separated by a word delimiter code. Further, a plurality of data words are separated by a word separating code, wherein each of the separating codes is represented by a specific code which is not used for data used for each word.

前記ファイルは連続してファイルナンバ(ファイル
名)順に順次ディスク16に格納されるが、更に、同一フ
ァイル内において、各レコードはキーワードの昇順もし
くは降順に格納される。このように、キーワード順に格
納される処理はデータ処理回路10によって行なわれる。
The files are successively stored on the disk 16 in order of file number (file name), and further, in the same file, each record is stored in ascending or descending order of the keyword. As described above, the processing of storing in the order of keywords is performed by the data processing circuit 10.

各ファイルはディスク16の2番目以降の各トラック
t1、t2…に格納される。この格納において、ディスクの
先頭のトラックt0には格納したファイルのファイルナン
バとそのファイルが記憶されている位置を示すトラック
ナンバが記憶されている。
Each file is the second and subsequent tracks on disk 16
are stored in t 1 , t 2 ,. In this storage, the track t 0 of the beginning of the disk track number indicating the position of the file number and the file of a file containing is stored is stored.

第3図はこの先頭のトラックt0のデータ構成図であ
る。このトラックt0にはtFで示される前述したファイル
群の始めのトラックナンバt1が、次にはtMで示されるメ
ンテナンスレコード群の始めトラックナンバt17が、続
いてtEで示されるメンテナンスレコード群の終わりトラ
ックナンバt20が、さらに、その後にファイルナンバ§f
1,§f2…が記憶されているトラックナンバt1、t7、t11
…が設定される。先頭トラックt0の次のトラックt1以降
には第6図に示すように、トラックt1〜t16にはファイ
ル群が記憶され、トラックt17〜t20にはメンテナンスレ
コード群が記憶されている。例えばデータ処理回路10が
集計等の処理を行う時にその集計に必要とするファイル
のファイルナンバと対応するトラックナンバを先頭のト
ラックt0から読み出してそのトラックナンバをアクセス
するようにディスク制御回路14が動作する。そして目的
のデータをトラック単位でリードデータRAMA12やリード
データRAMB13に格納し、処理を行う。
Figure 3 is a data configuration diagram of a track t 0 of the beginning. Track number t 1 of the beginning of the files described above represented by t F for this track t 0 is the start track number t 17 maintenance record group in turn represented by t M is shown followed by t E track number t 20 the end of the maintenance records group, further, then the file number §f
Track numbers t 1 , t 7 , t 11 storing 1 , §f 2
... is set. As the head track t next track t 1 after the zero are shown in Figure 6, the track t 1 ~t 16 is stored in the file group, the track t 17 ~t 20 is stored in the group maintenance records I have. For example the hard disk controller 14 as the file number and the corresponding track number of files that need to their aggregation is read from the beginning of the track t 0 accesses the track number when the data processing circuit 10 performs processing of summary etc. Operate. Then, the target data is stored in the read data RAMA12 or the read data RAMB13 for each track, and is processed.

本実施例においては、ファイルのアクセスは全てトラ
ック単位であり、ファイルの書き込みや読み出しはセク
タ単位に比べて高速となる。
In the present embodiment, all file accesses are performed in track units, and writing and reading of files are performed at a higher speed than in sector units.

一方、この書き込んだデータを修正する等のメンテナ
ンスを行う必要がある。一般的には、修正すべきレコー
ドを読み出して修正を行い、再度修正変更したレコード
を同一領域に書き込んでいるが、実施例においてはその
修正変更したレコードをメンテナンスレコードとして、
一度書き込んだ領域以外のトラックに書き込むようにし
ている。このためメンテナンスレコードは、修正すべき
ファイルナンバとキーワードとによって管理され、修正
データをレコード単位で扱っている。
On the other hand, it is necessary to perform maintenance such as correcting the written data. Generally, a record to be modified is read and modified, and the modified record is written in the same area again.In the embodiment, the modified record is used as a maintenance record.
The data is written to tracks other than the area where the data has been written. Therefore, the maintenance record is managed by the file number to be corrected and the keyword, and the correction data is handled in record units.

第4図はメンテナンスレコードの書き込みのフローチ
ャートである。データ処理回路10は、ディスク16に記憶
しているレコードを訂正する、レコードにデータを集計
する、レコードを削除する、新たなレコードを追加する
等の要求が発生した時、第4図のフローで示す処理を行
う。尚、修正すべき情報を有する新しいメンテナンスレ
コードは図示省略したキーボードから入力されてリード
データRAMB13に第5図に示すように格納されている。即
ち、ファイル区切コード“§”、ファイルナンバ
“f2"、レコード区切コード“(”やキーワードRK、R
K2、更新種別n、データワードm,‥‥‥が書き込まれて
いる。メンテナンスレコードにはファイルナンバ及びキ
ーワード、更新種別が設けられており、どのファイルの
どのレコードをどのように更新するかこのレコードで指
示される。なお、更新種別nは追加、訂正、削除、集計
のいずれかを示す情報である。このメンテナンスレコー
ドを以下の動作で第6図に示すディスク内のメンテナン
スレコード群t17〜t20の最後に付加する。
FIG. 4 is a flowchart for writing a maintenance record. The data processing circuit 10, when a request such as correcting a record stored in the disk 16, totaling data in a record, deleting a record, or adding a new record occurs, generates a Perform the processing shown. A new maintenance record having information to be corrected is input from a keyboard (not shown) and stored in the read data RAMB13 as shown in FIG. That is, the file separation code “§”, the file number “f 2 ”, the record separation code “(”, and the keywords RK and R
K 2 , update type n, and data words m, ‥‥‥ are written. The maintenance record is provided with a file number, a keyword, and an update type, and this record indicates which record of which file is to be updated and how. The update type n is information indicating any of addition, correction, deletion, and aggregation. Adding this maintenance record to the end of the maintenance record group t 17 ~t 20 in the disc shown in FIG. 6 with the following operation.

先ずトラックt0からメンテナンスレコード群の終わり
のトラックナンバtEで示されるトラックナンバt20を読
み出し、更にそのトラックナンバt20のトラック内のデ
ータを読み出してリードデータRAMA(RA)12に格納する
(第4図フローのS1)。さらに、リードデータRAMA(R
A)12の内容をライトデータRAM15に格納する。この処理
(S1、S2)によってメンテナンスレコード群の最終のト
ラック内のメンテナンスレコードがライトデータRAM(W
M)15に格納される。そして、ライトデータRAM15内に残
りの領域が存在するか、即ちリードデータRAM13内のメ
ンテナンスレコードの先頭の1ワード分のデータ「§
f2,」及びトラックエンドコードが書き込める分の領域
が存在するかの判別を行う(S3)。残り容量が存在する
時には、続くメンテナンスレコードのデータが書けるの
で、先ずリードデータRAMB13内のメンテナンスレコード
の先頭から1ワード分のデータを読み出し(S4)、その
読み出した1ワードをライトデータRAM15内の最終ワー
ドに続く位置に格納する(S8)。そしてメンテナンスレ
コードの全ワード終了であるかの判別を行う(S9)。す
なわち、リードデータRAMB13内に残りのワードが存在す
るかを判別する。そして、全ワードを終了していない
(N)時には再度処理(S3〜S9)を行う。
First read the track number t 20 represented by the track number t E at the end of the group maintenance records from the track t 0, further stored in the read data RAMA (RA) 12 reads the data in the track of the track number t 20 ( S1 in the flow of FIG. 4). Furthermore, the read data RAMA (R
A) Store the contents of 12 in the write data RAM 15. By this processing (S1, S2), the maintenance record in the last track of the maintenance record group is stored in the write data RAM (W
M) Stored in 15. Then, whether the remaining area exists in the write data RAM 15, that is, the data of the first word of the maintenance record in the read data RAM 13 Ҥ
It is determined whether or not there is an area in which f 2 , ”and the track end code can be written (S3). When the remaining capacity exists, the data of the subsequent maintenance record can be written. First, one word of data is read from the beginning of the maintenance record in the read data RAMB13 (S4). It is stored at the position following the word (S8). Then, it is determined whether all words of the maintenance record have been completed (S9). That is, it is determined whether or not the remaining word exists in the read data RAMB13. If all the words have not been completed (N), the processing (S3 to S9) is performed again.

一方、判別(S3)において残り容量内でない時(N)
には、その後に続くワードを書けないので、次のトラッ
クに書くこととなる。このため、先ずトラックエンドコ
ード をライトデータRAM15内の最後のワードに続く位置に書
き込み(S5)、トラックナンバーtEで示されるトラック
へライトデータRAM15内のデータを書く処理を行う(S
6)。前述の処理(S6)においてはデータ処理回路10が
ディスク制御回路14に書き込みの制御信号を加え、この
制御信号によってディスク制御回路14がライトデータRA
M15の内容をディスク16内のトラックtEに書き込む一連
の処理を行う。処理S6の後には終わりのトラックナンバ
tEで示されるトラックを+1する処理(S7)を行った
後、再度処理(S3〜S9)を行う。前記処理(S9)によっ
てリードデータRAMB13内の全てのメンテナンスレコード
の書き込みが終了した時には、次にはライトデータRAM
(WM)15内の続く領域にファイル区切コード“§”を格
納(S10)し、続いてトラックナンバtEで示されるトラ
ックへライトデータRAM15内のメンテナンスレコードを
書き込む。そしてメンテナンスレコードの書き込み処理
を終了(END)する。前記処理(S10)で“§”コードを
ワークRAM11内に格納する処理を行っているが、これは
メンテナンスレコードの最終であることをファイル区切
コード“§”で表すためのものであり、つづくデータが
ヌルコード例えば0の時に、最後と判別する。
On the other hand, when it is not within the remaining capacity in the determination (S3) (N)
Cannot write the word that follows it, so it will be written on the next track. Therefore, first, the track end code Is written to the position following the last word in the write data RAM 15 (S5), and the process of writing the data in the write data RAM 15 to the track indicated by the track number t E is performed (S5).
6). In the above-described processing (S6), the data processing circuit 10 applies a write control signal to the disk control circuit 14, and the control signal causes the disk control circuit 14 to write data RA.
The contents of the M15 performs a series of processing for writing the track t E in the disk 16. End track number after processing S6
After performing the process (S7) of incrementing the track indicated by t E by 1 (S7), the processes (S3 to S9) are performed again. When writing of all the maintenance records in the read data RAMB13 is completed by the above-described processing (S9), the write data RAM
Storing a file delimiter code "§" on the area following within (WM) 15 and (S10), followed by writing the maintenance record in the write data RAM15 to track indicated by the track number t E. Then, the maintenance record writing process ends (END). In the process (S10), the process of storing the “§” code in the work RAM 11 is performed to indicate that the maintenance record is the last by the file separation code “§”. Is a null code, for example, 0, it is determined to be the last.

第6図はディスク装置16内の各トラックt1〜t20に書
き込まれているデータ構成図である。始めのトラックt0
には、第3図に示したようなトラックインデックスとフ
ァイルインデックスが記憶され、そのトラックに続くト
ラックすなわち第6図におけるトラックt1〜t16には可
変長データから成る各レコードをキーワード順に隙間無
く詰め込んで記憶したファイルがファイルナンバ順に書
き込まれているファイル群である。そして、トラックナ
ンバt17〜t20のトラックがメンテナンスレコード群を記
憶するトラックとなる。前述した第3図におけるメンテ
ナンスレコード群の始めトラックナンバ及びメンテナン
スレコード群の終わりトラックナンバを示すtM及びtE
は第6図の場合はトラックナンバt17及びトラックナン
バt20が記憶される。
FIG. 6 is a diagram showing the data structure written to each of the tracks t 1 to t 20 in the disk device 16. Starting track t 0
The track index and file index as shown in Figure 3 is stored, without gaps each record consisting of variable length data to the keyword order for the truck t 1 ~t 16 in the track i.e. FIG. 6 following the track This is a group of files in which the packed and stored files are written in file number order. The track of the track number t 17 ~t 20 is a track for storing group maintenance records. The t M and t E shows the track number at the end of the start track number and maintenance record group of group maintenance record in the third diagram the above-described case of FIG. 6 the track number t 17 and the track number t 20 is stored.

第4図のフローで述べた処理によってメンテナンスレ
コード群がファイル群の次のトラックに書き加えられ
る。
The maintenance record group is added to the next track of the file group by the processing described in the flow of FIG.

第7図はファイル群の読み出し処理のフローチャート
である。集計等の処理において予めディスク16に記憶し
てあるファイル群をデータ処理装置10が必要とした時
に、この処理を行う。先ず、トラックナンバt0のトラッ
クの内容をリードデータRAMB(RB)13に格納する(S1
2)。続いて、予め指定されている処理対象のファイル
ナンバと対応するリードデータRAMB(RB)13内のファイ
ルナンバを検出し、このファイルナンバに対応するトラ
ックナンバをリードデータRAMB13内のデータから検索
(S13)し、そのトラックナンバで指示されるトラック
の内容をディスク16から読み出してリードデータRAMA12
に格納する(S14)。この処理(S14)によって目的のフ
ァイルの最初の1トラック分のデータがリードデータRA
MA12に格納される。つづいて、リードライトデータRAM1
2内のレコードを1レコード単位で読み出しワークRAM11
へ順次格納する(S15)。この際に、そのレコードに コードすなわちトラックエンドコードが含まれているか
の判別(S16)を行い、 コードが存在しない時(無)には、次のファイルナンバ
が存在するかを判別(S17)する。そして、次のファイ
ルナンバが存在しない(無)の時には再度、処理(S1
5)から同様に実行する。一方、判別(S16)において コードがある(有)と判別した時には、リードデータRA
MA12内のデータの読み出しが終了し、読み出すべきファ
イルが次のトラックに続けて存在する場合であるので、
次のトラックナンバ更新の処理(S18)を行った後、更
新したトラックを読み出す。すなわちトラックのナンバ
で示されるトラックのデータをディスク16からリードデ
ータRAMA(RA)12に格納する処理を行う。この判別によ
って連続したトラックに亘るファイルをも読み出すこと
ができる。
FIG. 7 is a flowchart of a file group reading process. This processing is performed when the data processing device 10 needs a group of files stored in the disk 16 in advance in processing such as tabulation. First, to store the contents of a track of the track number t 0 the read data RAMB (RB) 13 (S1
2). Subsequently, a file number in the read data RAMB (RB) 13 corresponding to the file number of the processing target specified in advance is detected, and a track number corresponding to this file number is searched from the data in the read data RAMB 13 (S13). The contents of the track indicated by the track number are read from the disk 16 and read data RAMA12 is read.
(S14). By this processing (S14), the data of the first track of the target file is read data RA.
Stored in MA12. Then, read / write data RAM1
Reads the records in 2 in units of one record
Are stored sequentially (S15). At this time, the record Code (ie, track end code) is determined (S16), and If the code does not exist (none), it is determined whether the next file number exists (S17). Then, when the next file number does not exist (none), the processing (S1
Repeat from 5). On the other hand, in the determination (S16) When it is determined that the code exists (present), the read data RA
Since the reading of the data in MA12 has been completed and the file to be read exists following the next track,
After the next track number update process (S18), the updated track is read. That is, a process of storing the track data indicated by the track number from the disk 16 to the read data RAMA (RA) 12 is performed. By this determination, a file over a continuous track can also be read.

一方、判別(S17)において、次のファイルナンバが
有りと判別した時(有)には、処理対象のファイルの全
レコードがワークRAM11へ読み出された場合であるか
ら、このレコードの集計、例えば同一のキーワードを持
つレコードの集計等の処理を行い(S19)、全処理を終
了(END)する。
On the other hand, in the determination (S17), when it is determined that the next file number exists (Yes), it means that all the records of the file to be processed have been read out to the work RAM 11, so that the totals of this record, for example, Processing such as tabulation of records having the same keyword is performed (S19), and all processing ends (END).

以上のように実施例においては、ファイル単位でデー
タを扱っている。このファイルはトラック内のファイル
ナンバ順に連続して格納されているため、トラック単位
でのアクセスが可能となっており、高速の読み出しを行
うことができる。また、ファイルには、キーワード順に
連続してレコードが並べられて格納されているので、特
定のキーワードのレコードを読み出す処理も高速とな
る。前述したファイルの集計等の処理はメンテナンスレ
コード群によるファイルの更新処理が終了した後に行う
処理である。
As described above, in the embodiment, data is handled in file units. Since these files are successively stored in the order of the file numbers in the track, access is possible in track units, and high-speed reading can be performed. Further, since records are sequentially stored in the file in the order of keywords, the process of reading records of specific keywords is also performed at high speed. The above-described processes such as file aggregation are performed after the file update process using the maintenance record group is completed.

第8図はメンテナンスレコードの更新の処理のフロー
チャートである。更新処理を開始すると先ず、トラック
ナンバt0に格納されているメンテナンスレコード群の始
めと終わりを示すトラックナンバすなわちtMとtEに対応
して設定されているトラックナンバ、第6図の例ではt
17〜t20のトラックに記憶されているレコードを読み出
し、ファイルナンバ順さらにキーワード順にソートし
て、再びディスク16のt17からt20までのトラックに書き
込む(S21)。この際、メンテナンスレコード群の終り
のトラックナンバが変わった場合には、このトラックナ
ンバをtEと対応づけてt0のトラックへ書き込む。つづい
て、トラックナンバt0のトラックの内容をリードデータ
RAMA(RA)12に格納した後、ファイル群の始めを示すtF
に対応するトラックナンバをレジスタFに、メンテナン
スレコード群の始めを示すtMに対応するトラックナンバ
をレジスタMとレジスタM′に、メンテナンスレコード
群の終わりを示すtEに対応するトラックナンバをレジス
タEとレジスタE′に格納(S22)する。この処理(S2
2)は後述する処理に使用するためのイニシャルセット
処理である。
FIG. 8 is a flowchart of a process for updating a maintenance record. When starting the update process, first, track number is set corresponding to the track number i.e. t M and t E shows the beginning and end of the maintenance record group stored in the track number t 0, in the example of FIG. 6 t
17 ~t reads 20 records stored in tracks, sorted in file number order More Description order, rewrites the track from t 17 of the disk 16 to t 20 (S21). In this case, when the changed track number of the end of group maintenance records, writes the track number in association with t E to track t 0. Then, lead the contents of the track of the track number t 0 data
After storing in RAMA (RA) 12, t F indicating the beginning of the file group
In the register F, the track number corresponding to t M indicating the beginning of the maintenance record group in the registers M and M ′, and the track number corresponding to t E indicating the end of the maintenance record group in the register E. Is stored in the register E '(S22). This process (S2
2) is an initial setting process to be used for a process described later.

更新処理において更新された後の全ファイルはメンテ
ナンスレコード群の終わりtEのトラックの次のトラック
から書き込まれる。次の処理S23は更新された後のファ
イルが新しく格納されるトラックを求める処理であり、
レジスタEのトラックナンバをインクリメントする。そ
して、次にはレジスタF内のトラックナンバで示される
トラックに格納されているデータを読み出し、リードデ
ータRAMA12に格納(S24)する。即ち、レジスタFには
ファイル群の始めのトラックナンバが格納されているの
で、処理S24によってファイル群の始めのトラック内の
データが読み出されリードデータRAMA12に格納される。
レジスタMにはメンテナンスレコード群の始めのトラッ
クナンバが格納されているので、処理(S25)では、メ
ンテナンスレコード群の始めのトラック内のデータがリ
ードデータRAMB13に格納される。
All files updated in the update process are written from the track following the track at the end t E of the maintenance record group. The next process S23 is a process for obtaining a track in which the updated file is newly stored,
The track number of the register E is incremented. Then, the data stored in the track indicated by the track number in the register F is read out and stored in the read data RAMA12 (S24). That is, since the first track number of the file group is stored in the register F, the data in the first track of the file group is read out by the processing S24 and stored in the read data RAMA12.
Since the first track number of the maintenance record group is stored in the register M, in the process (S25), the data in the first track of the maintenance record group is stored in the read data RAMB13.

このようにして、リードデータRAMA12、リードデータ
RAMB13にそれぞれファイル群の始めであるトラックのデ
ータと、メンテナンスレコード群の始めであるトラック
のデータとが格納される。そしてこれを用いて先ず、キ
ーワード順に各レコードのマッチング処理を行い、その
結果をライトデータRAM15に格納する(S26)このマッチ
ング処理はリードデータRAMA12内のレコードと同一のキ
ーワードのメンテナンスレコードが存在していない時に
はリードデータRAMA12内のレコードをそのままライトデ
ータRAM15へ格納し、また存在している時にはメンテナ
ンスレコードの更新種別による処理(S27)を行う。例
えば、更新種別が集計であればメンテナンスレコードの
該当ワードをファイルのレコードの該当ワードへ加算
し、更新種別が訂正であればファイルのレコードの該当
ワードをメンテナンスレコードの該当ワードのデータに
訂正し、追加であればメンテナンスレコードをファイル
のレコードとして追加し、削除であればメンテナンスレ
コードと同一のキーワードを有するファイルのレコード
を削除する。その後、前記処理したレコードのファイル
ナンバが前回に処理したレコードのファイルナンバーと
同じであるかの判別(S28)を行う。この判別(S28)は
新しいファイルの処理になったのかあるいは前の続きで
あるかの判別である。この判別(S28)で同じファイル
でない時(N)にはファイルインデックスとして、ファ
イルナンバとレジスタE内のトラックナンバを対応付け
てレジスタMMに格納する。前記判別(S28)において同
じファイルである(Y)時もしくは、処理(S29)が終
了した後には、リードデータRAMA12が空すなわち、マッ
チング処理がリードデータRAMA12内のすべてのレコード
に対してなされたかを判別する(S30)。
In this way, the read data RAMA12, read data
The RAMB 13 stores the data of the track at the beginning of the file group and the data of the track at the beginning of the maintenance record group. Using this, first, matching processing of each record is performed in the order of keywords, and the result is stored in the write data RAM 15 (S26). In this matching processing, a maintenance record of the same keyword as the record in the read data RAMA12 exists. When there is no record, the record in the read data RAMA12 is stored in the write data RAM 15 as it is, and when it exists, the process according to the update type of the maintenance record (S27) is performed. For example, if the update type is tally, the corresponding word of the maintenance record is added to the corresponding word of the file record, and if the update type is correct, the corresponding word of the file record is corrected to data of the corresponding word of the maintenance record, If it is added, the maintenance record is added as a file record, and if it is deleted, the record of the file having the same keyword as the maintenance record is deleted. Thereafter, it is determined whether the file number of the processed record is the same as the file number of the previously processed record (S28). This determination (S28) is for determining whether processing of a new file has been performed or whether the processing is a continuation of the previous processing. When the files are not the same file (N) in this determination (S28), the file number and the track number in the register E are stored in the register MM in association with each other as a file index. When the same file is determined in the determination (S28) (Y), or after the process (S29) is completed, it is determined whether the read data RAMA12 is empty, that is, whether the matching process has been performed for all the records in the read data RAMA12. It is determined (S30).

前記処理S27において、更新したレコードの各ワード
を順にライトデータRAM15へ書き込むが、この際、次に
書き込むワード及びトラックエンドコードがライトデー
タRAM15の残り領域へ書き込めなかった場合は、以下のS
31〜S34の処理を実行した後に、再び処理S27で残りのワ
ードをライトデータRAM15へ書き込み、更新した1レコ
ード分の前記書き込みが完了した後に、処理対象になっ
たリードデータRAMA12もしくはリードデータRAMB13内の
レコードを消去する。判別(S31)においてライトデー
タRAM15内にデータが書き込めないと判別(N)した時
には、そのライトデータRAM15内の最後のワードデータ
の後に コードを格納(S32)し、つづいてレジスタEで指示さ
れるトラックへライトデータRAM15の内容を書き込む制
御を行い(S33)、さらにレジスタEの内容をインクリ
メントする処理(S34)を行った後、前述した処理(S2
7)を行う。また判別(S31)においてライトデータRAM1
5内に更新したレコードが完全に書き込めた時にはマッ
チング処理(S26)以下の処理を行う。判別(S30)にお
いてリードデータRAMA12が空いている(Y)すなわちリ
ードした1トラックのファイルデータを全て更新した時
にはレジスタF内のトラックナンバをインクリメントす
る処理(S35)を行う。リードデータRAMA12には、更新
前の1トラック分のファイルデータが格納されるが、全
て更新した後には次のトラックのファイルデータを読み
出すためにレジスタFの内容をインクリメントする。そ
して、レジスタM′とレジスタF″の内容を比較する
(S36)。レジスタM′には処理(S22)によって更新前
のメンテナンスレコード群の始めのトラックナンバが格
納されており(メンテナンスレコード群の始めのトラッ
クより1トラック前がファイル群の終わりのトラックで
ある)レジスタFの内容がレジスタM′の内容と等しい
かあるいは大きい時にはファイル群の全ての読み出しが
終了したことを示し、この時には後述する判別S38を行
う。また、レジスタFの内容がレジスタM′の値より大
きくなく、また等しくもない時(N)すなわち小さい時
にはレジスタFのトラックナンバで指示される1トラッ
ク分の内容を読み出し、リードデータRAMA12に格納(S3
7)した後判別(S38)を行う。判別(S38)は、リード
データRAMB13が空いているか否かを判別する。そして空
いていない時(N)すなわちまだ処理すべきメンテナン
スレコードが存在している時には判別(S31)以下の処
理を行う。一方、メンテナンスレコードが存在しない空
の時(Y)には、レジスタMをインクリメント(S39)
し、その結果がレジスタE′の値より大きいかを判別す
る(S40)。レジスタE′には、処理(S22)において更
新前のメンテナンスレコード群の終わりトラックナンバ
が格納されており、判別(S40)においてレジスタMの
内容がレジスタE′の内容より大きくない時(N)すな
わち小さい時は残りのメンテナンスレコード群がディス
ク16に存在するので、再度、処理(S25)を行ってディ
スク16の1トラック分のメンテナンスレコードをリード
データRAMB13に格納し、前述した処理を繰り返す。
In the process S27, each word of the updated record is sequentially written to the write data RAM 15.At this time, if the next word to be written and the track end code cannot be written to the remaining area of the write data RAM 15, the following S
After executing the processes of 31 to S34, the remaining words are again written to the write data RAM 15 in the process S27, and after the writing of the updated one record is completed, the read word in the read data RAMA12 or the read data RAMB13 to be processed is written. Erase records. If it is determined in the determination (S31) that data cannot be written in the write data RAM 15 (N), the data is written after the last word data in the write data RAM 15 After the code is stored (S32), control for writing the contents of the write data RAM 15 to the track specified by the register E is performed (S33), and the process of incrementing the contents of the register E (S34) is performed. Processing (S2
Perform 7). In the determination (S31), the write data RAM1
When the updated record in 5 has been completely written, the matching process (S26) and subsequent processes are performed. In the determination (S30), when the read data RAMA12 is empty (Y), that is, when all the file data of one track that has been read have been updated, the process of incrementing the track number in the register F (S35) is performed. The read data RAMA12 stores the file data for one track before the update. After the update, the contents of the register F are incremented to read the file data of the next track. Then, the contents of the register M 'are compared with the contents of the register F "(S36). The register M' stores the beginning track number of the maintenance record group before updating by the processing (S22) (start of the maintenance record group). When the content of the register F is equal to or larger than the content of the register M ', it indicates that all the reading of the file group has been completed. When the contents of the register F are not greater than or equal to the value of the register M '(N), that is, when the contents are smaller than the value of the register M', the contents of one track indicated by the track number of the register F are read, and the read data is read. Stored in RAMA12 (S3
7) Then, the discrimination (S38) is performed. The determination (S38) determines whether or not the read data RAMB13 is empty. When it is not empty (N), that is, when there is still a maintenance record to be processed, the processing after determination (S31) is performed. On the other hand, when the maintenance record does not exist and is empty (Y), the register M is incremented (S39).
Then, it is determined whether the result is larger than the value of the register E '(S40). The register E 'stores the end track number of the maintenance record group before updating in the processing (S22), and when the content of the register M is not larger than the content of the register E' in the discrimination (S40) (N), When the size is smaller, the remaining maintenance record group exists on the disk 16, so the processing (S25) is performed again, the maintenance record for one track of the disk 16 is stored in the read data RAMB13, and the above-described processing is repeated.

レジスタMの内容がレジスタE′の値より大きい時
(Y)には、全てのメンテナンスレコードの追加や削除
等の処理が完了した場合であり、次に判別(S36)と同
様の判別(S41)を行う。そして、F≧M′でない時に
は再度、処理(S31)以下の処理を実行する。
When the content of the register M is larger than the value of the register E '(Y), it means that the processing such as addition or deletion of all the maintenance records has been completed, and then the same determination (S41) as the determination (S36) I do. When F ≧ M ′ is not satisfied, the processing following the processing (S31) is executed again.

前述した処理の繰り返しによって新しい更新されたレ
コードがファイルナンバ順に、且つキーワード順にレジ
スタEで示されるディスク16のトラックに記憶される。
なお、処理S34、S35、S39において、各レジスタE、
F、M内のトラックナンバがディスク16の最終トラック
ナンバを越えた値になった際には、t1のトラックに再設
定されるものとする。
A new updated record is stored in the track of the disk 16 indicated by the register E in the order of the file number and in the order of the keyword by repeating the above-described processing.
In addition, in processing S34, S35, S39, each register E,
F, track number in M is when it becomes a value that exceeds the last track number of the disk 16 is to be reset to the track of t 1.

そして、前記判別(S41)においてレジスタFの内容
がレジスタM′の内容より大きいか等しくなった時
(Y)すなわちメンテナンスレコードで指示されるレコ
ードを書き換える等の更新処理を行いさらにファイル群
に対するすべて更新が終わった時には、その最終を表す
ファイル区切“§”をライトデータRAM15に格納し(S4
2)、レジスタEの内容で指示されるトラックへライト
データRAM15の内容を格納する(S43)。そして処理(S4
3)の次には、トラックインデックスを作成する処理(S
44)を行う。トラックインデックスは第3図に示すよう
にファイル群の始めのトラックナンバ、メンテナンスレ
コード群の始めのトラックナンバ、メンテナンスレコー
ド群の終わりのトラックナンバよりなり、これを求める
のが処理S44である。本実施例においては前述したよう
に更新した新しいファイル群は更新前のメンテナンスレ
コード群の終わりのトラックナンバの次のトラックから
格納される。よってトラックインデックス作成の処理S4
4では、更新前のメンテナンスレコード群の終わりトラ
ックナンバを記憶している(処理S22で行われている)
レジスタE′の内容をインクリメントした値となる。す
なわちトラックナンバtFはレジスタE′内のトラックナ
ンバに1を加算した値となる。更新後の最終トラックの
ナンバはレジスタEに記憶されており、その値に1を加
算した値がメンテナンスレコード群の始めトラックナン
バtM、メンテナンスレコード群の終わりトラックナンバ
tEとなる。即ち、この状態ではメンテナンスレコードは
記憶されていない状態になっているが、後に、前述した
第4図のフローに従って書き込まれるメンテナンスレコ
ードは、tEで示されるトラックから書き込まれる。この
インデックス作成処理(S44)で作成されたトラックイ
ンデックス並びに処理(S29)で処理中へ作成されたフ
ァイルインデックスのデータがトラックt0に格納(S4
5)される。前述した処理の後にデータ処理回路はメン
テナンスのレコードの一連の更新処理を終了する。
When the content of the register F is greater than or equal to the content of the register M 'in the determination (S41) (Y), that is, an update process such as rewriting the record designated by the maintenance record is performed, and all the files are updated. Is completed, the file division “§” indicating the end is stored in the write data RAM 15 (S4
2) The contents of the write data RAM 15 are stored in the track specified by the contents of the register E (S43). And processing (S4
After 3), create a track index (S
Perform 44). As shown in FIG. 3, the track index is composed of the first track number of the file group, the first track number of the maintenance record group, and the last track number of the maintenance record group. In this embodiment, as described above, the updated new file group is stored from the track next to the track number at the end of the maintenance record group before updating. Therefore, track index creation processing S4
In 4, the end track number of the maintenance record group before the update is stored (performed in step S22).
This is a value obtained by incrementing the content of the register E '. That is, the track number t F is a value obtained by adding 1 to the track number in the register E '. The updated last track number is stored in the register E, and the value obtained by adding 1 to the value is the start track number t M of the maintenance record group and the end track number of the maintenance record group.
t E. That is, in a state where no maintenance records stored in this state, after the maintenance record written according to the flow of FIG. 4 mentioned above is written from the track indicated by t E. Storing data of the file indexes created into the process at track index and processed was created (S29) In this indexing process (S44) is the track t 0 (S4
5) Yes. After the above-described processing, the data processing circuit ends a series of update processing of the maintenance record.

この更新処理によって、メンテナンスファイルは0と
なり、全く新しいファイルとなる。このような処理はた
とえば合計処理、売上在庫等の管理をそれぞれ1個のフ
ァイルで行い、それぞれのレコードにキーワードを割り
当て、例えば1日の終了時にこの更新処理を行うことに
よって、ファイルを更新することができる。また1日の
業務において発生した、更新すべきデータのみをメンテ
ナンスレコードとして作成し登録しておき、後に一括し
て更新しているので、その都度変更するのと比べ、その
処理速度ははるかに速いものである。
As a result of this update processing, the maintenance file becomes 0 and becomes a completely new file. Such processing is performed by, for example, performing total processing, managing sales inventory, and the like in one file, assigning a keyword to each record, and performing the update processing at the end of the day, for example, to update the file. Can be. In addition, since only data to be updated, which is generated in one day's work, is created and registered as a maintenance record, and is updated collectively later, the processing speed is much faster than changing each time. Things.

前述した本発明の実施例においては、1トラック内の
データが書き込めるか否かの判別はワード単位でおこな
っている。しかしながら、本発明はこれに限らず、レコ
ード単位で管理してもよい。又実施例ではファイルナン
バ順にかつキーワード順に記憶させるようにしていてる
がこれに限らず、少なくとも同一ファイル内ではキーワ
ード順に各レコードが記憶されるものであればよい。
In the above-described embodiment of the present invention, whether data in one track can be written or not is determined in word units. However, the present invention is not limited to this, and may be managed on a record basis. In the embodiment, the records are stored in the order of the file numbers and in the order of the keywords. However, the present invention is not limited to this. Any record may be stored at least in the same file in the order of the keywords.

前記実施例において、メンテナンスレコードの更新後
の新たなファイルはメンテナンスレコードが記憶されて
いた最終トラックの次のトラックに続けて記憶するよう
に記憶位置を制御したが、以下のようにしてもよい。ま
ず、ディスクのファイル記憶エリアをほぼ二等分に分割
し、その各々の先頭トラックの位置tF,tF′をインデッ
クスとして記憶する。tFの位置のトラックを先頭にし
て、以下順に各トラックにファイルを記憶し、このファ
イルの最終トラックの次のトラックの位置tMからメンテ
ナンスレコードを順に記憶する。そして、メンテナンス
レコードの更新において、更新した後の新たなファイル
は前記tF′の位置のトラックを先頭にして順次書き込
む。この更新の後に入力されたメンテナンスレコードは
このファイルの最終トラックの次のトラックの位置tM
から順に記憶していく。tF′の位置から記憶されたファ
イルとtM′の位置から記憶されたメンテナンスレコード
を更新した結果の新たなファイルは前記tFの位置から順
に書き込む。以下ファイルが更新される毎に、更新され
たファイルはtF′の位置からもしくはtFの位置が交互に
書き込む。このようにすればディスク内のファイルの記
憶位置の管理が容易になる。
In the above-described embodiment, the storage position of the new file after the maintenance record is updated is controlled so as to be stored following the track next to the last track in which the maintenance record was stored. First, the file storage area of the disk is divided into approximately equal halves, and the positions t F and t F ′ of the respective leading tracks are stored as indices. and the track position of t F at the beginning, the following stores files on each track sequentially stores the position t M of the next track of the last track of the file maintenance records sequentially. Then, the updating of the maintenance record, the new file after updating sequentially written to the beginning of the track position of the t F '. The maintenance record entered after this update is the position of the track following the last track of this file, t M ′.
From the beginning. t F a new file of the result of updating the stored maintenance records from the position of the 'stored files and t M from the position of' write sequentially from the position of the t F. Thereafter, each time the file is updated, the updated file is written from the position of t F ′ or the position of t F alternately. This makes it easier to manage the storage locations of the files on the disk.

〔発明の効果〕〔The invention's effect〕

本願発明は、ディスク装置に記憶されている複数の更
新前レコードを更新する際、該更新前レコードと更新前
レコードの記憶領域とは異なる記憶領域に記憶しておい
た更新レコードとをトラック単位で読み出し、レコード
キーが同一の更新すべきレコードだけに対して更新レコ
ードに含まれる更新種別に応じた更新処理を行うことが
でき、また、更新処理された更新後レコードを更新レコ
ードの記憶領域につづく記憶領域にトラック単位で記憶
するので、レコードを更新するために更新処理指令を発
生することなく、しかも、ディスク装置に記憶されてい
る更新済みのレコードを除いた全ての更新前レコードを
書き替える必要がなくなり、また、レコードキー順にレ
コードが更新されるので更新処理を短時間で行うことが
できる。
According to the present invention, when updating a plurality of pre-update records stored in the disk device, the pre-update record and the update record stored in a storage area different from the storage area of the pre-update record are track-by-track units. Only the records to be updated with the same read and record keys can be updated according to the update type included in the update record, and the updated record after the update is stored in the storage area of the update record Since the data is stored in the storage area in units of tracks, there is no need to issue an update processing command to update the records, and all the pre-update records except for the updated records stored in the disk device need to be rewritten. And the records are updated in the order of the record keys, so that the updating process can be performed in a short time.

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

第1図(a)、(b)はそれぞれ第1の発明、第2の発
明の機能ブロック図、第2図は回路構成図、第3図は先
頭トラックのデータ構成図、第4図はメンテナンスレコ
ードの書き込み処理のフローチャート、第5図はメンテ
ナンスレコードの構成図、第6図はディスクのトラック
構成図、第7図はファイル読み出し処理のフローチャー
ト、第8図はメンテナンスレコードの更新処理フローチ
ャートである。 1……ディスク装置、 2……ディスク制御手段、 3……メモリ、 4……処理装置。
1 (a) and 1 (b) are functional block diagrams of the first invention and the second invention, respectively, FIG. 2 is a circuit configuration diagram, FIG. 3 is a data configuration diagram of a first track, and FIG. FIG. 5 is a block diagram of a maintenance record, FIG. 6 is a block diagram of a disk track, FIG. 7 is a flowchart of a file read process, and FIG. 8 is a flowchart of a maintenance record update process. 1 ... disk device, 2 ... disk control means, 3 ... memory, 4 ... processing device.

フロントページの続き (56)参考文献 特開 昭53−79445(JP,A) 特開 昭52−79916(JP,A) 特開 昭52−50130(JP,A) 特開 昭63−36375(JP,A) 特開 昭62−31426(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 3/06,12/00 Continuation of the front page (56) References JP-A-53-79445 (JP, A) JP-A-52-79916 (JP, A) JP-A-52-50130 (JP, A) JP-A-63-36375 (JP, A) , A) JP-A-62-31426 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 3/06, 12/00

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】更新前の複数のレコードと、該複数のレコ
ードを更新するための更新種別情報を含む入力情報を更
新レコードとして更新前の複数のレコードとは異なる記
憶領域にトラック単位で記憶するディスク装置と、 前記ディスク装置に記憶された前記更新前のレコードと
前記更新レコードのそれぞれの記憶領域を示す位置情報
を記憶する位置記憶手段と、 前記位置記憶手段の位置情報に基づいて、前記ディスク
装置から前記更新前のレコードと前記更新レコードそれ
ぞれをトラック単位で読み出し、読み出された各々トラ
ック内の複数の更新前レコードと更新レコードのレコー
ドキーを比較し、更新レコードと同一レコードキーの更
新前レコードに対する更新処理を該更新レコードの更新
種別情報に応じて行うレコード更新手段と、 前記レコード更新手段で更新された更新後レコードと前
記レコード更新手段で更新されなかった更新前レコード
とを前記ディスク装置の前記更新レコードが記憶されて
いる記憶領域につづく記憶領域にトラック単位で書き込
む更新手段と、 前記更新手段により更新後レコードおよび未更新レコー
ドがトラック単位で前記記憶領域に書き込まれると、前
記レコード位置記憶手段の個々の記憶位置情報を新たな
記憶領域を示す位置情報に書き換える位置情報管理手段
と、 を有することを特徴とする記憶制御装置。
1. A plurality of records before updating and input information including update type information for updating the plurality of records are stored as update records in a storage area different from the plurality of records before updating on a track basis. A disk device, position storage means for storing position information indicating a storage area of each of the record before update and the update record stored in the disk device, and the disk based on the position information of the position storage means. The record before the update and the update record are read from the device in track units, and the read record keys of the plurality of pre-update records and the update records in each read track are compared. Record update means for performing an update process on a record in accordance with the update type information of the update record; Update means for writing, on a track basis, a post-update record updated by a record update means and a pre-update record not updated by the record update means in a storage area of the disk device following the storage area where the update record is stored. Position information management for rewriting individual storage position information of the record position storage means to position information indicating a new storage area when an updated record and an unupdated record are written to the storage area in track units by the update means; Means, and a storage controller.
JP17542188A 1988-07-14 1988-07-14 Storage controller Expired - Fee Related JP3316763B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17542188A JP3316763B2 (en) 1988-07-14 1988-07-14 Storage controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17542188A JP3316763B2 (en) 1988-07-14 1988-07-14 Storage controller

Publications (2)

Publication Number Publication Date
JPH0224876A JPH0224876A (en) 1990-01-26
JP3316763B2 true JP3316763B2 (en) 2002-08-19

Family

ID=15995804

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17542188A Expired - Fee Related JP3316763B2 (en) 1988-07-14 1988-07-14 Storage controller

Country Status (1)

Country Link
JP (1) JP3316763B2 (en)

Also Published As

Publication number Publication date
JPH0224876A (en) 1990-01-26

Similar Documents

Publication Publication Date Title
US6691136B2 (en) Fast data retrieval based upon contiguous consolidation of records according to frequency of access
US5117495A (en) Method of sorting data records
US6269374B1 (en) Method and apparatus for updating checksums of data structures
JPS62501243A (en) Address environment storage for access to stack-oriented memory
JP7120439B2 (en) Data generalization device, data generalization method, program
JP2656524B2 (en) Data storage method and device
JP3316763B2 (en) Storage controller
JPH08255103A (en) Method and device for file management
JPH0322046A (en) Control method for file using draw type storage medium
JPS62287350A (en) Index integrally updating system
JP2550055B2 (en) Free space management device for storage device
JP3337469B2 (en) Information processing device
JPH0225946A (en) File controller
JP2689116B2 (en) Optical disk storage management method
JP3456481B2 (en) Information processing device
JPS62245574A (en) Data storing system to rotating type recording medium
JP2649675B2 (en) Optical disk storage management method
JP3439364B2 (en) Storage and retrieval methods for undefined length data
JPS61160133A (en) Data input control method
JPS62226487A (en) Memory control system for optical disk
JP2721034B2 (en) Clustering control system
JPH043234A (en) Filing control method for fixed length type record
JPH02278439A (en) Data control system for draw
JPS60225938A (en) Information retrieving system
JPH0797345B2 (en) File control method

Legal Events

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