JPH0421041A - Dynamic converting system for file format - Google Patents

Dynamic converting system for file format

Info

Publication number
JPH0421041A
JPH0421041A JP2123476A JP12347690A JPH0421041A JP H0421041 A JPH0421041 A JP H0421041A JP 2123476 A JP2123476 A JP 2123476A JP 12347690 A JP12347690 A JP 12347690A JP H0421041 A JPH0421041 A JP H0421041A
Authority
JP
Japan
Prior art keywords
file
record
length
stored
length record
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2123476A
Other languages
Japanese (ja)
Inventor
Kentaro Misawa
健太郎 三澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2123476A priority Critical patent/JPH0421041A/en
Publication of JPH0421041A publication Critical patent/JPH0421041A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute the access at a high speed with respect to data of a variable length record file by converting dynamically a file format of the variable length record file and a file format of a fixed length record file. CONSTITUTION:A file allocating means 102 calls a file format converting means 201, based on an allocation request of a file, converts a variable length record file stored in a first data store means 301 to a file format of a fixed length record file and stores it in a second data store means 401, and executes an allocation of the fixed length record file. Subsequently, data of the fixed length record file stored in a second data store means 401 is read and written, the fixed length record file is converted to a file format of the variable length record file and stored in a first data store means 301, and the fixed length record file is released. In such a way, data of the variable length record file can be accessed at a high speed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はファイルのアクセス方式に関し、特に可変長レ
コードを格納するファイル(以下、可変長レコードファ
イルという)のデータを高速にアクセスするためのファ
イル形式の動的変換方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a file access method, and in particular to a file for rapidly accessing data in a file storing variable-length records (hereinafter referred to as a variable-length record file). Concerning dynamic format conversion methods.

〔従来の技術〕[Conventional technology]

従来、この種のファイルのアクセス方式は、ファイルア
クセス手段と、ファイル割付は手段と、ファイル割付は
解除手段とから構成されており、データが格納されてい
るファイルが可変長レコードファイルの場合には、固定
長レコードを格納するファイル(以下、固定長レコード
ファイルという)のデータをアクセスする場合に比べて
、データのアクセス速度が低下していた。このため、可
変長レコードファイルのデータを高速にアクセスする必
要がある場合には、可変長レコードファイルの内容と同
一内容の固定長レコードファイルを用意してデータにア
クセスするようにしていた。
Conventionally, this type of file access method consists of a file access means, a file allocation means, and a file allocation release means.If the file storing data is a variable-length record file, , the data access speed was lower than when accessing data in a file that stores fixed-length records (hereinafter referred to as a fixed-length record file). For this reason, when it is necessary to access data in a variable-length record file at high speed, a fixed-length record file with the same contents as the variable-length record file is prepared to access the data.

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

上述した従来のファイルのアクセス方式では、可変長レ
コードファイルのデータを高速にアクセスする必要があ
る場合に可変長レコードファイルの内容と同一内容の固
定長レコードファイルを用意してデータにアクセスする
必要があったので、ファイルのデータ処理を行う以前に
可変長レコードファイルを固定長レコードファイルのフ
ァイル形式に変換し、ファイルのデータ処理が終了した
以後に固定長レコードファイルを可変長レコードファイ
ルのファイル形式に戻すことになり、ファイルのデータ
処理が複雑になるとともに、アクセスするファイルが固
定長レコードファイルであるか否かを常に管理する必要
があるという欠点があまた、可変長レコードファイルを
そのままのファイル形式でアクセスしてデータ処理を行
うと、ファイル形式がデータ処理方式に合わずに処理効
率が低下する場合が多いという欠点がある。
In the conventional file access method described above, when it is necessary to access data in a variable-length record file at high speed, it is necessary to prepare a fixed-length record file with the same contents as the variable-length record file and access the data. Therefore, before processing the file data, convert the variable-length record file to the fixed-length record file format, and after completing the file data processing, convert the fixed-length record file to the variable-length record file format. In addition to complicating file data processing, there is also the disadvantage that it is necessary to constantly manage whether or not the file being accessed is a fixed-length record file. When accessing and processing data, there is a drawback that the file format often does not match the data processing method, resulting in a decrease in processing efficiency.

本発明の目的は、上述の点に鑑み、可変長レコードファ
イルのファイル形式と固定長レコードファイルのファイ
ル形式とを動的に変換して可変長レコードファイルのデ
ータに対して高速にアクセスできるようにしたファイル
形式の動的変換方式を提供することにある。
In view of the above-mentioned points, an object of the present invention is to dynamically convert the file format of a variable-length record file and the file format of a fixed-length record file so that data in the variable-length record file can be accessed at high speed. The objective is to provide a dynamic conversion method for file formats.

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

