JPS61224049A - Access control system of indexed sequential file - Google Patents

Access control system of indexed sequential file

Info

Publication number
JPS61224049A
JPS61224049A JP60065812A JP6581285A JPS61224049A JP S61224049 A JPS61224049 A JP S61224049A JP 60065812 A JP60065812 A JP 60065812A JP 6581285 A JP6581285 A JP 6581285A JP S61224049 A JPS61224049 A JP S61224049A
Authority
JP
Japan
Prior art keywords
access
sequential
key value
file
pointer
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
JP60065812A
Other languages
Japanese (ja)
Inventor
Satoru Arai
悟 荒井
Wataru Ishiguro
石黒 渉
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.)
Usac Electronic Ind Co Ltd
Original Assignee
Usac Electronic Ind 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 Usac Electronic Ind Co Ltd filed Critical Usac Electronic Ind Co Ltd
Priority to JP60065812A priority Critical patent/JPS61224049A/en
Publication of JPS61224049A publication Critical patent/JPS61224049A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To make the operation of indication to a former position unnecessary and to improve the processing efficiency by restoring the former sequential access call point to restart sequential access simultaneously with the end of an additional control when sequential access call is interrupted to perform the additional control. CONSTITUTION:A key value of a record in a file device 3 accessed by an access position control part 7 is set to a pointer 11 of an indexed sequential file access control part 2 of a processor 1. Contents of the pointer 11 are increased by +1 by a computing element 12 to read the continuous key value to a call control part 8 unless an instruction which designates a discontinuous key position is issued. When a command decoding part 6 detects an addition command, sequential access of the control part 7 is interrupted by an addition control part 9. The next access position of sequential access of the pointed 11 and its related information are saved in a work area 14 of a main memory 13, and a key value of an additional position is set to the pointer 11, and the saved key value is restored in the pointer 11 to restart access control when the addition processing is terminated.

Description

【発明の詳細な説明】 〔概要〕 索引順編成ファイルに対して、順アクセスと乱アクセス
を自動的に切り分は実行する制御手段を設け、混合アク
セスにおける操作手順を簡単化する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] A control means is provided to automatically separate sequential access and random access to an indexed sequential file, thereby simplifying the operating procedure in mixed access.

〔産業上の利用分野〕[Industrial application field]

本発明は、データ処理システムにおけるファイル管理方
式に関するものであり、特に索引順編成ファイルの効率
的なアクセス制御方式に関する。
The present invention relates to a file management method in a data processing system, and particularly to an efficient access control method for indexed sequential files.

〔従来の技術〕[Conventional technology]

索引順編成ファイル(あるいは多重索引編成ファイル)
は、キー順に配列された多レベルの索引とデータレコー
ドとによって構成され、順アクセスと乱アクセスのいず
れも可能であるという特徴をもっている。
Indexed sequential file (or multiple indexed file)
It consists of multi-level indexes and data records arranged in key order, and has the feature that both sequential access and random access are possible.

ところで、一般に索引順編成ファイルの処理では、一部
のレコードを順アクセスしたり、順アクセスの途中で不
連続のキー位置のレコードをアクセスするなど、順アク
セスと乱アクセスとが入り混じって行われる場合が多い
。しかし従来は、このような場合、順アクセスと乱アク
セスとはそれぞれ独立した処理として行われていた。次
に具体例を用いて説期する。
By the way, in general, when processing an indexed sequential file, a mixture of sequential access and random access is performed, such as sequentially accessing some records or accessing records at discontinuous key positions during sequential access. There are many cases. However, conventionally, in such cases, sequential access and random access have been performed as independent processes. Next, I will explain using a concrete example.

第4図は、ファイル構成の簡単な例を示したものである
。索引ファイルおよびデータファイルで構成され、キー
値工ないし11をもつレコードが配列されているもので
ある。なお2図(a)、(b)はそれぞれ後述する追加
処理前および処理後のファイルの状態を示す。
FIG. 4 shows a simple example of the file structure. It consists of an index file and a data file, and records with key values 1 to 11 are arranged. Note that FIGS. 2(a) and 2(b) show the state of the file before and after additional processing, which will be described later, respectively.

ここで第4図(a)のファイルを用いて、たとえばキー
値1,2.3のレコードとキー値4.5等のレコードの
各順アクセス処理の間に、キー値8のレコードを追加す
る処理を行う例の従来方式による制御手順は、第5図の
フローに示すようになる。
Here, using the file shown in Figure 4(a), for example, add a record with a key value of 8 between sequential access processing of records with key values 1, 2.3 and records with key value 4.5, etc. The control procedure according to the conventional method as an example of processing is shown in the flowchart of FIG.

