JPH0764839A - Information processor with file management function - Google Patents

Information processor with file management function

Info

Publication number
JPH0764839A
JPH0764839A JP5213888A JP21388893A JPH0764839A JP H0764839 A JPH0764839 A JP H0764839A JP 5213888 A JP5213888 A JP 5213888A JP 21388893 A JP21388893 A JP 21388893A JP H0764839 A JPH0764839 A JP H0764839A
Authority
JP
Japan
Prior art keywords
record
attribute
file
current
current attribute
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
JP5213888A
Other languages
Japanese (ja)
Inventor
Shigeru Kobayashi
茂 小林
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP5213888A priority Critical patent/JPH0764839A/en
Publication of JPH0764839A publication Critical patent/JPH0764839A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To enable one software to easily use the file generated by another software. CONSTITUTION:At the time of record insertion to a file 10, a record inserting operation part 25 in a file management mechanism 2 is started by an application program execution part 32 to perform the inserting operation of a new record 11 having contents of a buffer 33 to be the object as a data part 112 and having the set value of a present attribute storage part 29 as an attribute part 111. When only records having an attribute required in an application program 31 will be operated, a present attribute setting operation part 23 is started to set this attribute to the present attribute storage part 29 as the present attribute, and thereafter, a record read operation part 26 is started to read the records 11, which have attributes coinciding with this set present attribute, as the operation object into the buffer 33 from the file 10.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、補助記憶装置に記録
されるファイルとその中に含まれるレコードの読取り/
書込みに好適なファイル管理機能を有する情報処理装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to reading / writing of files recorded in an auxiliary storage device and records contained therein.
The present invention relates to an information processing device having a file management function suitable for writing.

【0002】[0002]

【従来の技術】一般に情報処理装置で取扱う情報は全て
が均質というものではない。例えば、文書ファイルであ
れば、文章の他に罫線が含まれていたり、一部の単語に
ついて強調表示指定があったりというように、主となる
情報と従となる情報、或いは本質的な情報と補助的な情
報などの異なる属性を持った情報から構成される。
2. Description of the Related Art Generally, not all information handled by an information processing device is homogeneous. For example, in the case of a document file, ruled lines are included in addition to sentences, and highlighting is specified for some words. It consists of information with different attributes such as auxiliary information.

【0003】このような一様でない情報をファイルに記
録するための手段として、従来は、それらの情報を操作
するためのプログラム(業務プログラム)に従い、属性
毎に、別のファイルに格納したり、一つのファイルの中
に一旦均質な情報として格納するなどそれぞれ独自の形
式で記録しておき、それをまた独自の意味付けによって
解釈・操作するという方式を適用していた。
As a means for recording such non-uniform information in a file, conventionally, according to a program (business program) for operating the information, each attribute is stored in a different file, or A method was used in which each file was recorded in its own format, such as being stored as homogeneous information in a single file, and then interpreted and operated with its own meaning.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、本来均
質でない情報を前述のようなプログラム固有の形式で表
現すると、各々のプログラム(業務プログラム)では、
その都度ファイル内の情報形式と管理方法を設計・製造
しなければならないという問題があった。また、或るプ
ログラムに従って作成されたファイルを、他のプログラ
ムからは利用しにくいという、より重大な問題もあっ
た。
However, if information that is originally inhomogeneous is expressed in a program-specific format as described above, each program (business program) has
There was a problem that the information format and management method in the file had to be designed and manufactured each time. There is also a more serious problem that it is difficult to use a file created according to a certain program from other programs.

【0005】この発明は上記事情を考慮してなされたも
のでその目的は、種々の属性を持つファイル内情報を、
利用するプログラムに共通の画一的な手順で操作するこ
とができ、しかも或るソフトウェアを用いて作成された
ファイルを他のソフトウェアから簡単に利用することが
できるファイル管理機能を有する情報処理装置を提供す
ることにある。
The present invention has been made in consideration of the above circumstances, and its purpose is to store information in a file having various attributes,
An information processing apparatus having a file management function that can be operated by a uniform procedure common to programs to be used and that can easily use a file created by using certain software from other software. To provide.

【0006】[0006]

【課題を解決するための手段】この発明は、ファイルに
格納される個々のレコードに、当該レコードの操作を制
御するのに用いられる当該レコードの属性を付加するレ
コード属性付加手段と、現時点で操作対象としているレ
コードの属性を現在属性として記憶するための現在属性
記憶手段と、この現在属性記憶手段に任意の現在属性を
設定する現在属性設定操作手段と、上記現在属性記憶手
段に設定されている現在属性およびファイル内のレコー
ドに付されているレコード属性をもとに、当該レコード
を操作対象とするか否かを決定し、その決定結果に応じ
て当該レコードを操作するレコード操作手段とを設け、
現在属性記憶手段に設定する現在属性を変えることによ
り、ファイル内の操作対象とするレコードの範囲を変え
るようにしたことを特徴とするものである。また、この
発明は、ファイル内のレコードに付されているレコード
属性を更新するレコード属性更新操作手段を更に設けた
ことをも特徴とする。
SUMMARY OF THE INVENTION The present invention is a record attribute adding means for adding the attribute of a record used to control the operation of the record to each record stored in a file, and the operation at the present time. The current attribute storage means for storing the attribute of the target record as the current attribute, the current attribute setting operation means for setting an arbitrary current attribute in the current attribute storage means, and the current attribute storage means are set. Based on the current attribute and the record attribute attached to the record in the file, it is determined whether or not the record is to be operated, and a record operating means for operating the record according to the determination result is provided. ,
The present invention is characterized in that the range of the record to be operated in the file is changed by changing the current attribute set in the current attribute storage means. The present invention is also characterized in that record attribute update operation means for updating the record attributes attached to the records in the file is further provided.