本発明のファイル形式の動的変換方式は、ファイルのア
クセス方式において、可変長レコード。
The file format dynamic conversion method of the present invention uses variable length records in the file access method.

各可変長レコードのレコード長を記録するレコード長格
納部および可変長レコードを格納していることを記録す
るファイル形式記録部からなる可変長レコードファイル
を格納する第1データ格納手段ト、固定長レコード、固
定長レコードのレコード長の総和を記録するファイル長
記録部および固定長レコードを格納していることを記録
するファイル形式記録部からなる固定長レコードファイ
ルを格納する第2データ格納手段と、前記第1データ格
納手段に格納されている可変長レコードファイルを固定
長レコードファイルのファイル形式に変換して前記第2
データ格納手段に格納したり前記第2データ格納手段に
格納されている固定長レコードファイルを可変長レコー
ドファイルのファイル形式に変換して前記第1データ格
納手段に格納したりするファイル形式変換手段と、ファ
イルのデータをアクセスするファイルアクセス手段と、
このファイルアクセス手段からのファイルの割付は要求
に基づいて前記ファイル形式変換手段を呼び出して前記
第1データ格納手段に格納されている可変長レコードフ
ァイルを固定長レコードファイルのファイル形式に変換
して前記第2データ格納手段に格納し固定長レコードフ
ァイルの割付けを行うファイル割付は手段と、前記ファ
イルアクセス手段からのファイルのリード/ライト要求
に基づいて前記第2データ格納手段に格納されている固
定長レコードファイルのデータをリードおよびライトす
るファイルリード/ライト手段と、前記ファイルアクセ
ス手段からのファイルの割付は解除要求に基づいて前記
ファイル形式変換手段を呼び出して前記第2データ格納
手段に格納されている固定長レコードファイルを可変長
レコードファイルのファイル形式に変換して前記第1デ
ータ格納手段に格納し固定長レコードファイルを解放す
るファイル割付は解除手段とを有する。
A first data storage means for storing a variable length record file comprising a record length storage section for recording the record length of each variable length record and a file format recording section for recording that a variable length record is stored; fixed length records; , a second data storage means for storing a fixed-length record file comprising a file length recording section for recording the sum of record lengths of fixed-length records and a file format recording section for recording that fixed-length records are stored; The variable length record file stored in the first data storage means is converted into a file format of a fixed length record file, and the second
File format converting means for storing in the data storage means or converting a fixed length record file stored in the second data storage means into a file format of a variable length record file and storing it in the first data storage means; , a file access means for accessing data in the file;
File allocation from this file access means calls the file format conversion means based on a request, converts the variable length record file stored in the first data storage means into the file format of a fixed length record file, and a file allocation means for allocating a fixed length record file stored in a second data storage means; and a fixed length record file stored in the second data storage means based on a file read/write request from the file access means. File read/write means reads and writes data in a record file, and file allocation from the file access means is stored in the second data storage means by calling the file format conversion means based on a release request. and a file allocation/release means for converting a fixed length record file into a variable length record file file format, storing it in the first data storage means, and releasing the fixed length record file.

〔作用〕[Effect]

本発明のファイル形式の動的変換方式では、第1データ
格納手段が可変長レコード、各可変長レコードのレコー
ド長を記録するレコード長格納部および可変長レコード
を格納していることを記録するファイル形式記録部から
なる可変長レコードファイルを格納し、第2データ格納
手段が固定長レコード、固定長レコードのレコード長の
総和を記録するファイル長証録部および固定長レコード
を格納していることを記録するファイル形式記録部から
なる固定長レコードファイルを格納し、ファイル形式変
換手段が第1データ格納手段に格納されている可変長レ
コードファイルを固定長レコードファイルのファイル形
式に変換して第2データ格納手段に格納したり第2デー
タ格納手段に格納されている固定長レコードファイルを
可変長レコードファイルのファイル形式に変換して第1
データ格納手段に格納したりし、ファイルアクセス手段
がファイルのデータをアクセスし、ファイル割付は手段
がファイルアクセス手段からのファイルの割付は要求に
基づいてファイル形式変換手段を呼び出して第1データ
格納手段に格納されている可変長レコードファイルを固
定長レコードファイルのファイル形式に変換して第2デ
ータ格納手段に格納し固定長レコードファイルの割付け
を行い、ファイルリード/ライト手段がファイルアクセ
ス手段からのファイルのリード/ライト要求に基づいて
第2データ格納手段に格納されている固定長レコードフ
ァイルのデータをリードおよびライトし、ファイル割付
は解除手段がファイルアクセス手段からのファイルの割
付は解除要求に基づいてファイル形式変換手段を呼び出
して第2データ格納手段に格納されている固定長レコー
ドファイルを可変長レコードファイルのファイル形式に
変換して第1データ格納手段に格納し固定長レコードフ
ァイルを解放する。
In the file format dynamic conversion method of the present invention, the first data storage means includes variable-length records, a record length storage section that records the record length of each variable-length record, and a file that records that the variable-length record is stored. A variable length record file consisting of a format recording section is stored, and the second data storage means stores a fixed length record, a file length certificate section for recording the total record length of the fixed length records, and a fixed length record. A fixed-length record file consisting of a file format recording section to be recorded is stored, and a file format converting means converts the variable-length record file stored in the first data storage means into the file format of the fixed-length record file to generate second data. A fixed-length record file stored in the storage means or a second data storage means is converted into a variable-length record file format, and the first
The file access means accesses the file data, and the file allocation means calls the file format conversion means based on a request from the file access means, and the first data storage means The variable-length record file stored in the storage device is converted into a fixed-length record file file format and stored in the second data storage means, the fixed-length record file is allocated, and the file read/write means reads the file from the file access means. The data of the fixed-length record file stored in the second data storage means is read and written based on a read/write request from the second data storage means, and the file allocation means handles the file allocation based on the release request from the file access means. A file format conversion means is called to convert the fixed length record file stored in the second data storage means into a file format of a variable length record file, and the file format is stored in the first data storage means, and the fixed length record file is released.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は、本発明の一実施例に係るファイル形式の動的
変換方式の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a dynamic file format conversion method according to an embodiment of the present invention.