まず、ステップ■、■、■で、ファイル先頭からキー値
1,2.3をもつレコードに順アクセスして、読み込み
、ステップ■では一旦順アクセス処理を終了する。次に
ステップ■でキー値8のレコードを追加し、第4図(b
)に示すファイル状態とするステップ■で再び順アクセ
スを開始するため元の終了位置の次のキー値4のレコー
ドに位置付けする乱アクセスを行い、ステップ■で位置
づけたキー値4のレコードを読み込む順アクセスを行い
、以後はステップ■で示すように順アクセスを進める。
First, in steps (2), (2), and (2), records with key values 1, 2.3 are sequentially accessed and read from the beginning of the file, and in step (2), the sequential access processing is temporarily terminated. Next, in step ■, add a record with key value 8, and
) In order to start sequential access again in step ■, the file state is set to the file state shown in ), random access is performed to position the record with key value 4 next to the original end position, and the order in which the record with key value 4 positioned in step ■ is read. The access is performed, and thereafter, the access is performed sequentially as shown in step (■).

すなわち、このように順アクセス−乱アクセス−順アク
セスを繰り返す場合には、順アクセスから乱アクセスへ
移る過程で順アクセスを終了させる指示を行い、また後
で、先に終了した位置から順アクセスを再開する場合に
は、利用者がその終了した位置を覚えておいて、最初の
レコード位置として指定する指示が必要であった。
In other words, when repeating sequential access - random access - sequential access in this way, an instruction is given to end the sequential access in the process of transitioning from sequential access to random access, and later, sequential access is started from the position where it ended earlier. When restarting, the user had to remember the position where it ended and instruct it to specify it as the first record position.

また特別の指示がない限り9次のレコードは。Also, unless there are special instructions, the 9th record.

順アクセスで呼び出されるが、順アク易スの終了指示が
ない場合には、乱アクセスによる呼び出しあるいは追加
の処理を行うことができなかった。
Although it is called by sequential access, if there is no instruction to end the sequential access, it is impossible to call by random access or perform additional processing.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

索引順編成ファイルに対する従来のアクセス制御方式で
は、上記したように、順アクセスと乱アクセスとは別の
アクセス、制御として区別され、この切り分けを、順ア
クセスの終了指示、追加の指示、特定の位置付は指示に
よって行っていた。
In the conventional access control method for indexed sequential files, as mentioned above, sequential access and random access are distinguished as separate access and control, and this separation is done by using sequential access termination instructions, additional instructions, and specific position Attachment was done according to instructions.

このため、順アクセス中に乱アクセスが頻繁に生じるよ
うな処理では、操作が煩雑となり、誤りも起り易く、利
用者の負担が大きいという問題があったφ 〔問題点を解決するための手段〕 本発明は、上記した従来方式の問題点を解決するため、
順アクセスと乱アクセスを1次に処理すべきキー値とし
て指定された値を識別して切り分け、また順アクセスの
途中で追加の処理を行う場合には順アクセスを復旧可能
に一時中断して対応するアクセス制御を行うようにした
ものである。
Therefore, in processes where random access frequently occurs during sequential access, there is a problem that operations are complicated, errors are likely to occur, and the burden on the user is heavy. [Means for solving the problem] The present invention solves the problems of the conventional method described above.
Identifies and separates the value specified as the key value that should be processed as the primary process for sequential access and random access, and when performing additional processing during sequential access, temporarily suspends sequential access so that it can be recovered. It is designed to perform access control.

第1図は2本発明方式によるデータ処理システムの原理
的構成を例示的に示したものである。図において、1は
処理装置、2は索引順ファイルアクセス制御部、3はフ
ァイル装置、4は索引順ファイル、5はディスプレイ端
末装置、10は処理プログラムを表している。
FIG. 1 exemplarily shows the basic configuration of a data processing system based on two methods of the present invention. In the figure, 1 is a processing device, 2 is an index sequential file access control unit, 3 is a file device, 4 is an index sequential file, 5 is a display terminal device, and 10 is a processing program.

処理装置1において、索引順ファイルアクセス処理部2
は、ファイル装置3の索引順ファイル4を対象に、利用
者がディスプレイ端末装置5から与える指示にしたがっ
て、処理プログラム10が処理装置1にマクロ命令を発
行してアクセス制御を行う。
In the processing device 1, an index order file access processing section 2
The processing program 10 issues macro commands to the processing device 1 to control access to the index-ordered file 4 of the file device 3 in accordance with instructions given by the user from the display terminal device 5.

