JPS6225346A - Electronic journal file constitution system - Google Patents

Electronic journal file constitution system

Info

Publication number
JPS6225346A
JPS6225346A JP60165189A JP16518985A JPS6225346A JP S6225346 A JPS6225346 A JP S6225346A JP 60165189 A JP60165189 A JP 60165189A JP 16518985 A JP16518985 A JP 16518985A JP S6225346 A JPS6225346 A JP S6225346A
Authority
JP
Japan
Prior art keywords
data
journal
file
records
stored
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
JP60165189A
Other languages
Japanese (ja)
Inventor
Hiroko Tsuchiya
裕子 土屋
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 JP60165189A priority Critical patent/JPS6225346A/en
Publication of JPS6225346A publication Critical patent/JPS6225346A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve the use efficiency of a file and to perform retrieval in both directions by storing journal data in a data file in the form of the number of record corresponding to its size and adding information on the number of used records to the head and tail. CONSTITUTION:When one journal is received, the number of records required for the journal is decided, the information on the number of records is added to the head of an unused record in a data file 2 firstly, and journal data are stored successively. In this case, if one record is not enough, succeeding records are used in sequence. When the journal data are all stored, a control code ETX is added behind it and the information on the number of used records is added to the tail of the final record. Further, the relative record number of the head record which is stored this time is stored in the area 1a of a key file 1 as a pointer and its key data is stored in an area 1b.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ジャーナルを磁気ディスク装置或いはフロッ
ピィディスク装置等の記憶装置上に記tσさせて電子ジ
ャーナルファイルを構成する方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for configuring an electronic journal file by recording a journal on a storage device such as a magnetic disk device or a floppy disk device.

電子ジャーナルファイルは各種の分野で作成され使用さ
れている。例えば金融処理システムにおいては、取引先
の入金金額、出金金額、預金の種別、取引日時等のジャ
ーナルが端末からホストコンピュータへ送信された際、
それをファイル管理システムに取込み、磁気ディスク装
置等の記憶装置上に電子ジャーナルファイルを作成する
ことが行なわれている。
Electronic journal files are created and used in various fields. For example, in a financial processing system, when a journal containing the deposit amount, withdrawal amount, type of deposit, transaction date and time, etc. of a customer is sent from a terminal to a host computer,
This information is imported into a file management system and an electronic journal file is created on a storage device such as a magnetic disk device.

〔従来の技術〕[Conventional technology]

従来、このような電子ジャーナルファイルの作成は、ジ
ャーナルデータの最大のものに合わせて1件当たりのレ
コード数を固定にし、順次発生するジャーナルデータを
その固定長の領域に発生順に格納することにより構成し
ていた。これは、作成された電子ジャーナルファイルを
後で処理する場合、一般に先頭のジャーナルデータから
検索する場合と最後のジャーナルデータから順に後戻り
して検索する場合との両方のアクセスの仕方が行なわれ
るが、ジャーナルデータを固定長にしておくことにより
1件分のジャーナルデータの認識が画一化し、そのアク
セスが容易になるためである。
Conventionally, the creation of such electronic journal files was structured by fixing the number of records per record according to the maximum journal data, and storing sequentially generated journal data in the fixed-length area in the order of occurrence. Was. When processing the created electronic journal file later, access is generally performed in two ways: searching from the first journal data and searching backwards from the last journal data. This is because by setting the journal data to a fixed length, recognition of one item of journal data becomes uniform and access to it becomes easier.