本実施例のファイル形式の動的変換方式は、ファイルア
クセス手段101と、ファイル割付は手段102と、フ
ァイル割付は解除手段103と、ファイルリード/ライ
ト手段104と、ファイル形式変換手段201と、第1
データ格納手段301と、第2データ格納手段401と
から、その主要部が構成されている。
The dynamic file format conversion method of this embodiment includes a file access means 101, a file allocation means 102, a file allocation release means 103, a file read/write means 104, a file format conversion means 201, and a 1
Its main parts are composed of data storage means 301 and second data storage means 401.

第1データ格納手段301は、可変長レコードを格納す
ることを記録するファイル形式記録部302と、複数の
可変長レコード303〜306と、各可変長レコード3
03〜306のレコード長を格納する複数のレコード長
格納部307〜310とからなる可変長レコードファイ
ルを格納している。なお、可変長レコード303〜30
6の末尾には、改レコード記号がそれぞれ記録されてい
る。
The first data storage means 301 includes a file format recording unit 302 that records that variable length records are stored, a plurality of variable length records 303 to 306, and each variable length record 3.
A variable length record file consisting of a plurality of record length storage units 307 to 310 storing record lengths of 03 to 306 is stored. In addition, variable length records 303 to 30
At the end of 6, a new record symbol is recorded.

第2データ格納手段401は、固定長レコードを格納す
ることを記録するファイル形式記録部402と、複数の
固定長レコード403〜405と、固定長レコード40
3〜405のレコード長の総和を記録するファイル長記
録部406とからなる固定長レコードファイルを格納す
る。
The second data storage means 401 includes a file format recording section 402 that records that fixed-length records are stored, a plurality of fixed-length records 403 to 405, and a fixed-length record 40.
A fixed length record file consisting of a file length recording section 406 that records the sum of record lengths 3 to 405 is stored.

ファイルアクセス手段101は、ファイルに格納されて
いるデータのアクセスを行い、ファイルのデータのアク
セスを始める時点でファイル割付は手段102にファイ
ルの割付けを要求する。また、ファイルアクセス手段1
01は、ファイルのデータのアクセスが終わる時点でフ
ァイル割付は解除手段103にファイルの解放を要求す
る。さらに、ファイルアクセス手段101は、ファイル
のリードおよびライトを行うときにはファイルリード/
ライト手段104にファイルのリードおよびライトを要
求する。
The file access means 101 accesses data stored in a file, and requests the file allocation means 102 to allocate a file at the time it starts accessing the data of the file. In addition, file access means 1
01 requests the file allocation release means 103 to release the file at the time when access to the file data ends. Furthermore, the file access means 101 performs file read/write when reading and writing files.
The write means 104 is requested to read and write the file.

ファイル割付は手段102は、ファイルのデータ処理の
開始時に第1データ格納手段301に格納されている可
変長レコードファイルを固定長レコードファイルのファ
イル形式に変換して第2データ格納手段401に格納す
ることをファイル形式変換手段201に要求し、第2デ
ータ格納手段401に格納された固定長レコードファイ
ルを利用するために固定長レコードファイルの割付は処
理を行う。
The file allocation means 102 converts the variable length record file stored in the first data storage means 301 into a fixed length record file file format and stores it in the second data storage means 401 at the start of file data processing. This request is made to the file format conversion means 201, and processing is performed to allocate the fixed length record file in order to use the fixed length record file stored in the second data storage means 401.