アクセス制御は、データの呼び出し、追加の各機能に分
かれている。
Access control is divided into data recall and additional functions.

データの呼び出し制御の場合、ディスプレイ端末装置5
から指示された先頭キー値に基づいて。
In the case of data call control, the display terminal device 5
Based on the leading key value indicated by.

アクセスすべき順次のキー値を連続して発生し。Generate sequential key values to be accessed in succession.

特別に次のキー値が指定されているとき、順アクセスか
ら乱アクセスへ移行し、また追加が指示されているとき
、順アクセスを一時中断し、指示された追加の処理の終
了により再開する。
When the next key value is specially specified, the sequential access shifts to random access, and when an addition is instructed, the sequential access is temporarily interrupted and restarted when the instructed addition processing is completed.

順アクセスの場合は前のキー値を1つ進め、乱アクセス
の場合は、入力されたキー値を使用してポインタ設定を
行う。
In the case of sequential access, the previous key value is advanced by one, and in the case of random access, the pointer is set using the input key value.

順アクセス呼び出しを中断して追加の制御を行った場合
には、その終了とともに元の順アクセス呼び出しの中断
点を復元し、順アクセスを再開する。
When a sequential access call is interrupted to perform additional control, upon completion, the original interruption point of the sequential access call is restored and the sequential access is resumed.

〔作用〕[Effect]

本発明方式の作用を、第3図のフローで示される具体例
を用いて説明する。第3図のフローは。
The operation of the system of the present invention will be explained using a specific example shown in the flowchart of FIG. The flow in Figure 3 is as follows.

第4図のファイルを対象にアクセスした第4図の従来方
式のフローに対応するものである。
This corresponds to the flow of the conventional method shown in FIG. 4 in which the file shown in FIG. 4 is accessed.

ステップ■でファイルの先頭のキー値■のレコードを読
み込む。
In step ■, read the record with key value ■ at the beginning of the file.

ステップ■および■では順アクセスの読み込み命令が発
行されているため、順アクセスと判定しキー値2および
3のレコードを順次読み込む。
In steps (2) and (2), since a read command for sequential access has been issued, it is determined that the access is sequential, and the records with key values 2 and 3 are sequentially read.

ステップ■、■でキー値8のレコードを追加す   ′
るが、このとき直前のキー値3の次のキー値4を退避し
て順アクセスを中断し、レコードの追加制御を行う。
Add a record with key value 8 in steps ■ and ■ ′
However, at this time, the key value 4 following the previous key value 3 is saved, the sequential access is interrupted, and record addition control is performed.

ステップ■、■では、ステップ■の追加制御の終了を識
別し、先に退避したキー値4を復元してそのレコードを
読み込む。
In steps (2) and (2), the end of the additional control in step (2) is identified, the previously saved key value 4 is restored, and the record thereof is read.

ステップ■では、順アクセスの読み込み命令が発行され
ているため順アクセスによる呼び出し制御が続行される
In step (2), since a read instruction for sequential access has been issued, call control using sequential access is continued.

このようにして、追加処理が自動的に識別されると順ア
クセスが中断され、そして追加処理を行った後、自動的
に順アクセスが元の位置から続行される。
In this way, sequential access is interrupted when additional processing is automatically identified, and sequential access is automatically continued from the original position after performing the additional processing.

〔実施例〕〔Example〕

第3図は2本発明の1実施例システム゛の構成を示した
ものである。
FIG. 3 shows the configuration of a system according to an embodiment of the present invention.

第3図において、1は処理装置、2は索引順ファイルア
クセス制御部、3はファイル装置、4は索引順ファイル
、5はディスプレイ端末装置、6はコマンド解析部、7
はアクセス位置制御部、8は呼び出し制御部、9は追加
制御部、10は処理プログラム、11はポインタ、12
は演yt器、  13は主メモリ、14は作業領域を表
す。
In FIG. 3, 1 is a processing device, 2 is an index sequential file access control section, 3 is a file device, 4 is an index sequential file, 5 is a display terminal device, 6 is a command analysis section, 7
is an access position control unit, 8 is a call control unit, 9 is an additional control unit, 10 is a processing program, 11 is a pointer, 12
13 represents a main memory, and 14 represents a work area.