(発明が解決しようとする問題点〕 しかしながら、このような従来の方式では、1件当たり
のジャーナルデータの格納領域が固定長であるため、デ
ータの少ない取引きに対しても同じだけの格納領域が必
要となり、ファイルの使用効率が悪くなるという問題点
がある。
(Problem to be solved by the invention) However, in such a conventional method, the storage area for each journal data is a fixed length, so the same amount of storage area is required even for transactions with small amount of data. is required, which poses the problem of poor file usage efficiency.

本発明はこのような従来の問題点を解決したもので、そ
の目的は、先頭のジャーナルデータから最後のジャーナ
ルデータに向かう方向の検索およびその逆方向の検索の
双方の検索が容易に可能であり、然もファイルの使用効
率が良い電子ジャーナルファイルの構成方式を提供する
ことにある。
The present invention solves these conventional problems, and its purpose is to easily perform searches both in the direction from the first journal data to the last journal data and in the opposite direction. However, the object of the present invention is to provide a method for configuring electronic journal files that is efficient in file usage.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上記問題点を解決するために、ジャーナルを記
憶装置上に保有するシステムにおいて、電子ジャーナル
ファイルを、ジャーナルデータを含むデータファイルと
、このデータファイル上のジャーナルデータの位置情報
を含むキーファイルとに区分し、データファイル上のジ
ャーナルデータを格納する領域はそのデータ長に応した
レコード数を有する可変長とし、各ジャーナルデータの
先頭と終端にそのジャーナルデータの使用レコード数を
示す情報を付加する。
In order to solve the above problems, the present invention provides a system that stores journals on a storage device, in which an electronic journal file is divided into a data file containing journal data and a key file containing position information of the journal data on this data file. The area for storing journal data on the data file has a variable length with the number of records corresponding to the data length, and information indicating the number of records used for that journal data is added to the beginning and end of each journal data. do.

〔作用〕[Effect]

ファイルに格納すべきジャーナルが発生すると、そのジ
ャーナルデータはデータファイル上にそのジャーナルデ
ータの大きさに応じたレコード数−で格納され、使用し
たレコード数を示す悄頓がジャーナルデータの先頭と終
端に付加される。また、格納したジャーナルデータのデ
ータファイル上の位置を示す情報がキーファイルに格納
される。
When a journal that should be stored in a file is generated, the journal data is stored in the data file with the number of records according to the size of the journal data, and a record indicating the number of records used is displayed at the beginning and end of the journal data. will be added. Additionally, information indicating the location of the stored journal data on the data file is stored in the key file.

〔実施例〕〔Example〕

第1図は本発明で採用されるファイルの構成例を示す図
である。
FIG. 1 is a diagram showing an example of the structure of a file employed in the present invention.

同図に示すように、本実施例においては、電子ジャーナ
ルファイルは、キーファイル1とデータファイル2とか
ら構成されている。
As shown in the figure, in this embodiment, the electronic journal file is composed of a key file 1 and a data file 2.

この内、データファイル2は、ジャーナルデータを格納
するファイルであり、第1図においては、ジャーナルデ
ータA−Fが格納されている状態を示している。ここで
、各ジャーナルデータA−Fはそのデータ長に応じた個
数のレコード(各レコードは固定長である)を用いて可
変長で格納されており、ジャーナルデータA、C,E、
Fは1個のレコード、ジャーナルデータBは2個のレコ
ード、ジャーナルデータDは3個のレコードを使用して
いる。そして、各ジャーナルデータが格納されている単
−若しくは一連のレコードの先頭と終端にそのレコード
数を示す情報が付加されている。
Among these, data file 2 is a file that stores journal data, and FIG. 1 shows a state in which journal data A to F are stored. Here, each journal data A to F is stored in a variable length using the number of records (each record is fixed length) according to the data length, and the journal data A, C, E,
F uses one record, journal data B uses two records, and journal data D uses three records. Information indicating the number of records is added to the beginning and end of a single record or a series of records in which each journal data is stored.

なお、各ジャーナルデータの最後に付加されたETXは
ジャーナルデータの最後を示す制御コードであり、ET
Xの後にある空白部分にはジャーナルデータが記憶され
ていないことを示している。
Note that ETX added at the end of each journal data is a control code indicating the end of journal data, and ETX is a control code that indicates the end of journal data.
The blank space after the X indicates that no journal data is stored.

また、キーファイル1は、ジャーナルデータがデータフ
ァイル2上のどの位置に格納されているかを示すポイン
タを格納する領域1aと、キーデータを格納する領域1
bとを含む情報ファイルである。ポインタのイ直として
は例えばジャーナルデータが格納される先頭レコードの
相対レコード番号が格納され、第1図では、ジャーナル
A、  C。
The key file 1 also includes an area 1a that stores a pointer indicating where journal data is stored on the data file 2, and an area 1 that stores key data.
This is an information file containing b. For example, the relative record number of the first record in which journal data is stored is stored as the pointer, and in FIG. 1, journals A and C are stored.

E、  Fの相対レコード番号が格納されている状態の
みを示す。
Only the state in which relative record numbers of E and F are stored is shown.

第2図は本発明を実施する装置の一例を示す概略構成図
であり、10は演算処理装置、11はメインメモリ、1
2はファイルが格納される磁気ディスク装置、13は回
線制御装置、14は図示しないワークステーションに接
続された回線、15はキーボードやCRTを有する入出
力装置である。ワークステーションから送られたジャー
ナルは回線14を経由して回線制御装置13で受信され
、メインメモリ11に格納された処理プログラムで動作
する演算処理装置10により磁気ディスク装置12のフ
ァイルに格納される。また、磁気ディスク装置12に格
納されたファイルは演算処理装置10によって処理され
る。
FIG. 2 is a schematic configuration diagram showing an example of an apparatus for implementing the present invention, in which 10 is an arithmetic processing unit, 11 is a main memory, 1
2 is a magnetic disk device in which files are stored; 13 is a line control device; 14 is a line connected to a workstation (not shown); and 15 is an input/output device having a keyboard or CRT. The journal sent from the workstation is received by the line control device 13 via the line 14, and stored in a file on the magnetic disk device 12 by the arithmetic processing unit 10, which operates on a processing program stored in the main memory 11. Further, files stored in the magnetic disk device 12 are processed by the arithmetic processing unit 10.

第2図において、一つのジャーナルが回kJA14を経
由して受信されると、演算処理装置10は、そのジャー
ナルに必要なレコード数を判別し、先ず磁気ディスク装
置12上に形成した第1図のデータファイル2における
使用レコードの次の未使用のレコードの先頭にそのレコ
ード数を示す情報を付加し、次いでその後ろからジャー
ナルデータを順次格納していく。この場合、1個のレコ
ードで足りない場合は順次後続のレコー)′を使用して
いく。
In FIG. 2, when one journal is received via the circuit kJA 14, the arithmetic processing unit 10 determines the number of records required for that journal, and first records the number of records in FIG. Information indicating the number of records is added to the beginning of the unused record following the used record in the data file 2, and then journal data is sequentially stored from behind. In this case, if one record is insufficient, subsequent records )' are used in sequence.