ファイル割付は解除手段103は、ファイルのデータ処
理の終了時に第2データ格納手段401に格納されてい
る固定長レコードファイルを可変長レコードファイルの
ファイル形式に変換して第1データ格納手段301に格
納することをファイル形式変換手段201に要求し、第
2データ格納手段401に格納された固定長レコードフ
ァイルの割付けを解除するために固定長レコードファイ
ルの解放を行う。
The file allocation release means 103 converts the fixed-length record file stored in the second data storage means 401 into a variable-length record file file format at the end of file data processing, and stores it in the first data storage means 301. The fixed length record file is released in order to release the allocation of the fixed length record file stored in the second data storage means 401.

ファイルリード/ライト手段104は、ファイルアクセ
ス手段101からファイルのリード要求を受けると、第
2データ格納手段401に格納されている固定長レコー
ドファイルのファイルアクセス手段101により指定さ
れた位置からデータを読み出し、ファイルアクセス手段
101に通知する。また、ファイルリード/ライト手段
104は、ファイルアクセス手段101からファイルへ
のライト要求を受けると、ファイルアクセス手段101
から受は取ったライトデータを第2データ格納手段40
1に格納されている固定長レコードファイルのファイル
アクセス手段101により指定された位置に書き込む。
Upon receiving a file read request from the file access means 101, the file read/write means 104 reads data from the position specified by the file access means 101 of the fixed length record file stored in the second data storage means 401. , the file access means 101 is notified. Further, when the file read/write unit 104 receives a write request to a file from the file access unit 101, the file read/write unit 104
The write data received from the receiver is stored in the second data storage means 40.
1 to the position specified by the file access means 101 of the fixed-length record file stored in 1.

ファイル形式変換手段201は、ファイルのデータ処理
を開始する時点で、ファイル割付は手段102からの要
求により、第1データ格納手段301に格納されている
可変長レコードファイルから可変長レコード303に格
納されていてレコード長がレコード長格納部307に格
納されている値であるデータと、可変長レコード304
に格納されていてレコード長がレコード長格納部308
に格納されている値であるデータと、可変長レコード3
05に格納されていてレコード長がレコード長格納部3
09に格納されている値であるデータと、可変長レコー
ド306に格納されていてレコード長がレコード長格納
部310に格納されている値であるデータとを読み出し
て連結し、第2データ格納手段401のファイル長記録
部406に連結したデータのレコード長の総和を記録し
、連結したデータを固定長レコード403,404およ
び405に分割して第2データ格納手段401に格納し
、ファイル形式記録部402に固定長レコー・ドが格納
されていることを記録する。また、ファイル形式変換手
段201は、ファイルのデータ処理を終了した時点で、
ファイル割付は解除手段103からの要求により、第2
データ格納手段401に格納されている固定長レコード
ファイルから固定長レコード403.404および40
5に格納されているデータを読み出して連結し、第1デ
ータ格納手段301のファイル形式記録部302に記録
しである可変長レコードファイルのファイル形式に合わ
せてデータを改レコード記号ごとに分割し、第1データ
格納手段301の可変長レコード303,304.30
5および306にそれぞれ格納し、可変長レコード30
3のレコード長をレコード長格納部307に、可変長レ
コード304のレコード長をレコード長格納部308に
、可変長レコード305のレコード長をレコード長格納
部309に、可変長レコード306のデータ長をレコー
ド長格納部310にそれぞれ格納する。
When the file format converting means 201 starts data processing of a file, the file layout is changed from the variable length record file stored in the first data storage means 301 to the variable length record 303 in response to a request from the means 102. data whose record length is the value stored in the record length storage unit 307 and variable length records 304
The record length is stored in the record length storage section 308.
The data that is the value stored in variable length record 3
05 and the record length is record length storage section 3.
09 and the data stored in the variable length record 306 whose record length is the value stored in the record length storage unit 310 are read and concatenated, and the second data storage means The total record length of the concatenated data is recorded in the file length recording section 406 of 401, and the concatenated data is divided into fixed length records 403, 404 and 405 and stored in the second data storage means 401. 402 records that a fixed length record is stored. Furthermore, when the file format conversion means 201 finishes data processing of the file,
The file allocation is performed by the second
Fixed length records 403, 404 and 40 from the fixed length record file stored in the data storage means 401
5 is read out and concatenated, the data is recorded in the file format recording section 302 of the first data storage means 301, and the data is divided for each record change symbol according to the file format of the variable length record file. Variable length records 303, 304.30 of the first data storage means 301
5 and 306, respectively, and variable length records 30
3 in the record length storage section 307, the record length of the variable length record 304 in the record length storage section 308, the record length of the variable length record 305 in the record length storage section 309, and the data length of the variable length record 306 in the record length storage section 309. Each is stored in the record length storage section 310.