コマンド解析部6は、利用者がディスプレイ端末装置5
から入力し、処理プログラム10が発行した呼び出し、
追加のコマンドや、キー値、データ等を識別し、対応す
る制御部を起動し、キー値。
The command analysis unit 6 allows the user to use the display terminal device 5.
a call input from and issued by the processing program 10;
Identify additional commands, key values, data, etc. and activate the corresponding control unit, key value.

データ等を転送する。Transfer data etc.

アクセス位置制御部7は、アクセス位置(キー値)の無
指定の順読み込み命令の発行時においては、アクセスす
べき索引順ファイル4の先頭キー値を、ポインタ11に
設定しく演算器12はこの場合スルーとなる)、呼び出
し制御部8により。
When issuing a sequential read command without specifying an access position (key value), the access position control unit 7 sets the first key value of the index sequential file 4 to be accessed in the pointer 11. ), by the call control unit 8.

先頭キー値のレコードを読み込ませる。Read the record with the first key value.

アクセス位置制御部7は、以後、特に不連続のキー位置
を指定した乱読み込み命令が発行されない限り、演算器
12を用いて、アクセスごとにポインタ11の値を+L
L、呼び出し制御部8に連続するキー値のレコードを読
み込ませる。すなわち順アクセスを行う。しかし、アク
セス位置制御部7は9次のキー値として、ポインタ11
の値とは異なる不連続のキー値が指定された乱読み込み
命令が発行されている場合には、そのキー値を用いてポ
インタ11の値を更新し、以後順読み込み命令の発行時
は同様にポインタ値を+1しながら順アクセスを行う。
From now on, the access position control unit 7 uses the arithmetic unit 12 to increase the value of the pointer 11 by +L for each access, unless a random read command specifying a discontinuous key position is issued.
L. Causes the call control unit 8 to read consecutive key value records. In other words, sequential access is performed. However, the access position control unit 7 uses the pointer 11 as the ninth key value.
If a random read instruction has been issued that specifies a discontinuous key value different from the value of Perform sequential access while increasing the pointer value by 1.

また、コマンド解、析部6がデータの追加コマンドを検
出したときには、追加制御部9が起動されるが、たとえ
ば追加制御部9が起動された場合には、追加制御部9は
、アクセス位置制御部7の順アクセス制御を中断させ、
ポインタ11の値、すなわち順アクセスの場合の次のア
クセス位置を示すキー値および関連制御情報を作業領域
14に退避し2代わりに、追加位置として指定されてい
るキー値をポインタ11に設定し、所定の追加処理を実
行する。
Further, when the command analysis unit 6 detects a data addition command, the additional control unit 9 is activated. For example, when the additional control unit 9 is activated, the additional control unit 9 controls the access position control. interrupting the sequential access control of section 7;
2. Save the value of the pointer 11, that is, the key value indicating the next access position in the case of sequential access, and related control information to the work area 14, and instead set the key value specified as the additional position to the pointer 11, Execute predetermined additional processing.

そして追加処理を終了したとき、退避しておいたキー値
をポインタ11に復元し、アクセス位置制御部7に対し
て、順アクセス制御を再開させる。
When the addition process is finished, the saved key value is restored to the pointer 11, and the access position control unit 7 is caused to resume sequential access control.

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

以上のように本発明は、索引順編成ファイルのアクセス
制御において、順アクセス制御時に次のキー値として不
連続のキー値を指定するだけで乱アクセスを行うことが
でき、また追加の要求があった場合には、順アクセス制
御を中断して追加を行い、その終了により自動的に元の
中断位置から順アクセス動作を再開するため、従来の方
式のように、順アクセスの終了指示や、順アクセス再開
のための元の位置を指示する操作が不要となり。
As described above, in access control of indexed sequential files, the present invention allows random access to be performed simply by specifying a discontinuous key value as the next key value during sequential access control, and does not require additional requests. If the sequential access control is interrupted, the addition is performed, and the sequential access operation is automatically restarted from the original interrupted position when the sequential access control is terminated. There is no need to specify the original location to resume access.

利用者の操作が簡単化され、処理効率が向上する。User operations are simplified and processing efficiency is improved.

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