ジャーナルデータを全て格納すると、その後ろにETX
の制御コードを付け、最後のレコードの終端に再び使用
レコード数を示す情報を付加する。
When all journal data is stored, ETX is stored behind it.
control code is added, and information indicating the number of records used is added again to the end of the last record.

また、演算処理装置10は今回のジャーナルデータを格
納した先頭レコードの相対レコード番号をポインタとし
てキーファイル1の領域1aに格納し、そのキーデータ
を領域ibに格納する。なお、当初は領域1bにダミー
データを格納し、後にキーデータを格納するようにして
も良い。以上のような処理は、ジャーナルデータが受信
される毎に行なわれ、第1図に示したようなファイルが
構成される。
Further, the processing unit 10 stores the relative record number of the first record storing the current journal data as a pointer in the area 1a of the key file 1, and stores the key data in the area ib. Note that dummy data may be initially stored in the area 1b, and key data may be stored later. The above processing is performed every time journal data is received, and a file as shown in FIG. 1 is constructed.

磁気ディスク装置12に格納された電子ジャーナルファ
イルを検索し処理する場合、本実施例では最初のジャー
ナルデータから最後のジャーナルデータに向かう方向の
シーケンシャルアクセス方式と、その逆のシーケンシャ
ルアクセス方式と、更にキーファイルlを使用したラン
ダムアクセス方式とが可能である。ランダムアクセス方
式では、例えば入力されたキーデータと一致するキーデ
ータを存するジャーナルデータのポインタをキーファイ
ル1から読出し、そのポインタが指示する相対レコード
番号のレコードよりレコード数指定情報で示される個数
のレコードだけを読取ることで、1件分のジャーナルデ
ータを取り出すことができる。また、順方向のシーケン
シャルアクセス方式では、先頭のレコード数情報により
そのジャーナルデータの使用レコード数が分かるので、
そのレコード数だけ読込むことで1件分のジャーナルデ
ータを得る。
When searching and processing electronic journal files stored in the magnetic disk device 12, this embodiment uses a sequential access method in the direction from the first journal data to the last journal data, a sequential access method in the reverse direction, and a key method. A random access method using file l is possible. In the random access method, for example, a pointer to journal data containing key data that matches the input key data is read from key file 1, and the number of records indicated by the record number specification information is read from the record with the relative record number pointed to by the pointer. By reading only the journal data, one item of journal data can be retrieved. In addition, in the forward sequential access method, the number of records used in the journal data can be determined from the record count information at the beginning.
By reading that number of records, journal data for one item is obtained.

