JPH0461373B2 - - Google Patents

Info

Publication number
JPH0461373B2
JPH0461373B2 JP57122531A JP12253182A JPH0461373B2 JP H0461373 B2 JPH0461373 B2 JP H0461373B2 JP 57122531 A JP57122531 A JP 57122531A JP 12253182 A JP12253182 A JP 12253182A JP H0461373 B2 JPH0461373 B2 JP H0461373B2
Authority
JP
Japan
Prior art keywords
data
buffer
file
block
read
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 - Lifetime
Application number
JP57122531A
Other languages
Japanese (ja)
Other versions
JPS5911461A (en
Inventor
Hiromi Ito
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP57122531A priority Critical patent/JPS5911461A/en
Publication of JPS5911461A publication Critical patent/JPS5911461A/en
Publication of JPH0461373B2 publication Critical patent/JPH0461373B2/ja
Granted legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 (a) 発明の技術分野 本発明は電子計算機(以下電算機と略称する)
のデータ処理装置におけるデータ読み取り方式に
関するものである。
[Detailed Description of the Invention] (a) Technical Field of the Invention The present invention relates to an electronic computer (hereinafter abbreviated as computer).
The present invention relates to a data reading method in a data processing device.

(b) 技術の背景 近年プログラムの合理的設計が盛に行われてい
るがこれを実現するには電算機のデイスプレイ画
面やプリンタ面にオペレータが必要とする表示の
みが現われることが望ましく、そのための工夫が
種々なされている。
(b) Background of the technology In recent years, rational design of programs has been actively carried out, but in order to realize this, it is desirable that only the display required by the operator appears on the computer display screen or printer surface. Various efforts have been made.

第1図は電算機におけるデータ処理装置の要部
を示したものであつて、フアイル4には種々のレ
コード長を持つたデータが格納されている。そし
てユーザプログラム3が走るデータ処理部6はデ
ータ管理部5と指令のやりとりを行う一方、デー
タ管理部5はフアイル4と指令のやりとりを行な
つている。
FIG. 1 shows the main part of a data processing device in a computer, and a file 4 stores data having various record lengths. The data processing section 6 on which the user program 3 runs exchanges commands with the data management section 5, while the data management section 5 exchanges commands with the file 4.

(c) 従来技術と問題点 今データ処理部6からデータ管理部5へ、フア
イル4中に格納されているデータを読み出すため
の読み出し命令が矢印イのように伝えられると、
フアイル4からは矢印ロで示したようにデータが
中央処理装置(Cpu)1中のバツフア2へ読み出
される。そしてこのバツフア2はデータ管理部5
によつて制御されて、該バツフア2中のデータは
矢印ハで示したようにユーザプログラム3へ読み
込まれるようになつている。
(c) Prior Art and Problems Now, when a read command for reading data stored in the file 4 is transmitted from the data processing unit 6 to the data management unit 5 as shown by arrow A,
Data is read out from the file 4 to the buffer 2 in the central processing unit (Cpu) 1 as shown by arrow B. And this buffer 2 is data management section 5
The data in the buffer 2 is read into the user program 3 as shown by arrow C.

ここでデータの最小単位を例えば8ビツトと仮
定し、これを1レコードを呼ぶとする。そして、
例えば理解の便宜のために複数のレコード分を1
ブロツクと呼ぶ。
Here, it is assumed that the minimum unit of data is, for example, 8 bits, and this is called one record. and,
For example, for the convenience of understanding, multiple records are
It's called a block.

前記したフアイル4の処理単位は1ブロツクと
大きいがユーザプログラム3の処理単位は小さ
く、1レコードでしかないという制約がある。こ
のためにフアイル4からバツフア2に読み込まれ
た1ブロツク分のデータはユーザプログラム3に
そのまま読み込むことはできない。このめにブロ
ツキング・デブロツキングと称する操作がとられ
るのが普通であつて、ユーザプログラム3はバツ
フア2中に収納された上記の複数レコード分から
なる1ブロツク分のデータを1レコード分ずつ分
解して読み出して来て演算部7において所定の演
算を行うのが常套手段である。
The processing unit of the file 4 described above is large, ie, one block, but the processing unit of the user program 3 is small, and is limited to only one record. For this reason, one block of data read into the buffer 2 from the file 4 cannot be read into the user program 3 as is. For this purpose, an operation called blocking/deblocking is normally performed, and the user program 3 reads out one block of data stored in the buffer 2, which is made up of the above-mentioned plural records, by breaking it down one record at a time. It is a common practice to carry out predetermined calculations in the calculation section 7.

ところがユーザプログラム3から見れば、単位
ブロツク(1ブロツク)が何レコードから成り立
つているかがわからないと、バツフア2中に読み
込まれたデータをどこまで読めばよいのか判断が
つかない。そのために、従来は単位ブロツクの所
定のn個のレコードで形成するというようにフア
イル4の中で定義しておく方法がとられている。
以下では説明の便宜上、上記1ブロツクは例えば
3レコードで形成されているものとして説明す
る。したがつてこのようにすればユーザプログラ
ム3がバツフア2中に収納された1ブロツク分を
読み出すには3回に渡つて読み取りを行なえばよ
いことになる。
However, from the user program 3's point of view, unless it knows how many records a unit block (one block) consists of, it cannot judge how far into the data read into the buffer 2 it should read. For this purpose, conventionally, a method has been adopted in which a unit block is defined in the file 4 by forming a predetermined n number of records.
For convenience of explanation, one block will be explained below as being made up of, for example, three records. Therefore, in this case, in order for the user program 3 to read one block stored in the buffer 2, it is only necessary to read the data three times.

このようにデータ長が1レコードであると定義
されておれば何も問題はない。しかし現実に処理
しなければならないデータの中には、たとえば従
業員番号のようにほとんどいつでも1レコード分
中に納まつてしまうものであれば、住所のように
対象とする人によつて数レコード分を要するもの
も存在する。
If the data length is defined as one record in this way, there is no problem. However, in reality, some data that must be processed can be stored in one record, such as an employee number, or several records, such as an address, depending on the target person. There are some things that take a long time.

このように第2図aに示したごとく1レコード
分の長さ1ですむデータもあれば第2図bに示
すように2レコード分の長さ2を必要とするデ
ータもあり、あるいは第2図cに描いたように3
レコード分の長さ3にわたるデータも存在する
ために、このようなレコード長が種々なデータを
フアイル4からバツフア2中に収納した場合、ユ
ーザプログラム3は、1つの読み取り命令がフア
イル4に伝わつた際にはユーザプログラム3から
バツフア2を見れば、このバツフア2中のデータ
は1ブロツクではあるけれどもそれが何レコード
分に相当するのか判らない。そうするとユーザプ
ログラム3は必然的に何回バツフア2中の情報の
読み取り操作を行えば1ブロツク分の読み取りが
終るのか見当がつかないという不都合が生じる。
In this way, as shown in Figure 2a, there is data that requires a length of 1 for one record, and as shown in Figure 2b, there is data that requires a length of 2 for two records, or as shown in Figure 2b. 3 as depicted in figure c.
Since there is data with a record length of 3, if data with various record lengths is stored from file 4 into buffer 2, user program 3 will not be able to handle the situation when one read command is transmitted to file 4. In this case, when looking at buffer 2 from user program 3, the data in buffer 2 is one block, but it is not clear how many records it corresponds to. This inevitably causes the inconvenience that the user program 3 has no idea how many times it will have to read the information in the buffer 2 to finish reading one block.

その上、バツフア2には、先に書き込まれた第
1の1ブロツク分の読み出しが終れば、引き続き
その上ら第2の1ブロツク分が書き込まれるので
あるが、仮に上記第1の1ブロツク分が第2の1
ブロツク分よりも長ければ、ユーザプログラム3
は、どこで読み出しを停止すればよいかの判断を
行う機能を持たないため、読み出しの際にはこの
第2の1ブロツク分の読み出しに引き続いて、前
回に書き込まれていた第1の1ブロツク分の後部
データまで読み出してしまうという不祥事を生じ
る。こうしたことが起こるならば、プログラムを
図示しないデイスプレイ画面上に現わした場合、
第2ブロツクに対応するプログラムのあとに、前
回の第1ブロツクに対応するプログラムの残りが
表示されることになり、具合が悪い状態を生じて
しまう。
Moreover, once the reading of the first one block written earlier is completed, the second one block is subsequently written into the buffer 2. is the second 1
If it is longer than the block, user program 3
does not have a function to judge where to stop reading, so when reading, following reading of this second block, the first block that was written last time is read. A scandal occurs in which the data at the end of the file is read out. If this happens, if the program appears on a display screen (not shown),
After the program corresponding to the second block, the remainder of the previous program corresponding to the first block will be displayed, resulting in an uncomfortable situation.

(d) 発明の目的 本発明は上記従来の欠点に鑑みてなされたもの
で、バツフア2中の情報をレコード毎に区切ると
いうことをせずに、フアイル4からバツフア2に
入れられた連続のデータどこまで読めばよいかを
簡単に識別できる簡便なデータ読み取り方式を提
供し、これによつて前記不都合の除去を目的とす
るものである。
(d) Purpose of the Invention The present invention has been made in view of the above-mentioned drawbacks of the conventional technology, and is based on the continuous data input from file 4 to buffer 2 without separating the information in buffer 2 for each record. It is an object of the present invention to provide a simple data reading method that can easily identify how far to read, thereby eliminating the above-mentioned inconvenience.

(e) 発明の構成 そしてこの目的は本発明によれば、データ管理
部5の制御に基づいてフアイル4からブロツク単
位で読み出されるデータを、データ処理部6がレ
コード単位で読み取りうるようにフアイル4とデ
ータ処理部6との間にデータ管理部5で判断され
るバツフア2を設けたデータ処理装置において、
前記データ処理部6からの読出し命令が出される
たびに前記バツフア2のデータ記憶領域の全面に
特定コードを一旦記憶させた後、フアイル4から
ブロツク単位で読み出されるデータを前記バツフ
ア2の所定位置から前記特定コードを書き替える
形で書き込み、バツフア2から前記データ処理部
6へレコード単位でのデータ読み出しに際して上
記特定コードが表われればデータ読み出しの終了
とすることを特徴とするデータ読み取り方式によ
つて達成される。
(e) Structure of the Invention According to the present invention, the object is to read the data read out in blocks from the file 4 based on the control of the data management section 5 in units of records so that the data processing section 6 can read the data in units of records. In a data processing device provided with a buffer 2 determined by the data management unit 5 between the data processing unit 6 and the data processing unit 6,
Each time a read command is issued from the data processing section 6, a specific code is temporarily stored in the entire data storage area of the buffer 2, and then the data read out in blocks from the file 4 is stored at a predetermined position in the buffer 2. The data reading method is characterized in that the specific code is written in a rewritten manner, and when the specific code appears when reading data from the buffer 2 to the data processing unit 6 in record units, the data reading is terminated. achieved.

(f) 発明の実施例 以下本発明によるデータ読み取り方式を図面を
用いて詳述する。
(f) Embodiments of the Invention The data reading method according to the present invention will be described in detail below with reference to the drawings.

第3図a〜bは本発明に係るデータ読み取り方
式を用いたバツフア2へのデータ書き込みの手順
を示したものである。まず第3図aに示したよう
にバツフア2の全面を、このデータ処理装置にお
いて取り扱う各種コードの内にはまず見当らない
コード、たとえばFFなる特定のコードを記憶さ
せることによつて埋めつくしておく。こうした上
で第3図bに示すように、バツフア2の所定の位
置、例えば第3図b中のp点から始めて、矢印ホ
の方向へフアイル4からの第1のブロツク分のデ
ータを前記特定レコードを書替える形で順に収納
して行く。こうしておけばバツフア2からのレコ
ード単位の読み取りに際して、データ中にない
FFなるレコードが直ちに現われるので、1ブロ
ツク分のデータの読み取りが終了したということ
が明確に判る。
3a to 3b show the procedure for writing data into the buffer 2 using the data reading method according to the present invention. First, as shown in Figure 3a, the entire surface of the buffer 2 is filled up by storing codes that are rarely found among the various codes handled by this data processing device, such as a specific code called FF. . Then, as shown in FIG. 3b, starting from a predetermined position of the buffer 2, for example, point p in FIG. Store the records in order by rewriting them. By doing this, when reading record units from buffer 2,
Since the record FF appears immediately, it is clear that reading of one block of data has been completed.

そしてここに収納されたデータがユーザプログ
ラム3によつてすべて読み出されるわけである
が、その次に引き続き第2ブロツク分のデータを
フアイル4からバツフア2に収納する時には、前
記したように読み出し命令が矢印イのように伝達
される。そしてこの読み出し命令が出されたと同
時に、バツフア2を全面にわたつて第3図cのご
とく再びFFコードで埋めつくすようにしておく。
すなわち、この操作によつて前に書き込まれた第
1のブロツク分のデータはすべて消去されてしま
う。こうした上で第2ブロツクのデータをやはり
フアイル2中の先と同じ個所p点から、第3図d
に示したように矢印ホ方向に書き込んで行く。
All of the data stored here is read by the user program 3, but when the second block of data is subsequently stored from the file 4 to the buffer 2, a read command is issued as described above. It is transmitted as shown by arrow A. At the same time as this read command is issued, the entire buffer 2 is again filled with FF codes as shown in FIG. 3c.
That is, this operation erases all the previously written data for the first block. After doing this, the data of the second block is also transferred from the same point p in file 2 as shown in Fig. 3 d.
Write in the direction of the arrow H as shown.

こうすれば、当該第2ブロツクの読み取り終了
点はQ点となる。
In this way, the reading end point of the second block becomes point Q.

このためにこの第1ブロツクよりもデータ長が
短い第2ブロツクのデータの読み取りがQ点で終
つた後においても、強い引き続き読み取り操作を
行おうとしても直ちにFFコードが表われること
になる。この場合FFコードが表われれば直ちに
読み取りを停止するようにしておく。
For this reason, even after reading the data of the second block, which has a shorter data length than the first block, ends at point Q, an FF code will immediately appear even if a strong subsequent read operation is attempted. In this case, the reading should be stopped immediately if the FF code appears.

このようしておくならば、前記したように電算
機の図示しないデイスプレイ画面上において、今
回書き込んだ第2ブロツクのデータが表示されて
も、そのすぐあとに前回書き込んだ第1ブロツク
のデータの後半(残り分)が同時に表示されるこ
とを防止できる。
If you do this, as mentioned above, even if the data of the second block written this time is displayed on the display screen (not shown) of the computer, the second half of the data of the first block written last time will be displayed immediately after it. (Remaining portion) can be prevented from being displayed at the same time.

(g) 発明の効果 以上、詳細に説明したように、本発明のデータ
読み取り方式を用いれば、電算機に用いるデイス
プレイ画面やあるいはプリンタ面にオペレータが
必要とする表示のみが現われることになり、実用
上多大の効果が期待できる。
(g) Effects of the Invention As explained in detail above, if the data reading method of the present invention is used, only the display required by the operator will appear on the display screen used in a computer or on the printer surface, making it practical. Great effects can be expected.

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

第1図は電算機におけるデータ処理装置の要部
を示した図、第2図a〜cはバツフア中に読み込
まれる各種データのレコード長を表わす図、第3
図は本発明のデータ読み取り方式を表わす図であ
る。 図において、1は中央処理装置、2はバツフ
ア、3はユーザプログラム、4はフアイル、5は
データ管理部、6はデータ処理部、7は演算部を
それぞれ示す。
Figure 1 is a diagram showing the main parts of a data processing device in a computer, Figures 2 a to c are diagrams showing record lengths of various data read during buffering, and Figure 3
The figure is a diagram showing a data reading method of the present invention. In the figure, 1 is a central processing unit, 2 is a buffer, 3 is a user program, 4 is a file, 5 is a data management section, 6 is a data processing section, and 7 is a calculation section.

Claims (1)

【特許請求の範囲】 1 データ管理部5の制御に基づいてフアイル4
からブロツク単位で読み出されるデータを、デー
タ処理部6がレコード単位で読み取りうるように
フアイル4とデータ処理部6との間にデータ管理
部5で判断されるバツフア2を設けたデータ処理
装置において、 前記データ処理部6からの読出し命令が出され
るたびに前記バツフア2のデータ記憶領域の全面
に特定コードを一旦記憶させた後、フアイル4か
らブロツク単位で読み出されるデータを前記バツ
フア2の所定位置から前記特定コードを書き替え
る形で書き込み、バツフア2から前記データ処理
部6へレコード単位でのデータ読み出しに際して
上記特定コードが表われればデータ読み出しの終
了とする ことを特徴とするデータ読み取り方式。
[Claims] 1. Based on the control of the data management section 5, the file 4
In a data processing apparatus, a buffer 2 determined by a data management section 5 is provided between a file 4 and a data processing section 6 so that the data processing section 6 can read data read out in blocks from a record in units of records. Each time a read command is issued from the data processing unit 6, a specific code is temporarily stored in the entire data storage area of the buffer 2, and then the data read out in blocks from the file 4 is stored at a predetermined position in the buffer 2. A data reading method characterized in that the specific code is written in a rewritten manner, and when the specific code appears when reading data from the buffer 2 to the data processing unit 6 in units of records, the data reading is terminated.
JP57122531A 1982-07-13 1982-07-13 Data reading system Granted JPS5911461A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57122531A JPS5911461A (en) 1982-07-13 1982-07-13 Data reading system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57122531A JPS5911461A (en) 1982-07-13 1982-07-13 Data reading system

Publications (2)

Publication Number Publication Date
JPS5911461A JPS5911461A (en) 1984-01-21
JPH0461373B2 true JPH0461373B2 (en) 1992-09-30

Family

ID=14838154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57122531A Granted JPS5911461A (en) 1982-07-13 1982-07-13 Data reading system

Country Status (1)

Country Link
JP (1) JPS5911461A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5114229A (en) * 1974-07-01 1976-02-04 Ibm Gasu panerusochi
JPS57117167A (en) * 1981-01-14 1982-07-21 Agency Of Ind Science & Technol Discrimination system for data end

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5114229A (en) * 1974-07-01 1976-02-04 Ibm Gasu panerusochi
JPS57117167A (en) * 1981-01-14 1982-07-21 Agency Of Ind Science & Technol Discrimination system for data end

Also Published As

Publication number Publication date
JPS5911461A (en) 1984-01-21

Similar Documents

Publication Publication Date Title
JPH04360246A (en) Device for compressing file
JPH0461373B2 (en)
US5170479A (en) File block managing system using next record header position data and delete history data from block header and record headers to locate requested record block
JPH04251347A (en) Disk file controller and updating method
JPH0477915A (en) Magnetic disk controller
JPH0793101A (en) Data backup device
JP2932568B2 (en) Data communication device
JP2598935B2 (en) Writing method to text memory
JP2912657B2 (en) File access processor
JPH05250243A (en) Data processing system for extended storage device
JP2549155Y2 (en) Optical filing system
JP2507399B2 (en) Database equipment
JP2735400B2 (en) Asynchronous I / O control method
JPS6124737B2 (en)
JP2708523B2 (en) Channel device and operation method thereof
JP3225633B2 (en) Image data management device
JPS63138442A (en) Restoring and processing system for deleted file
JPH06168079A (en) Data backup system
JPH02257282A (en) Table preparation processor
JPH01292520A (en) Data restoring system
JPS6043737A (en) Crt display device with local command function
JPS5842487B2 (en) Program loading method
JPH0535411A (en) Cache memory circuit
JPS62290962A (en) Editing system for table of contents
JPH04319779A (en) Data writing/reading device