第1図は零発、明の原理的構成図、第2図は本発明方式
の制御手順を示すフロー図、第3図は本発明方式の1実
施例システムの構成図、第4図はフッイル構成の1例を
示す説明図、第5図は従来方式の制御手順を示すフロー
図である。 第1図において。 1は処理装置。 2は索引順ファイルアクセス制御部。 3はファイル装置。 4は索引順ファイル。 5はディスプレイ端末装置。 10は処理プログラム を示す。 特許出願人  ユーザンク電子工業株式会社代理人弁理
士 長谷用 文廣(外2名)ンnに明オ1−クツ歌列を
白う横方に 第 1 図 、Ua#1才式゛9臭を壺4多・1システbqdl戚゛
(4J−〜1 7アイ1しめ1#R液リ タ64 因
Fig. 1 is a diagram showing the basic configuration of the zero invention, Fig. 2 is a flow diagram showing the control procedure of the method of the present invention, Fig. 3 is a block diagram of an embodiment of the system of the method of the present invention, and Fig. 4 is a diagram of the system according to the present invention. An explanatory diagram showing an example of the configuration, FIG. 5 is a flow diagram showing the control procedure of the conventional system. In FIG. 1 is a processing device. 2 is an index sequential file access control unit. 3 is a file device. 4 is an index sequential file. 5 is a display terminal device. 10 indicates a processing program. Patent applicant Fumihiro Hase (2 others), Patent attorney representing Yusank Electronics Industry Co., Ltd. Bottle 4 multi-system bqdl relation (4J-~1 7 eye 1 tighten 1 #R liquid retarder 64

Claims (1)

【特許請求の範囲】 索引順編成ファイルと索引順編成ファイルアクセス制御
部とを有するデータ処理システムにおいて、 上記索引順編成ファイルアクセス制御部は、索引順編成
ファイル内のアクセスすべきレコードのキー値を設定さ
れるポインタと、順アクセス呼び出し処理時に、上記ポ
インタにアクセスごとに順次のキー値を設定する手段と
、次にアクセスすべきレコードのキー値として順アクセ
スによる順次のキー値と異なるキー値が指定された場合
には、その指定されたキー値をポインタに設定する手段
と、追加の処理が指示された場合には、順アクセス制御
を中断して、指示された追加の処理を実行し、その処理
が終了したとき、上記中断した順アクセス制御を中断し
たキー値から再開させる手段とをそなえていることを特
徴とする索引順編成ファイルのアクセス制御方式。
[Scope of Claims] In a data processing system having an indexed sequential file and an indexed sequential file access control unit, the indexed sequential file access control unit controls the key value of the record to be accessed in the indexed sequential file. A pointer to be set, a means for setting a sequential key value to the above pointer for each access during sequential access call processing, and a key value that is different from the sequential key value due to sequential access as the key value of the next record to be accessed. If specified, means for setting the specified key value in a pointer, and if additional processing is specified, interrupting sequential access control and executing the specified additional processing, An access control method for an indexed sequential file, comprising means for restarting the interrupted sequential access control from the interrupted key value when the processing is completed.
JP60065812A 1985-03-29 1985-03-29 Access control system of indexed sequential file Pending JPS61224049A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60065812A JPS61224049A (en) 1985-03-29 1985-03-29 Access control system of indexed sequential file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60065812A JPS61224049A (en) 1985-03-29 1985-03-29 Access control system of indexed sequential file

Publications (1)

Publication Number Publication Date
JPS61224049A true JPS61224049A (en) 1986-10-04

Family

ID=13297810

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60065812A Pending JPS61224049A (en) 1985-03-29 1985-03-29 Access control system of indexed sequential file

Country Status (1)

Country Link
JP (1) JPS61224049A (en)

Similar Documents

Publication Publication Date Title
JPS61224049A (en) Access control system of indexed sequential file
JPH027096B2 (en)
JPH0219494B2 (en)
JPH0462093B2 (en)
JPH0679283B2 (en) Interruption processing control method
JPH0531193B2 (en)
JPH06103110A (en) Breakpoint setting system
JPH02118726A (en) Job performance control system
JP3471388B2 (en) Auxiliary processing unit
JPS6370362A (en) Command intermission restart system in time sharing system
JPS5917640A (en) Method for interrupting respondence
JPS61255440A (en) Program interruption control system
JPS61241843A (en) Information processor
JPH06266630A (en) Input/output controller with trace function
JPH04257916A (en) Data output processing system
JPH0391016A (en) Unequivocal number management system for continuous operation system
JPS6170653A (en) Interruption control system between processors
JPH0417453B2 (en)
JPH03164924A (en) Magnetic disk access system
JPH01142853A (en) Tss command processing system
JPS62185291A (en) Magnetic tape positioning control system
JPH02101562A (en) Interruption and restart control system
JPS63316148A (en) History control system
JPH0675608A (en) Monitoring device for programmable controller
JPH0695917A (en) Method for specifying execution interrupting point