【0007】[0007]

【作用】上記の構成において、レコードをファイル内に
格納する際には、まずレコード属性付加手段により現在
属性記憶手段が参照され、同記憶手段に設定されている
現在属性がレコード属性として当該レコードに付加され
て、ファイルに格納される。次に、ファイル内のレコー
ドを操作する際には、レコード操作手段により現在属性
記憶手段に設定されている現在属性および対象となるレ
コードに付されているレコード属性とが比較され、一致
する属性があるならば当該レコードが操作対象として選
択される。この選択されたレコードのレコード属性を変
更したい場合には、レコード属性更新操作手段が起動さ
れ、ファイル内の当該レコードに付されているレコード
属性が指定の属性に更新される。
In the above structure, when the record is stored in the file, the record attribute adding means first refers to the current attribute storage means, and the current attribute set in the storage means is stored in the record as the record attribute. It is added and stored in the file. Next, when operating the record in the file, the current attribute set in the current attribute storage means and the record attribute attached to the target record are compared by the record operating means, and the matching attribute is determined. If so, the record is selected as the operation target. When it is desired to change the record attribute of the selected record, the record attribute update operation means is activated and the record attribute attached to the record in the file is updated to the designated attribute.

【0008】このように、上記の構成によれば、ファイ
ルに格納される個々のレコードに当該レコードが持つレ
コード属性を付加し、このレコード属性と現在属性記憶
手段に設定されている現在属性とをもとに当該レコード
を操作対象とするか否かを決定するようにしているた
め、種々の属性を持った情報を、利用するソフトウェア
(業務プログラム)に共通の画一的な手順で操作するこ
とが可能となる。
As described above, according to the above configuration, the record attribute of the record is added to each record stored in the file, and this record attribute and the current attribute set in the current attribute storage means are added. Since it is determined whether or not the record is to be operated, it is necessary to operate information with various attributes in a uniform procedure common to the software (business program) to be used. Is possible.

【0009】また、現在属性記憶手段に設定されている
現在属性に応じて、ファイル内の操作対象となるレコー
ドの範囲が決定されることから、現在属性記憶手段に設
定する現在属性を変えることにより、特定の属性を持つ
レコードのみを操作対象とするソフトウェア、或いは特
定の属性を持つレコードを操作対象としないソフトウェ
アから、不要なレコードを隠蔽することができる。この
ため、或るソフトウェアを用いて作成されたファイルを
他のソフトウェアから簡単に利用することができる。
Further, since the range of the record to be operated in the file is determined according to the current attribute set in the current attribute storage means, by changing the current attribute set in the current attribute storage means Unnecessary records can be hidden from software that operates only records having a specific attribute or software that does not operate records having a specific attribute. Therefore, a file created by using certain software can be easily used by other software.

【0010】[0010]

【実施例】図1はこの発明の一実施例に係るファイル管
理機能を有する情報処理装置の概略構成を示すブロック
図である。同図において、1は補助記憶装置、10は補
助記憶装置1に格納されているファイル、11,11…
はファイル10を構成する(情報の単位としての)レコ
ードである。各レコード11は、同レコード11の属性
を表す属性部(レコード属性部)111とデータ部(レ
コードデータ部)112からなる。ここで、レコード1
1の属性は、同レコード11の種類や状態を表す、互い
に独立な情報群に分解可能であるとする。この分解され
た個々の情報を属性要素と呼ぶ。レコード属性部111
は、この属性要素の集合である。
1 is a block diagram showing a schematic configuration of an information processing apparatus having a file management function according to an embodiment of the present invention. In the figure, 1 is an auxiliary storage device, 10 is a file stored in the auxiliary storage device 1, 11, 11, ...
Is a record (as a unit of information) that constitutes the file 10. Each record 11 is composed of an attribute section (record attribute section) 111 and a data section (record data section) 112 that represent the attributes of the record 11. Where record 1
It is assumed that the attribute of 1 can be decomposed into mutually independent information groups that represent the type and state of the same record 11. This decomposed individual information is called an attribute element. Record attribute section 111
Is the set of this attribute element.

【0011】2は補助記憶装置1内のファイル10と同
ファイル10中のレコード11の読取り/書込み等を管
理するファイル管理機構である。ファイル管理機構2
は、ファイル10に対する操作の種類毎に用意された8
つのファイル操作部、即ちオープン操作部21、クロー
ズ操作部22、現在属性設定操作部23、レコード属性
更新操作部24、レコード挿入操作部25、レコード読
取り操作部26、レコード更新操作部27およびレコー
ド削除操作部28と、現時点で操作対象としているレコ
ードの属性(以下、現在属性と称する)を記憶するため
の現在属性記憶部29とを有する。
Reference numeral 2 is a file management mechanism for managing the read / write of the file 10 in the auxiliary storage device 1 and the record 11 in the file 10. File management mechanism 2
Is 8 prepared for each type of operation on the file 10.
One file operation unit, that is, the open operation unit 21, the close operation unit 22, the current attribute setting operation unit 23, the record attribute update operation unit 24, the record insertion operation unit 25, the record read operation unit 26, the record update operation unit 27, and the record deletion. It has an operation unit 28 and a current attribute storage unit 29 for storing the attribute of the record currently operated (hereinafter referred to as the current attribute).