更に、若し、ジャーナルデータの終端に使用レコード数
情報を付加しないと、例えばファイルの最後に書込まれ
たファイルエンドマークを識別してファイルの終端を検
出しても、ジャーナルデータが可変長であることからど
れだけ後戻りすれば1件分のジャーナルデータの先頭が
現れるか分からず、逆方向のシーケンシャルアクセスは
困難となる。しかし、本発明では各ジャーナルデータの
使用レコード数がジャーナルデータの終端にも人力され
ているので、最終レコードから順にアクセスしても1件
のジャーナルデータの使用レコード数が分かり、例えば
使用レコード数が「3」である場合は、ファイルエンド
マークから3レコード前に1件分のジャーナルデータが
あることが識別できる。従って、1回のアクセスで自動
的に3レコ一ド分のデータを読込み、1件のジャーナル
データとして制御することができ、ジャーナルデータの
アクセスはデータ長を認識せずに行なうことができる。
Furthermore, if information on the number of used records is not added to the end of journal data, even if the end of the file is detected by identifying the file end mark written at the end of the file, for example, the journal data will be of variable length. For this reason, it is difficult to know how far back it will take to find the beginning of one journal data item, making reverse sequential access difficult. However, in the present invention, the number of used records for each journal data is also manually entered at the end of the journal data, so even if the records are accessed sequentially from the last record, the number of used records for one piece of journal data can be known. If it is "3", it can be identified that there is one piece of journal data three records before the file end mark. Therefore, data for one record of three records can be automatically read in one access and controlled as one journal data, and journal data can be accessed without recognizing the data length.

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

以上説明したように、本発明は、電子ジャーナルファイ
ルをキーファイルとデータファイルに分けて保有し、デ
ータファイルのツヤ−ナルデータ長を可変長にしたので
、ファイルの使用効率を向上することができる。また、
各ジャーナルデータが格納されているデータファイル上
の位置を記憶するキーファイルを設けたのでランダムア
クセスが可能となり、更にジャーナルデータの先頭と終
端にそのジャーナルデータの使用レコード数を付加した
ので、先頭のジャーナルデータから最後のジャーナルデ
ータに向かう方向の検索およびその逆方向の検索の双方
の検索が容易に行なえるという効果がある。
As explained above, in the present invention, the electronic journal file is stored separately into the key file and the data file, and the data file's glossary data length is made variable, so that file usage efficiency can be improved. . Also,
A key file was set up to memorize the position in the data file where each journal data is stored, making random access possible.Furthermore, the number of used records of the journal data was added to the beginning and end of the journal data, so the beginning This has the effect that searches can be easily performed both in the direction from journal data to the last journal data and in the opposite direction.

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