次に、このように構成された本実施例のファイル形式の
動的変換方式の動作について、第2図〜第4図を参照し
ながら説明する。
Next, the operation of the file format dynamic conversion method of this embodiment configured as described above will be explained with reference to FIGS. 2 to 4.

第2図は、ファイルのデータ処理を開始する時点のデー
タと要求との動きを示す図である。ファイルアクセス手
段101は、ファイルの利用が要求されると、ファイル
割付は手段102にファイルの割付けを要求する(符号
501参照)。ファイル割付は手段102は、第1デー
タ格納手段301に格納されている可変長レコードファ
イルのファイル形式の変換をファイル形式変換手段20
1に要求する(符号502参照)。ファイル形式変換手
段201は、第1データ格納手段301に格納された可
変長レコードファイルから可変長レコード303,30
4,305および306を読み込み(符号503参照)
、可変長レコードファイルを第2データ格納手段401
のファイル形式記録部402に記録されている固定長レ
コードファイルのファイル形式に変換して、第2データ
格納手段401に書き込む(符号504参照)。詳しく
は、ファイル形式変換手段201は、第1データ格納手
段301に格納されている可変長レコードファイルから
可変長レコード303に格納されていてレコード長がレ
コード長格納部307に格納されている値であるデータ
と、可変長レコード304に格納されていてレコード長
がレコード長格納部308に格納されている値であるデ
ータと、可変長レコード305に格納されていてレコー
ド長がレコード長格納部309に格納されている値であ
るデータと、可変長レコード306に格納されていてレ
コード長がレコード長格納部31Oに格納されている値
であるデータとを読み出して連結し、第2データ格納手
段401のファイル長記録部406に連結したデータの
レコード長の総和を記録し、連結したデータを固定長レ
コード403.404および405に分割して第2デー
タ格納手段401に格納し、ファイル形式記録部402
に固定長レコードが格納されていることを記録する。フ
ァイル形式変換手段201の処理が終わると、ファイル
割付は手段102は、第2データ格納手段401に格納
された固定長レコードファイルを利用するために割り付
ける。
FIG. 2 is a diagram showing the movement of data and requests at the time when file data processing is started. When the file access means 101 is requested to use a file, it requests the file allocation means 102 to allocate the file (see reference numeral 501). The file allocation means 102 converts the file format of the variable length record file stored in the first data storage means 301 using the file format conversion means 20.
1 (see reference numeral 502). The file format conversion means 201 converts variable length records 303 and 30 from the variable length record file stored in the first data storage means 301.
4, Read 305 and 306 (see code 503)
, the variable length record file is stored in the second data storage means 401.
The file format of the fixed-length record file recorded in the file format recording section 402 is converted into the file format of the fixed-length record file, and the file format is written into the second data storage means 401 (see reference numeral 504). Specifically, the file format conversion means 201 converts the variable length record file stored in the first data storage means 301 into the variable length record 303 whose record length is the value stored in the record length storage section 307. Some data is stored in the variable length record 304 and the record length is the value stored in the record length storage unit 308, and data is stored in the variable length record 305 and the record length is the value stored in the record length storage unit 309. The data that is the stored value and the data that is stored in the variable length record 306 and whose record length is the value stored in the record length storage section 31O are read and concatenated, and the data that is the stored value is read and concatenated. The total record length of the concatenated data is recorded in the file length recording section 406, the concatenated data is divided into fixed length records 403, 404 and 405, and stored in the second data storage means 401, and the file format recording section 402
Records that fixed-length records are stored in . When the processing by the file format conversion means 201 is completed, the file allocation means 102 allocates the fixed length record file stored in the second data storage means 401 for use.

第3図は、ファイルのデータ処理を終了する時点のデー
タと要求との動きを示す図である。ファイルアクセス手
段101は、ファイルの解放が要求されると、ファイル
割付は解除手段103にファイルの割付は解除を要求す
る(符号505参照)。ファイル割付は解除手段103
は、第2データ格納手段401に格納されている固定長
レコードファイルのファイル形式の変換をファイル形式
変換手段201に要求する(符号506参照)。
FIG. 3 is a diagram showing the movement of data and requests at the time when data processing of a file ends. When the file access means 101 is requested to release a file, it requests the file allocation release means 103 to release the file allocation (see reference numeral 505). File allocation is released by means 103
requests the file format conversion means 201 to convert the file format of the fixed-length record file stored in the second data storage means 401 (see reference numeral 506).