【0012】次に、上記各操作部21〜28の機能を説
明するために、まず本実施例で用いられる幾つかの用語
を定義する。 (1)標準レコード ファイルのアクセスを開始したとき、暗黙に操作の対象
となっているレコードを標準レコードと呼ぶ。
Next, some terms used in this embodiment will be defined in order to explain the function of each of the operation units 21 to 28. (1) Standard record A record that is implicitly a target of operation when access to a file is called a standard record.

【0013】(2)標準属性 標準レコードであることを表す属性要素を標準属性と呼
ぶ。 (3)現在レコード 最後(最も最近に)に読取り/書込み、または内容変更
したレコードを現在レコードと呼ぶ。
(2) Standard Attribute The attribute element representing a standard record is called a standard attribute. (3) Current record The last (most recently) read / write or changed record is called the current record.

【0014】(4)アクセス位置 最後(最も最近に)に読取り、または書込みを行ったレ
コードの、次のレコードの先頭位置をアクセス位置と呼
ぶ。ファイルのアクセス開始時には、アクセス位置はフ
ァイルの先頭に位置付けられる。
(4) Access Position The start position of the record next to the last (most recently) read or written record is called the access position. At the start of access to a file, the access position is located at the beginning of the file.

【0015】以上の定義を前提として、上記各操作部2
1〜28の機能を以下に説明する。オープン操作部21
は、オープンコマンドopen(path,mode)
に応じて起動され、対象ファイルの操作に必要な情報群
を初期化し、データの操作を開始する。この初期化で
は、現在属性記憶部29に標準属性が設定される。コマ
ンドopen(path,mode)の第1パラメータ
“path”は複数のファイルを操作する場合の識別番
号(ディレクトリ)の指定に用いられ、同じく第2パラ
メータ“mode”はファイル操作の目的(1つに限ら
ない)の指定に用いられる。
On the premise of the above definitions, the above-mentioned operation units 2
The functions of 1 to 28 will be described below. Open operation part 21
Is the open command open (path, mode)
The information group necessary for operating the target file is initialized and the data operation is started. In this initialization, standard attributes are set in the current attribute storage unit 29. The first parameter "path" of the command open (path, mode) is used to specify the identification number (directory) when operating a plurality of files, and the second parameter "mode" is also used for the purpose of file operation (one (Not limited) used to specify.

【0016】クローズ操作部22は、クローズコマンド
close(fileno)に応じて起動され、“fi
leno”で指定されるファイル10の操作を終了す
る。現在属性設定操作部23は、属性設定コマンドat
tr set(fileno,newattr)に応じ
て起動され、“fileno”で指定される対象ファイ
ル10についての現在属性記憶部29の属性を“new
attr”で指定された属性に設定する。
The close operation section 22 is activated in response to a close command close (fileno), and "fi
The operation of the file 10 designated by "leno" is terminated. The current attribute setting operation unit 23 uses the attribute setting command at
It is started according to tr set (fileno, newattr), and the attribute of the current attribute storage unit 29 for the target file 10 designated by "fileno" is set to "new".
Set to the attribute specified by "attr".

【0017】レコード属性更新操作部24は、属性更新
コマンドattr modify(fileno,ne
wattr)に応じて起動され、“fileno”で指
定される対象ファイル10中の現在レコード11の属性
を、“newattr”で指定された値に更新する。
The record attribute update operation unit 24 uses an attribute update command attr modify (fileno, ne).
The current record 11 in the target file 10 designated by "fileno" is updated to the value designated by "newattr".

【0018】レコード挿入操作部25は、レコード挿入
コマンドput(fileno,buf)に応じて起動
され、基本的には、“buf”の指定する後述のバッフ
ァ33の内容を、新しいレコード11として、“fil
eno”で指定される対象ファイル10中のアクセス位
置の前に挿入する。レコード挿入操作部25は、この新
しいレコード11の属性として、現在属性記憶部29に
設定されている値を用いる。なお、現在属性が標準属性
に等しい場合には、アクセス位置から後方に探して最初
の標準レコードの前に挿入される。
The record insertion operation section 25 is activated in response to a record insertion command put (fileno, buf), and basically, the contents of a buffer 33, which will be described later, designated by "buf" is set as "new record 11". fil
It is inserted before the access position in the target file 10 designated by "eno". The record insertion operation unit 25 uses the value currently set in the attribute storage unit 29 as the attribute of this new record 11. If the current attribute is equal to the standard attribute, it is searched backward from the access position and inserted before the first standard record.

【0019】レコード読取り操作部26は、レコード読
取りコマンドget(fileno,buf)に応じて
起動され、“fileno”で指定されるファイル10
から、次の、現在属性に等しい属性、または標準属性を
持つレコード11を、“buf”の指定するバッファ3
3に読み取る。
The record read operation unit 26 is activated in response to a record read command get (fileno, buf), and the file 10 specified by "fileno" is specified.
From the next record 11 having the attribute equal to the current attribute or the standard attribute to the buffer 3 designated by "buf"
Read on 3.

【0020】レコード更新操作部27は、レコード更新
コマンドmodify(fileno,buf)に応じ
て起動され、“fileno”で指定される対象ファイ
ル10中の現在レコード11を“buf”の指定するバ
ッファ33の内容で置換える。この際、レコード属性は
変更されない。
The record update operation unit 27 is activated in response to a record update command modify (fileno, buf), and stores the current record 11 in the target file 10 designated by "fileno" in the buffer 33 which designates "buf". Replace with content. At this time, the record attribute is not changed.

【0021】レコード削除操作部28は、レコード削除
コマンドdelete(fileno)に応じて起動さ
れ、“fileno”で指定される対象ファイル10中
の現在レコード11を同ファイル10から削除する。
The record deletion operation unit 28 is activated in response to the record deletion command delete (fileno) and deletes the current record 11 in the target file 10 designated by "fileno" from the file 10.

【0022】31は業務プログラム、32は業務プログ
ラム31に従ってファイル管理機構2内の各操作部21
〜28を利用してファイル操作を行う業務プログラム実
行部、33は業務プログラム実行部3が利用する、レコ
ードのデータ部を格納するためのバッファである。なお
業務プログラム31は1つに限らない。
Reference numeral 31 is a business program, 32 is each operation unit 21 in the file management mechanism 2 according to the business program 31.
A business program execution unit for performing file operations by using .about.28 and a buffer 33 used by the business program execution unit 3 for storing a data portion of a record. The business program 31 is not limited to one.

【0023】次に、図1の構成の基本動作を、レコード
の属性要素として、標準属性、罫線レコード属性、およ
び削除レコード属性の3つを持ち得る場合を例に、図2
を参照して説明する。なお、図2は、業務プログラム3
1によって実現されるファイル操作に関する部分の処理
手順を示すフローチャートである。
Next, the basic operation of the configuration of FIG. 1 will be described with reference to FIG. 2 as an example in which there can be three standard attribute, ruled line record attribute, and deleted record attribute as record attribute elements.
Will be described with reference to. 2 shows the business program 3
3 is a flowchart showing a processing procedure of a part related to file operation realized by 1.

【0024】まず業務プログラム実行部32は、業務プ
ログラム31に従ってオープンコマンドopen(pa
th,mode)を実行する(ステップS1)。この場
合、業務プログラム実行部32によりファイル管理機構
2内のオープン操作部21が起動される。
First, the business program execution unit 32 follows the business program 31 to open command open (pa
th, mode) is executed (step S1). In this case, the business program execution unit 32 activates the open operation unit 21 in the file management mechanism 2.

【0025】するとオープン操作部21は、対象ファイ
ル10の操作に必要な情報群(現在レコード、アクセス
位置等)を初期化する。このとき現在属性記憶部29に
は、標準属性が初期設定される。本実施例において、現
在属性記憶部29は、標準属性を設定するためのビット
0、罫線レコード属性を設定するためのビット1、およ
び削除レコード属性を設定するためのビット2の3ビッ
トで構成されており、ここではビット0に“1”が書込
まれることにより、標準属性が設定される。
Then, the open operation section 21 initializes the information group (current record, access position, etc.) necessary for operating the target file 10. At this time, standard attributes are initially set in the current attribute storage unit 29. In the present embodiment, the current attribute storage unit 29 is composed of 3 bits, that is, bit 0 for setting a standard attribute, bit 1 for setting a ruled line record attribute, and bit 2 for setting a deleted record attribute. Therefore, the standard attribute is set by writing "1" in bit 0 here.

【0026】さて、現在属性(ここでは標準属性)を変
更したい場合、或いは現在属性として新たな属性要素を
追加したい場合には、業務プログラム31に従って属性
設定コマンドattr set(fileno,new
attr)が実行される(ステップS2)。この場合、
業務プログラム実行部32によりファイル管理機構2内
の現在属性設定操作部23が起動される。
When it is desired to change the current attribute (standard attribute in this case) or to add a new attribute element as the current attribute, the attribute setting command attr set (fileno, new) according to the business program 31.
attr) is executed (step S2). in this case,
The business program execution unit 32 activates the current attribute setting operation unit 23 in the file management mechanism 2.