第1図は本発明の電子ジャーナルファイルの構成方式で
採用されるファイルの構成例を示す図および、 第2図は本発明を実施する装置の概略構成図である。 図において、lはキーファイル、2はデータファイルで
ある。 本発明′?採用するファイルの植成@lを示す面木発明
を実施する装置の概略構成図 第2図
FIG. 1 is a diagram showing an example of a file configuration adopted in the electronic journal file configuration method of the present invention, and FIG. 2 is a schematic configuration diagram of an apparatus implementing the present invention. In the figure, l is a key file and 2 is a data file. The present invention'? Figure 2 is a schematic configuration diagram of a device that implements the Mengi invention showing the planting of files to be adopted.

Claims (1)

【特許請求の範囲】 ジャーナルを記憶装置上に保有するシステムにおいて、 電子ジャーナルファイルを、ジャーナルデータを含むデ
ータファイルと、該データファイル上のジャーナルデー
タの位置情報を含むキーファイルとに区分し、且つ、前
記データファイル上のジャーナルデータを格納する領域
をそのデータ長に応じたレコード数を有する可変長とし
、各ジャーナルデータの先頭と終端にそのジャーナルデ
ータの使用レコード数を示す情報を付加した構成にする
ことを特徴とする電子ジャーナルファイル構成方式。
[Claims] In a system that holds journals on a storage device, an electronic journal file is divided into a data file containing journal data and a key file containing position information of journal data on the data file, and , the area for storing journal data on the data file has a variable length having a number of records according to the data length, and information indicating the number of records used for the journal data is added to the beginning and end of each journal data. An electronic journal file configuration method characterized by:
JP60165189A 1985-07-25 1985-07-25 Electronic journal file constitution system Pending JPS6225346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60165189A JPS6225346A (en) 1985-07-25 1985-07-25 Electronic journal file constitution system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60165189A JPS6225346A (en) 1985-07-25 1985-07-25 Electronic journal file constitution system

Publications (1)

Publication Number Publication Date
JPS6225346A true JPS6225346A (en) 1987-02-03

Family

ID=15807527

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60165189A Pending JPS6225346A (en) 1985-07-25 1985-07-25 Electronic journal file constitution system

Country Status (1)

Country Link
JP (1) JPS6225346A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5386892A (en) * 1992-09-18 1995-02-07 Tokico, Ltd. Hydraulic shock absorber with shutters
JP2009134609A (en) * 2007-11-30 2009-06-18 Seiko Epson Corp Variable length data storage device, variable length data storage method, variable length data reading method, and program for the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5386892A (en) * 1992-09-18 1995-02-07 Tokico, Ltd. Hydraulic shock absorber with shutters
JP2009134609A (en) * 2007-11-30 2009-06-18 Seiko Epson Corp Variable length data storage device, variable length data storage method, variable length data reading method, and program for the same

Similar Documents

Publication Publication Date Title
US5774716A (en) Computer program product to enable multiple computer systems to share single sequential log
US6088705A (en) Method and apparatus for loading data into a database in a multiprocessor environment
JP2854636B2 (en) Apparatus and method for issuing portable medium
EP0326162B1 (en) Data base system including memorandum information and method for managing memorandum information
EP0575066A2 (en) Error handling in a state-free system
Langdon Jr A note on associative processors for data management
JPS6225346A (en) Electronic journal file constitution system
CN102906740A (en) Method and system for compressing data records and for processing compressed data records
US5706512A (en) Computer program product for queuing and retrieving data objects to and from a shared storage medium
JPS6132695B2 (en)
JPS61256442A (en) Method for increasing record retrieving speed
JP2822869B2 (en) Library file management device
JP2604787B2 (en) Two-dimensional data storage method
JP2615046B2 (en) Record addition processing method
JP2858798B2 (en) Pseudo variable length storage of bibliographic information
JP2895892B2 (en) Data processing device
JPH02202647A (en) File input device
JP2852253B2 (en) Data retrieval device
JPH04250568A (en) Record retrieval device
JPH09106364A (en) Information controlling method and device therefor
JPS63208126A (en) List processor
JPH02257282A (en) Table preparation processor
JPH06274399A (en) Information recorder
JPH01255924A (en) Directory memory access control device
JPS61175725A (en) Storing system for seal impression file