ファイル形式変換手段201は、第2データ格納手段4
01に格納された固定長レコードファイルから固定長レ
コード403,404および405を読み込み(符号5
07参照)、固定長レコードファイルを第1データ格納
手段301のファイル形式記録部302に記録されてい
る可変長レコードファイルのファイル形式に変換して、
第1デタ格納手段301に書き込む(符号508参照)
The file format conversion means 201 includes the second data storage means 4
Fixed-length records 403, 404, and 405 are read from the fixed-length record file stored in 01 (code 5
07), convert the fixed length record file into the file format of the variable length record file recorded in the file format recording section 302 of the first data storage means 301,
Write to the first data storage means 301 (see reference numeral 508)
.

詳しくは、ファイル形式変換手段201は、第2データ
格納手段401に格納されている固定長レコードファイ
ルから固定長レコード403,404および405に格
納されているデータを読み出して連結し、第1データ格
納手段301のファイル形式記録部302に記録しであ
る可変長レコードファイルのファイル形式に合わせてデ
ータを改レコード記号ごとに分割し、第1データ格納手
段301の可変長レコード303,304.305およ
び306にそれぞれ格納し、可変長レコード303のレ
コード長をレコード長格納部307に、可変長レコード
304のレコード長をレコード長格納部308に、可変
長レコード305のレコド長をレコード長格納部309
に、可変長レコド306のデータ長をレコード長格納部
310にそれぞれ格納する。ファイル形式変換手段20
1の処理が終わると、ファイル割付は解除手段I03は
、第2データ格納手段401に格納されている固定長レ
コードファイルの解放を行う。
Specifically, the file format conversion means 201 reads out and concatenates the data stored in fixed length records 403, 404 and 405 from the fixed length record file stored in the second data storage means 401, and converts the data stored in the first data storage The data is recorded in the file format recording unit 302 of the means 301, and the data is divided for each new record symbol according to the file format of the variable length record file, and the data is divided into variable length records 303, 304, 305 and 306 of the first data storage means 301. The record length of the variable length record 303 is stored in the record length storage section 307, the record length of the variable length record 304 is stored in the record length storage section 308, and the record length of the variable length record 305 is stored in the record length storage section 309.
Then, the data lengths of the variable length records 306 are stored in the record length storage section 310, respectively. File format conversion means 20
1, the file allocation release means I03 releases the fixed length record file stored in the second data storage means 401.

第4図は、ファイルのデータがリード/ライトされてい
る時点のデータと要求との動きを示す図である。ファイ
ルアクセス手段101は、ファイルのリードが要求され
ると、ファイルリード/ライト手段104にファイルか
らのデータのリードを要求する(符号509参照)。フ
ァイルリード/ライト手段104は、ファイルアクセス
手段101からファイルのリード要求を受けると、第2
データ格納手段401に格納されている固定長レコード
ファイルのファイルアクセス手段101により指定され
た位置からデータを読み出し、ファイルアクセス手段1
01に通知する。ファイルアクセス手段101は、ファ
イルリード/ライト手段104から通知されたリードデ
ータを受は取る。
FIG. 4 is a diagram showing the movement of data and requests when file data is being read/written. When the file access means 101 is requested to read a file, it requests the file read/write means 104 to read data from the file (see reference numeral 509). When the file read/write means 104 receives a file read request from the file access means 101, the file read/write means 104 performs a second
Data is read from the position specified by the file access means 101 of the fixed length record file stored in the data storage means 401, and the file access means 1
Notify 01. The file access means 101 receives and receives read data notified from the file read/write means 104.

一方、ファイルアクセス手段101は、ファイルへのラ
イトを要求されると、ファイルへのライト要求とライト
データとをファイルリード/ライト手段104に渡す。
On the other hand, when file access means 101 is requested to write to a file, it passes the file write request and write data to file read/write means 104 .

ファイルリード/ライト手段104は、ファイルアクセ
ス手段101からファイルへのライト要求を受けると、
ファイルアクセス手段101から受は取ったライトデー
タを第2データ格納手段401に格納されている固定長
レコードファイルのファイルアクセス手段101により
指定された位置に書き込む(符号510参照)。
When the file read/write means 104 receives a write request to a file from the file access means 101,
The write data received from the file access means 101 is written to the position specified by the file access means 101 of the fixed length record file stored in the second data storage means 401 (see reference numeral 510).

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、可変長レコードファイル
のデータを高速にアクセスする場合に、ファイルの割付
は処理を行う時点で可変長レコードファイルのファイル
形式を固定長レコードファイルのファイル形式に変換し
、ファイルのデータの処理が終了してファイルの割付け
を解除する時点で固定長レコードのファイル形式を可変
長レコードファイルのファイル形式に変換するようにし
たことにより、ファイルのデータ処理ではデータ処理に
効率の良い固定長レコードファイルのファイル形式でデ
ータをアクセスすることができ、ファイルのデータ処理
の前後に可変長レコードのファイル形式の変換を意識し
て行う必要がなくなるという効果がある。
As explained above, in the case of accessing data in a variable-length record file at high speed, the present invention converts the file format of the variable-length record file to the file format of a fixed-length record file at the time of file allocation processing. By converting the fixed-length record file format to the variable-length record file format when the file data processing is completed and the file is deallocated, file data processing becomes more efficient. Data can be accessed in a fixed-length record file format with good quality, and there is no need to consciously convert the variable-length record file format before or after file data processing.