【0027】すると現在属性設定操作部23は、現在属
性記憶部29の属性を、属性設定コマンドattr s
et(fileno,newattr)中の“newa
ttr”で指定された属性に設定する。
Then, the current attribute setting operation section 23 sets the attribute of the current attribute storage section 29 to the attribute setting command attr s.
"newa" in et (fileno, newattr)
Set to the attribute specified by "ttr".

【0028】次に業務プログラム実行部32は、業務プ
ログラム31に従って、レコード挿入コマンドput
(fileno,buf)の実行(ステップS3)、レ
コード読取りコマンドget(fileno,buf)
の実行(ステップS4)、またはレコード削除コマンド
delete(fileno)の実行(ステップS5)
を行う。
Next, the business program execution unit 32, according to the business program 31, puts a record insertion command put.
Execution of (fileno, buf) (step S3), record read command get (fileno, buf)
(Step S4) or the record delete command delete (fileno) (step S5)
I do.

【0029】ここでは、新たなレコード(のデータ部)
がバッファ33内に生成された結果、レコード挿入コマ
ンドput(fileno,buf)が実行されたもの
とする。このレコード挿入コマンドput(filen
o,buf)は、通常は、属性設定コマンドattr
set(fileno,newattr)に続いて実行
される。この場合、業務プログラム実行部32によりフ
ァイル管理機構2内のレコード挿入操作部25が起動さ
れる。
Here, a new record (data section)
Is generated in the buffer 33, and as a result, the record insertion command put (fileno, buf) is executed. This record insertion command put (filen
o, buf) is usually an attribute setting command attr
It is executed subsequent to set (fileno, newattr). In this case, the business program execution unit 32 activates the record insertion operation unit 25 in the file management mechanism 2.

【0030】するとレコード挿入操作部25は、バッフ
ァ33の内容をレコードデータ部112とし、現在属性
記憶部29に設定されている値(現在属性)をレコード
属性部111とする新しいレコード11を、“file
no”で指定されたファイル10内のアクセス位置の前
(ファイルの始端側)に挿入する。但し、現在属性が標
準属性に等しい場合(即ち現在属性記憶部29の標準属
性を示すビット0が“1”の場合)には、レコード挿入
操作部25は、ファイル10内のアクセス位置から後方
にある最初の標準レコードの前に挿入する。この理由
は、標準レコードは業務プログラム31から最も多く利
用されるレコードであることから、これらを一塊にして
おくことにより、レコードアクセスの効率化を図るよう
にしたためである。
Then, the record insertion operation section 25 sets the new record 11 in which the contents of the buffer 33 are the record data section 112 and the value (current attribute) currently set in the attribute storage section 29 is the record attribute section 111. file
It is inserted before the access position in the file 10 designated by "no" (at the beginning of the file). However, when the current attribute is equal to the standard attribute (that is, bit 0 indicating the standard attribute of the current attribute storage unit 29 is " 1 "), the record insertion operation unit 25 inserts the file 10 before the first standard record located behind the access position in the file 10. This is because the standard record is most often used by the business program 31. This is because it is a record to be stored, and by making these into one block, the efficiency of record access is improved.

【0031】以上のようにして、新たなレコードが、ス
テップS1で初期設定された現在属性、或いはステップ
S2で更新された現在属性を付して、ファイル10内に
挿入される。
As described above, a new record is inserted in the file 10 with the current attribute initialized in step S1 or the current attribute updated in step S2.

【0032】次に、ファイル10内のレコード11を編
集する場合について説明する。まず業務プログラム実行
部32は、業務プログラム31に従って、レコード読取
りコマンドget(fileno,buf)を実行する
(ステップS4)。この場合、業務プログラム実行部3
2によりファイル10内のレコード読取り操作部26が
起動される。
Next, the case of editing the record 11 in the file 10 will be described. First, the business program execution unit 32 executes the record read command get (fileno, buf) according to the business program 31 (step S4). In this case, the business program execution unit 3
2 starts the record read operation unit 26 in the file 10.

【0033】するとレコード読取り操作部26は、レコ
ード読取りコマンドget(fileno,buf)中
の“fileno”で指定されたファイル10から、次
の、現在属性記憶部29の示す現在属性に等しい属性、
または標準属性を持つレコード11を読取る。このレコ
ード11は、レコード読取りコマンドget(file
no,buf)中の“buf”で指定されたバッファ3
3に格納される。
Then, the record read operation unit 26 selects the next attribute from the file 10 designated by "fileno" in the record read command get (fileno, buf), which is equal to the current attribute indicated by the current attribute storage unit 29.
Alternatively, the record 11 having the standard attribute is read. This record 11 is a record read command get (file).
buffer 3 designated by "buf" in "no, buf)"
3 is stored.

【0034】この際、レコード読取り操作部26は、読
取ったレコード11の属性を、例えば関数の値として、
業務プログラム実行部32に通知する。またレコード読
取り操作部26は、アクセス位置より後に、その属性を
持つレコード11が最早存在しないならば、データの終
り(実質的なファイル10の終り)を業務プログラム実
行部32に通知する。
At this time, the record read operation unit 26 sets the attribute of the read record 11 as a function value, for example.
Notify the business program execution unit 32. If the record 11 having the attribute no longer exists after the access position, the record read operation unit 26 notifies the business program execution unit 32 of the end of the data (substantially the end of the file 10).

【0035】このようにして、業務プログラム実行部3
2は、ファイル10から現在属性に等しい属性、または
標準属性を持つレコード11のみを読取ることができ
る。したがって、ステップS2での属性設定コマンドa
ttr set(fileno,newattr)の実
行により、業務プログラム31においてサポートしてい
る属性のみを現在属性記憶部29に設定した状態で、ス
テップS4にてレコード読取りコマンドget(fil
eno,buf)を実行することにより、業務プログラ
ム31においてサポートしていない属性を持つレコード
を、業務プログラム31(を実行する業務プログラム実
行部32)から隠蔽することができる。同様にして、特
定の属性のレコードを操作対象とする場合には、その属
性を現在属性記憶部29に設定した状態で、レコード読
取りコマンドget(fileno,buf)を実行す
ることにより、それ以外の属性の不要なレコードを、業
務プログラム31(を実行する業務プログラム実行部3
2)から隠蔽することもできる。
In this way, the business program execution unit 3
2 can read only the record 11 having the attribute equal to the current attribute or the standard attribute from the file 10. Therefore, the attribute setting command a in step S2
By executing ttr set (fileno, newattr), only the attributes supported by the business program 31 are currently set in the attribute storage unit 29, and the record read command get (fil
By executing (eno, buf), it is possible to hide a record having an attribute not supported in the business program 31 from the business program 31 (the business program execution unit 32 that executes the business program 31). Similarly, when a record having a specific attribute is set as an operation target, a record read command get (fileno, buf) is executed while the attribute is currently set in the attribute storage unit 29. A business program execution unit 3 that executes a business program 31
It can also be hidden from 2).

【0036】なお本実施例において、レコード読取り操
作部26が標準属性を持つレコード11を現在属性に無
関係に読取るのは、標準レコードは多くの業務プログラ
ム31で処理対象となるためであるが、現在属性に等し
い属性を持つレコード11だけを読取るようにしても構
わない。
In this embodiment, the reason why the record read operation unit 26 reads the record 11 having the standard attribute regardless of the current attribute is that the standard record is processed by many business programs 31. Only the record 11 having the attribute equal to the attribute may be read.