また、アクセスするファイルが固定長レコードファイル
であるか否かを常に管理する必要がなくなるという効果
がある。
Another advantage is that there is no need to always manage whether the file to be accessed is a fixed-length record file.

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

第1図は本発明の一実施例に係るファイル形式の動的変
換方式の構成を示すブロック図、第2図は本実施例のフ
ァイル形式の動的変換方式におけるファイルのデータ処
理を開始する時点のデータと要求との動きを示す図、 第3図は本実施例のファイル形式の動的変換方式におけ
るファイルのデータ処理を終了する時点のデータと要求
との動きを示す図、 第4図は本実施例のファイル形式の動的変換方式におけ
るファイルのデータがリード/ライトされている時点の
データと要求との動きを示す図である。 図において、 101・・・ファイルアクセス手段、 102・・・ファイル割付は手段、 103・・・ファイル割付は解除手段、104・・・フ
ァイルリード/ライト手段、201・・・ファイル形式
変換手段、 301・・・第1データ格納手段、 302・・・ファイル形式記録部、 303〜306・可変長レコード、 307〜310・レコード長格納部、 401・・・第2データ格納手段、 402・・・ファイル形式記録部、 403〜405・固定長レコード、 406・・・ファイル長記録部である。
FIG. 1 is a block diagram showing the configuration of a dynamic file format conversion method according to an embodiment of the present invention, and FIG. 2 is a point in time when data processing of a file is started in the dynamic file format conversion method of this embodiment. Figure 3 is a diagram showing the movement of data and requests at the time when file data processing is finished in the file format dynamic conversion method of this embodiment. FIG. 6 is a diagram showing the movement of data and requests when file data is being read/written in the file format dynamic conversion method of the present embodiment. In the figure, 101...File access means, 102...File allocation means, 103...File allocation release means, 104...File read/write means, 201...File format conversion means, 301 ... first data storage means, 302 ... file format recording section, 303 - 306 - variable length record, 307 - 310 - record length storage section, 401 ... second data storage means, 402 ... file Format recording section, 403-405 fixed length record, 406... file length recording section.

Claims (1)

【特許請求の範囲】 ファイルのアクセス方式において、 可変長レコード、各可変長レコードのレコード長を記録
するレコード長格納部および可変長レコードを格納して
いることを記録するファイル形式記録部からなる可変長
レコードファイルを格納する第1データ格納手段と、 固定長レコード、固定長レコードのレコード長の総和を
記録するファイル長記録部および固定長レコードを格納
していることを記録するファイル形式記録部からなる固
定長レコードファイルを格納する第2データ格納手段と
、 前記第1データ格納手段に格納されている可変長レコー
ドファイルを固定長レコードファイルのファイル形式に
変換して前記第2データ格納手段に格納したり前記第2
データ格納手段に格納されている固定長レコードファイ
ルを可変長レコードファイルのファイル形式に変換して
前記第1データ格納手段に格納したりするファイル形式
変換手段と、 ファイルのデータをアクセスするファイルアクセス手段
と、 このファイルアクセス手段からのファイルの割付け要求
に基づいて前記ファイル形式変換手段を呼び出して前記
第1データ格納手段に格納されている可変長レコードフ
ァイルを固定長レコードファイルのファイル形式に変換
して前記第2データ格納手段に格納し固定長レコードフ
ァイルの割付けを行うファイル割付け手段と、 前記ファイルアクセス手段からのファイルのリード/ラ
イト要求に基づいて前記第2データ格納手段に格納され
ている固定長レコードファイルのデータをリードおよび
ライトするファイルリード/ライト手段と、 前記ファイルアクセス手段からのファイルの割付け解除
要求に基づいて前記ファイル形式変換手段を呼び出して
前記第2データ格納手段に格納されている固定長レコー
ドファイルを可変長レコードファイルのファイル形式に
変換して前記第1データ格納手段に格納し固定長レコー
ドファイルを解放するファイル割付け解除手段と を有することを特徴とするファイル形式の動的変換方式
[Claims] A file access method comprising a variable length record, a record length storage section for recording the record length of each variable length record, and a file format recording section for recording that the variable length record is stored. A first data storage means for storing a long record file, a fixed length record, a file length recording section for recording the total record length of the fixed length records, and a file format recording section for recording that a fixed length record is stored. a second data storage means for storing a fixed-length record file; converting the variable-length record file stored in the first data storage means into a file format of a fixed-length record file and storing it in the second data storage means; or the second
a file format conversion means for converting a fixed length record file stored in a data storage means into a variable length record file format and storing it in the first data storage means; and a file access means for accessing data in the file. and, based on the file allocation request from the file access means, calls the file format conversion means to convert the variable length record file stored in the first data storage means into a file format of a fixed length record file. a file allocation means for allocating a fixed length record file stored in the second data storage means; and a fixed length record file stored in the second data storage means based on a file read/write request from the file access means. file read/write means for reading and writing data in a record file; A dynamic file format conversion method characterized by comprising a file allocation release means for converting a long record file into a file format of a variable length record file, storing it in the first data storage means, and releasing the fixed length record file. .
JP2123476A 1990-05-14 1990-05-14 Dynamic converting system for file format Pending JPH0421041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2123476A JPH0421041A (en) 1990-05-14 1990-05-14 Dynamic converting system for file format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2123476A JPH0421041A (en) 1990-05-14 1990-05-14 Dynamic converting system for file format

Publications (1)

Publication Number Publication Date
JPH0421041A true JPH0421041A (en) 1992-01-24

Family

ID=14861575

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2123476A Pending JPH0421041A (en) 1990-05-14 1990-05-14 Dynamic converting system for file format

Country Status (1)

Country Link
JP (1) JPH0421041A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5388013A (en) * 1992-03-06 1995-02-07 Mitsubishi Denki Kabushiki Kaisha Data storage format conversion method and system, data access method and access control apparatus
EP0676757A2 (en) * 1994-04-08 1995-10-11 Kabushiki Kaisha Toshiba Recording medium having correlation information that represents correlation between physical sectors and logical sectors, recording method for recording data thereto, and reproducing apparatus thereof
JPH07325740A (en) * 1994-05-31 1995-12-12 Hokkaido Nippon Denki Software Kk Information processor
JPH11296510A (en) * 1998-04-13 1999-10-29 Nec Corp Data converting device
US6587919B2 (en) 1990-09-24 2003-07-01 Emc Corporation System and method for disk mapping and data retrieval
JP2013097388A (en) * 2011-10-27 2013-05-20 Toshiba Corp Data base device and control method for the same

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6587919B2 (en) 1990-09-24 2003-07-01 Emc Corporation System and method for disk mapping and data retrieval
US5388013A (en) * 1992-03-06 1995-02-07 Mitsubishi Denki Kabushiki Kaisha Data storage format conversion method and system, data access method and access control apparatus
EP0676757A2 (en) * 1994-04-08 1995-10-11 Kabushiki Kaisha Toshiba Recording medium having correlation information that represents correlation between physical sectors and logical sectors, recording method for recording data thereto, and reproducing apparatus thereof
EP0676757A3 (en) * 1994-04-08 1997-11-26 Kabushiki Kaisha Toshiba Recording medium having correlation information that represents correlation between physical sectors and logical sectors, recording method for recording data thereto, and reproducing apparatus thereof
JPH07325740A (en) * 1994-05-31 1995-12-12 Hokkaido Nippon Denki Software Kk Information processor
JPH11296510A (en) * 1998-04-13 1999-10-29 Nec Corp Data converting device
JP2013097388A (en) * 2011-10-27 2013-05-20 Toshiba Corp Data base device and control method for the same

Similar Documents

Publication Publication Date Title
US5734892A (en) Efficient method and apparatus for access and storage of compressed data
JPH11191267A (en) Method for allotting disk memory space and memory medium for storing compressed data record
US20030037019A1 (en) Data storage and retrieval apparatus and method of the same
JP4502375B2 (en) File system and control method thereof
JPH0421041A (en) Dynamic converting system for file format
JP2003167679A (en) External storage device, external storage device control method, program, and recording medium
JPH08101783A (en) File system
US20010042167A1 (en) Method of storing data and data storage device using the same
JP3707890B2 (en) Data output method of external storage device
JP2587417B2 (en) File backup and restoration method
JP4251725B2 (en) File management method
JP2546528B2 (en) Variable-length block storage system for fixed-length sector disk
JPH0237443A (en) Main storage management system for electronic computer system
JP2912657B2 (en) File access processor
JP2580998B2 (en) Storage controller
JPH0488440A (en) Data base reorganizing system
JPH0444134A (en) Method and device for control of storage
JPH0581091A (en) Data processor
JP2856091B2 (en) Data output system
JPH03127114A (en) Magnetic disk file dividing and utilizing device
JPS619721A (en) Sector control system of magnetic disk device
JPH0756785A (en) Digital signal recording/reproducing memory
JP2001249834A (en) Information storage system, information storing method and machine readable recording medium having program recorded thereon
JPH08115171A (en) Computer system
JPH01319820A (en) Memory medium control system