【0037】業務プログラム実行部32は、ステップS
4でバッファ33に読取られたレコード11を例えば削
除レコードとして扱いたい場合には、属性更新コマンド
attr modify(fileno,newatt
r)を実行する(ステップS6)。この場合、業務プロ
グラム実行部32によりファイル管理機構2内のレコー
ド属性更新操作部24が起動される。
The business program execution unit 32 executes step S
When the record 11 read in the buffer 33 in 4 is to be treated as a deleted record, for example, the attribute update command attr modify (fileno, newatt)
r) is executed (step S6). In this case, the business program execution unit 32 activates the record attribute update operation unit 24 in the file management mechanism 2.

【0038】するとレコード属性更新操作部24は、属
性更新コマンドattr modify(filen
o,newattr)中の“fileno”で指定され
たファイル10内の現在レコード11の属性、即ちステ
ップS6の直前のステップS4で読取られたレコード1
1の属性を、“newattr”で指定された値に更新
する。したがって、この値を例えば“101”としてお
くことにより、例えば標準属性を持つレコードを、標準
属性且つ削除レコード属性を持つレコードに更新するこ
とができる。
Then, the record attribute update operation unit 24 uses the attribute update command attr modify (filen).
o, newattr) attribute of the current record 11 in the file 10 designated by "fileno", that is, record 1 read in step S4 immediately before step S6.
The attribute of 1 is updated to the value specified by "newattr". Therefore, by setting this value to "101", for example, a record having a standard attribute can be updated to a record having a standard attribute and a deleted record attribute.

【0039】またステップS4でバッファ33に読取ら
れたレコード11を編集し、その編集後のレコード11
により元のレコード11を置き換えたい(更新したい)
場合には、業務プログラム実行部32は、レコード更新
コマンドmodify(fileno,buf)を実行
する(ステップS7)。この場合、業務プログラム実行
部32によりファイル管理機構2内のレコード更新操作
部27が起動される。
The record 11 read in the buffer 33 in step S4 is edited, and the edited record 11 is edited.
I want to replace (update) the original record 11
In this case, the business program execution unit 32 executes the record update command modify (fileno, buf) (step S7). In this case, the business program execution unit 32 activates the record update operation unit 27 in the file management mechanism 2.

【0040】するとレコード更新操作部27は、レコー
ド更新コマンドmodify(fileno,buf)
中の“fileno”で指定されたファイル10内の現
在レコード11のデータ部112、即ちステップS6の
直前のステップS4で読取られたレコード11のデータ
部112を、バッファ33内の編集後のレコード11の
データ部112で置換える。このとき、レコード属性部
111の内容は変更されない。
Then, the record update operation unit 27 causes the record update command modify (fileno, buf).
Of the data part 112 of the current record 11 in the file 10 designated by "fileno", that is, the data part 112 of the record 11 read in step S4 immediately before step S6, is the edited record 11 in the buffer 33. The data part 112 is replaced. At this time, the contents of the record attribute part 111 are not changed.

【0041】また、上記の現在レコード11を削除した
い場合には、業務プログラム実行部32は、レコード削
除コマンドdelete(fileno)を実行する
(ステップS5)。この場合、業務プログラム実行部3
2によりファイル管理機構2内のレコード削除操作部2
8が起動される。
When it is desired to delete the current record 11, the business program execution unit 32 executes the record deletion command delete (fileno) (step S5). In this case, the business program execution unit 3
2 by the record management unit 2 in the file management mechanism 2
8 is activated.

【0042】するとレコード削除操作部28は、レコー
ド削除コマンドdelete(fileno)中の“f
ileno”で指定されたファイル10内の現在レコー
ド11を同ファイル10から削除する。この結果、現在
レコードは不定となる。なお、アクセス位置は動かな
い。
Then, the record deletion operation unit 28 uses the "f" in the record deletion command delete (fileno).
The current record 11 in the file 10 designated by “ileno” is deleted from the file 10. As a result, the current record becomes indefinite. The access position does not move.

【0043】次に、一旦削除レコード属性が付されたレ
コード11、即ち削除レコード扱いとされたレコード1
1を、削除状態から回復したい場合には、業務プログラ
ム実行部32は、属性更新コマンドattr modi
fy(fileno,newattr)を実行し、レコ
ード属性更新操作部24を起動する。
Next, the record 11 to which the deleted record attribute is once attached, that is, the record 1 treated as a deleted record
In order to recover 1 from the deleted state, the business program execution unit 32 uses the attribute update command attr modi
fy (fileno, newattr) is executed to activate the record attribute update operation unit 24.

【0044】レコード属性更新操作部24は、属性更新
コマンドattr modify(fileno,ne
wattr)中の“fileno”で指定されたファイ
ル10内の現在レコード11の属性を、“newatt
r”で指定された値に更新する。したがって、この値を
例えば“100”としておくことにより、例えば標準属
性および削除レコード属性を持つレコードを、標準属性
のみを持つレコードに更新することができる。
The record attribute update operation unit 24 uses the attribute update command attr modify (fileno, ne
The attribute of the current record 11 in the file 10 designated by “fileno” in “wattr” is set to “newatt
Therefore, the record having the standard attribute and the deleted record attribute can be updated to the record having only the standard attribute by setting the value to, for example, “100”.

【0045】以上の基本動作に従うファイル操作によ
る、本実施例の効果を、図3に示す6つのレコード11
の例をもとに、説明する。この図3に示すレコード11
の属性部111は、前述の基本動作で述べた場合と同様
に、標準属性を設定するためのビット0、罫線レコード
属性を設定するためのビット1、および削除レコード属
性を設定するためのビット2の3ビットで構成されてい
るものとする。このレコード属性部111の例は、説明
を簡略化するためのもので、ビット数を増やすことによ
り、各種の強調表示属性など、更に多くの属性要素を設
定することも可能である。
The effect of this embodiment by the file operation according to the above basic operation is shown by the six records 11 shown in FIG.
An example will be explained. Record 11 shown in FIG.
The attribute part 111 of the same as the case described in the basic operation described above, bit 0 for setting the standard attribute, bit 1 for setting the ruled line record attribute, and bit 2 for setting the delete record attribute. It is assumed that it is composed of 3 bits. The example of the record attribute section 111 is for the purpose of simplifying the description, and it is possible to set more attribute elements such as various highlighting attributes by increasing the number of bits.

【0046】図3の例では、同図(a),(b),
(d)に示すレコード11は標準属性を持ち、同図
(c),(e),(f)に示すレコード11は罫線レコ
ード属性を持つ。更に同図(d),(e)に示すレコー
ド11は削除レコード属性も持つ。
In the example of FIG. 3, (a), (b),
The record 11 shown in (d) has a standard attribute, and the records 11 shown in (c), (e) and (f) of the same figure have a ruled line record attribute. Further, the record 11 shown in FIGS. 8D and 8E also has a delete record attribute.

【0047】図1に示した本実施例装置では、これらの
属性(レコード11のレコード属性部111に設定され
ている属性)をもとに、ソフトウェア(業務プログラム
31)毎に、操作対象とするレコード11の範囲を変え
ることができる。
In the apparatus of this embodiment shown in FIG. 1, based on these attributes (attributes set in the record attribute section 111 of the record 11), each software (business program 31) is set as an operation target. The range of the record 11 can be changed.

【0048】例えば、上記3つの属性の全てを取り扱う
ファイル編集用のソフトウェアでは、図3(a)〜
(f)に示す全てのレコード11を参照したり、その属
性を変更する(削除レコード属性を取り除いてレコード
11を削除状態から回復するなど)ことができるが、一
部の属性しか取り扱わないソフトウェアでは、そうする
ことはできない。
For example, in the file editing software which handles all of the above three attributes, FIG.
Although it is possible to refer to all the records 11 shown in (f) and change their attributes (such as removing the deleted record attributes to recover the record 11 from the deleted state), software that handles only some attributes , You can't do that.

【0049】そこで、例えばファイル内容の表示のみを
行うソフトウェアでは、前記ステップS2にて現在属性
記憶部29に例えば標準属性と罫線レコード属性とを指
定する値“110”を設定することで、削除レコード属
性を持つレコードを隠蔽し、レコード読取り操作部26
が同レコードを参照しない(読取らない)ようにするこ
とができる。また、ファイル内容の表示のみを行い、し
かも罫線表示機能を持たないソフトウェアでは、現在属
性記憶部29に標準属性のみを指定する値“100”を
設定することで、標準属性を持つレコード11のみを参
照することができる。
Therefore, for example, in the software which only displays the file contents, the value "110" for designating the standard attribute and the ruled line record attribute is set in the current attribute storage unit 29 in the step S2, whereby the deletion record is set. The record read operation unit 26 is arranged to hide the record having the attribute.
Can not refer to (read) the same record. Further, in software that only displays file contents and does not have a ruled line display function, by setting the value “100” that specifies only the standard attribute in the current attribute storage unit 29, only the record 11 having the standard attribute is set. Can be referenced.

【0050】[0050]

【発明の効果】以上詳述したようにこの発明によれば、
ファイルに格納される個々のレコードに当該レコードが
持つレコード属性を付加し、このレコード属性と現在属
性記憶手段に設定されている現在属性とをもとに当該レ
コードを操作対象とするか否かを決定するようにしてい
るため、種々の属性を持った情報を、利用するソフトウ
ェア(業務プログラム)に共通の画一的な手順で操作す
ることができる。
As described above in detail, according to the present invention,
The record attribute of the record is added to each record stored in the file, and whether or not the record is to be operated is determined based on this record attribute and the current attribute set in the current attribute storage means. Since the information is determined, it is possible to operate information having various attributes in a uniform procedure common to software (business programs) to be used.

【0051】また、この発明によれば、現在属性記憶手
段に設定されている現在属性に応じて、ファイル内の操
作対象となるレコードの範囲が決定されることから、現
在属性記憶手段に設定する現在属性を変えることによ
り、特定の属性を持つレコードのみを操作対象とするソ
フトウェア、或いは特定の属性を持つレコードを操作対
象としないソフトウェアから、不要なレコードを隠蔽す
ることができ、したがって或るソフトウェアを用いて作
成されたファイルを他のソフトウェアから簡単に利用す
ることができる。
Further, according to the present invention, since the range of the record to be operated in the file is determined according to the current attribute set in the current attribute storage means, it is set in the current attribute storage means. By changing the current attribute, unnecessary records can be hidden from software that operates only records that have a specific attribute, or software that does not operate records that have a specific attribute. Files created using can be easily used by other software.

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

【図1】この発明の一実施例に係るファイル管理機能を
有する情報処理装置の概略構成を示すブロック図。
FIG. 1 is a block diagram showing a schematic configuration of an information processing apparatus having a file management function according to an embodiment of the present invention.

【図2】同実施例における基本動作を説明するためのフ
ローチャート。
FIG. 2 is a flowchart for explaining a basic operation in the same embodiment.

【図3】同実施例における効果を説明するための、各種
属性を持つレコード例を示す図。
FIG. 3 is a diagram showing an example of a record having various attributes, for explaining the effect of the embodiment.

【符号の説明】[Explanation of symbols]

1…補助記憶装置、2…ファイル管理機構,10…ファ
イル、11…レコード、21…オープン操作部、22…
クローズ操作部、23…現在属性設定操作部、24…レ
コード属性更新操作部、25…レコード挿入操作部(レ
コード属性付加手段)、26…レコード読取り操作部
(レコード操作手段)、27…レコード更新操作部,2
8…レコード削除操作部、29…現在属性記憶部、31
…業務プログラム、32…業務プログラム実行部、33
…バッファ、111…属性部(レコード属性部)、11
2…データ部(レコードデータ部)。
1 ... Auxiliary storage device, 2 ... File management mechanism, 10 ... File, 11 ... Record, 21 ... Open operation part, 22 ...
Close operation unit, 23 ... Current attribute setting operation unit, 24 ... Record attribute update operation unit, 25 ... Record insertion operation unit (record attribute adding unit), 26 ... Record read operation unit (Record operation unit), 27 ... Record update operation Part, 2
8 ... Record delete operation unit, 29 ... Current attribute storage unit, 31
... Business program, 32 ... Business program execution unit, 33
... buffer, 111 ... attribute part (record attribute part), 11
2 ... Data part (record data part).

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】ファイル管理機能を有する情報処理装置に
おいて、 ファイルに格納される個々のレコードに、当該レコード
の操作を制御するのに用いられる当該レコードの属性を
付加するレコード属性付加手段と、 現時点で操作対象としているレコードの属性を現在属性
として記憶するための現在属性記憶手段と、 この現在属性記憶手段に任意の現在属性を設定する現在
属性設定操作手段と、 前記現在属性記憶手段に設定されている現在属性および
前記ファイル内のレコードに付されているレコード属性
をもとに、当該レコードを操作対象とするか否かを決定
し、その決定結果に応じて当該レコードを操作するレコ
ード操作手段とを具備し、前記現在属性記憶手段に設定
する現在属性を変えることにより、前記ファイル内の操
作対象とするレコードの範囲を変えるようにしたことを
特徴とするファイル管理機能を有する情報処理装置。
1. In an information processing apparatus having a file management function, record attribute adding means for adding an attribute of a record used for controlling an operation of the record to each record stored in a file, Current attribute storage means for storing the attribute of the record to be operated as a current attribute, current attribute setting operation means for setting an arbitrary current attribute in the current attribute storage means, and the current attribute storage means for setting the current attribute storage means. Based on the present attribute and the record attribute attached to the record in the file, it is determined whether or not the record is to be operated, and the record operating means that operates the record according to the determination result. And changing the current attribute set in the current attribute storage means to be a target of operation in the file. An information processing apparatus having a file management function, characterized in that a code range is changed.
【請求項2】 前記レコード属性付加手段は、前記ファ
イル内に前記レコードを格納する際には、前記現在属性
記憶手段に設定されている現在属性を前記レコード属性
として当該レコードに付加することを特徴とする請求項
1記載のファイル管理機能を有する情報処理装置。
2. The record attribute adding means, when storing the record in the file, adds the current attribute set in the current attribute storage means to the record as the record attribute. An information processing apparatus having a file management function according to claim 1.
【請求項3】 前記ファイル内のレコードに付されてい
る前記レコード属性を更新するレコード属性更新操作手
段を更に具備することを特徴とする請求項2記載のファ
イル管理機能を有する情報処理装置。
3. The information processing apparatus having a file management function according to claim 2, further comprising a record attribute update operation means for updating the record attribute attached to the record in the file.
JP5213888A 1993-08-30 1993-08-30 Information processor with file management function Pending JPH0764839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5213888A JPH0764839A (en) 1993-08-30 1993-08-30 Information processor with file management function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5213888A JPH0764839A (en) 1993-08-30 1993-08-30 Information processor with file management function

Publications (1)

Publication Number Publication Date
JPH0764839A true JPH0764839A (en) 1995-03-10

Family

ID=16646684

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5213888A Pending JPH0764839A (en) 1993-08-30 1993-08-30 Information processor with file management function

Country Status (1)

Country Link
JP (1) JPH0764839A (en)

Similar Documents

Publication Publication Date Title
CA2047696C (en) Method of reading and writing files on non-erasable storage media
JP4076078B2 (en) File management method
JPH04227550A (en) Data processing apparatus
JP2002055995A (en) Method and device for information processing
US5133066A (en) Method for selecting multiple versions of data in a reduced record units text editing system
US5230075A (en) Database shadowing system with data tags that select an operation of the save command
JPH0764839A (en) Information processor with file management function
JP3586560B2 (en) Data processing device
JPH0318224B2 (en)
JPH0581096A (en) Page deletion system for electronic filing device
JP3458421B2 (en) Document processing system
JPH01114948A (en) File edition supporting method
JP2798777B2 (en) Word processor
JPH05250360A (en) Document control method
JP3706635B2 (en) Document processing apparatus and data processing method of document processing apparatus
JP2000099533A (en) File access method/system
JPH0528141A (en) Document title editing system
JP2005157768A (en) Method for storing electronic file, implementation device, and processing program
JPH05324734A (en) Electronic filing device
JPH0944387A (en) File management system and file information display method
JPH02178880A (en) Electronic file device
JPH0644123A (en) File editing range designation system
JPS62226487A (en) Memory control system for optical disk
JPH0520320A (en) Document editing processor
JPH045736A (en) Information processor