JPH0449416A - File processor - Google Patents

File processor

Info

Publication number
JPH0449416A
JPH0449416A JP2158784A JP15878490A JPH0449416A JP H0449416 A JPH0449416 A JP H0449416A JP 2158784 A JP2158784 A JP 2158784A JP 15878490 A JP15878490 A JP 15878490A JP H0449416 A JPH0449416 A JP H0449416A
Authority
JP
Japan
Prior art keywords
sorting
file
definition
keyword
output
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.)
Granted
Application number
JP2158784A
Other languages
Japanese (ja)
Other versions
JP3143910B2 (en
Inventor
Katsu Matsumura
松村 克
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP02158784A priority Critical patent/JP3143910B2/en
Publication of JPH0449416A publication Critical patent/JPH0449416A/en
Application granted granted Critical
Publication of JP3143910B2 publication Critical patent/JP3143910B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、オフィスコンピュータ等におけるファイル処
理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a file processing device in an office computer or the like.

[発明の概要] 本発明のファイル処理装置は、設定されたキーワードの
種類とファイルにおける現在のキーワードの種類を判別
することでソートの種類を自動弁別するようにしたもの
である。
[Summary of the Invention] The file processing device of the present invention automatically discriminates the type of sorting by determining the type of keyword set and the type of the current keyword in the file.

[従来技術] 従来のオフィスコンピュータ等においてファイル処理を
行なう場合、ユーザー(プログラマ)がディスク上のフ
ァイルのデータの並びや、必要とするデータの並びから
ソートの必要性を判断し、ソートが必要であればデータ
中のどのフィールドをキーとしてソートを行なうかとい
った手順を自から考え、プログラミングによってコンピ
ュータに指示している。即ち、ユーザーがプログラミン
グを行なう時点でソートの要、不要を判断して指示して
いる。
[Prior Art] When processing files on a conventional office computer, etc., the user (programmer) determines the necessity of sorting based on the arrangement of data in files on the disk and the arrangement of required data. If so, they come up with procedures such as which fields in the data should be used as keys for sorting, and instruct the computer through programming. In other words, the user determines and instructs whether sorting is necessary or not at the time of programming.

[発明が解決しようとする課題] 上記のように従来ではプログラミングを行なう時点で、
ユーザーがソートの要、不要を判断して指示を与えてお
り、このためファイルの構成を変更すると、そのファイ
ルを処理する全てのプログラムに関して、ソートの要、
不要、ソートキーなどの変更が必要になるという問題が
あった。
[Problem to be solved by the invention] As mentioned above, conventionally, at the time of programming,
The user determines whether sorting is necessary or not and gives instructions, so if the file structure is changed, all programs that process that file will be asked whether sorting is necessary or not.
There was a problem that it was unnecessary and required changes to the sort key, etc.

このような原因は、ファイル処理に際してソートの要、
不要を自動的に判断できず、ユーザー自身が判断しなけ
ればならないところにあると考えられる。
This is due to the need for sorting during file processing.
It is thought that it is not possible to automatically determine whether something is unnecessary, and the user must make the decision themselves.

してみれば、ファイル処理時に、設定されたキーワード
の種類とファイル上のレコードの並びからソートの要、
不要を自動的に判別し、その判別結果に従って自動的に
ソートが行なわれるようにすれば、ファイルの構成を変
更しても、そのファイルを処理するプログラムに関して
、ユーザーがソートの要、不要、ソートキーなどの変更
を指示する必要が無くなることは明らかである。
When processing a file, you can determine the sorting requirements based on the type of keyword set and the order of records on the file.
If unnecessary files are automatically determined and sorted according to the results of the determination, even if the file structure is changed, the user will be able to determine whether or not the files need to be sorted and whether they need to be sorted by the sort key in the program that processes the file. It is clear that there is no need to instruct changes such as.

本発明の課題は、ファイル処理に際し、設定されたキー
ワードの種類とファイル上のレコードの並びからソート
の要、不要を自動的に判別して自動的にソート処理を行
ない得るファイル処理装置を提供することである。
An object of the present invention is to provide a file processing device that can automatically determine whether sorting is necessary or not based on the type of set keyword and the arrangement of records on the file, and automatically perform the sorting process. That's true.

[課題を解決するための手段] 本発明の手段は次の通りである。[Means to solve the problem] The means of the present invention are as follows.

予め決められたキーワード順にソートされたレコードを
記憶する記憶手段。
Storage means for storing records sorted in predetermined keyword order.

例えばソースファイル群24である。For example, it is the source file group 24.

任意のキーワードを設定するキーワード設定手段。Keyword setting means to set arbitrary keywords.

例えば入力定義書メモリ15である。For example, it is the input definition document memory 15.

上記予め決められたキーワードと上記キーワード設定手
段により任意に設定されたキーワードの種類が一致する
か否かを判別する判別手段。
Discrimination means for determining whether or not the predetermined keyword matches the type of keyword arbitrarily set by the keyword setting means.

例えば入力定義書メモリ15の設定内容を参照してソー
トの要否を判別するソート要否判別部16である。
For example, it is a sorting necessity determining section 16 that refers to the settings in the input definition document memory 15 and determines whether or not sorting is necessary.

この判別手段により一致していないと判別された際、設
定されたキーワードを基準にしてレコードをキーワード
順にソートするソート手段。
When this determining means determines that they do not match, a sorting means sorts the records in keyword order based on the set keyword.

例えばソート処理部18である。For example, it is the sort processing section 18.

このソート手段によりソートされたレコードを設定され
たキーワード順に出力する出力手段。
An output means that outputs records sorted by this sorting means in the order of set keywords.

例えば出力定義書メモリ20の設定内容に従って動作す
る帳票作成部21及び帳票出力部22である。
For example, the form creation section 21 and the form output section 22 operate according to the settings in the output definition memory 20.

[作用] 本発明の手段の作用は次の通りである。[Effect] The operation of the means of the invention is as follows.

帳票を作成する際、キーワード設定手段により帳票作成
の基準となるキーワードを設定する。このキーワードが
設定されると、この設定キーワードと予めファイルに対
して決められているキーワドの種類が一致するか否かが
判別手段により判別される。この判別手段により両者の
キーワードが一致していないと判別された場合のみ、上
記キーワード設定手段に設定されたキーワードを基準に
してファイルのレコードをキーワード順にソートする。
When creating a form, the keyword setting means sets a keyword that becomes a standard for creating the form. When this keyword is set, the determining means determines whether or not this set keyword matches the type of keyword predetermined for the file. Only when this determining means determines that the two keywords do not match, the records of the file are sorted in keyword order based on the keyword set in the keyword setting means.

そして、このソート処理を終了すると、そのソートされ
たレコードを設定されたキーワード順に出力して帳票を
作成する。
When this sorting process is completed, the sorted records are output in the order of the set keywords to create a form.

上記のように設定されたキーワードの種類とファイルに
おける現在のキーワードの種類を判別してソートの種類
を自動弁別することにより、ファイルの構成を変更して
も、そのファイルを処理するプログラムに関して、ユー
ザーがソートの要、不要、ソートキーなどの変更を指示
する必要が無くなる。
By automatically determining the sorting type by determining the keyword type set above and the current keyword type in the file, even if the file configuration is changed, the user There is no need to instruct whether sorting is necessary or not, or to change the sort key.

[実施例] 以下、一実施例を第1図ないし第9図を参照しながら説
明する。
[Example] An example will be described below with reference to FIGS. 1 to 9.

第1図は、全体の構成を示すブロック図である。FIG. 1 is a block diagram showing the overall configuration.

同図において、符号11は回路全体の制御を行なうCP
Uで、可変長処理が可能である。このCPUIIにはパ
スライン12を介して入力部13、表示部14、入力定
義書メモリ15、ソート要否判別部16、定義ナンバメ
モリ17、ソート処理部18、出力定義書メモリ20、
帳票作成部21、ファイル別レコード構造メモリ23、
ソースファイル群24が接続される。また、上記ソート
処理部18にはワークファイル19が接続され、帳票作
成部21には帳票出力部22が接続される。
In the figure, reference numeral 11 indicates a CP that controls the entire circuit.
U allows variable length processing. This CPU II is connected via a path line 12 to an input section 13, a display section 14, an input definition document memory 15, a sort necessity determination section 16, a definition number memory 17, a sort processing section 18, an output definition document memory 20,
Form creation unit 21, file-by-file record structure memory 23,
Source file group 24 is connected. Further, a work file 19 is connected to the sort processing section 18, and a form output section 22 is connected to the form creation section 21.

上記入力定義書メモリ15は、第2図に示す各ソースフ
ァイル別の入力定義書を記憶するもので、各入力定義書
には、ソースファイル名と定義キーが設定される。この
入力定義書メモリ15の設定内容は、ソート要否判別部
16により参照される。
The input definition document memory 15 stores input definition documents for each source file shown in FIG. 2, and a source file name and a definition key are set in each input definition document. The setting contents of the input definition document memory 15 are referred to by the sorting necessity determining section 16.

このソート要否判別部16は、内部にレジスタiを備え
、ファイル処理時に入力定義書メモリ15の定義内容を
参照してソートの要否を判別し、ソートが必要であれば
定義ナンバメモリ17に第4図に示すように定義ナンバ
とソート方向(昇順/降順)を設定する。
This sorting necessity determining unit 16 has a register i therein, and determines whether or not sorting is necessary by referring to the definition contents of the input definition document memory 15 during file processing, and if sorting is necessary, the definition number memory 17 is stored. As shown in FIG. 4, the definition number and sort direction (ascending/descending) are set.

出力定義書メモリ20は、第3図に示す出力定義書を記
憶するもので、各出力定義書には、出力すべきワード名
と出力位置を示す出力X座標が設定される。この出力定
義書メモリ2oの設定内容は、帳票作成部21により参
照される。即ち、帳票作成部21は、帳票作成時に出力
定義書メモリ20の設定内容を参照し、作成した帳票デ
ータを帳票出力部22に出力する。
The output definition document memory 20 stores the output definition documents shown in FIG. 3, and each output definition document is set with a word name to be output and an output X coordinate indicating the output position. The setting contents of this output definition document memory 2o are referred to by the form creation section 21. That is, the form creation unit 21 refers to the settings in the output definition memory 20 when creating a form, and outputs the created form data to the form output unit 22.

ファイル別レコード構造メモリ23は、第5図に示すよ
うにソースファイル群24に対する各ファイル別のレコ
ード構造を記憶するもので、そのデータとして、ファイ
ル名、キーワード、ワードNO1、ワード名等が設定さ
れる。例えばファイル名Aに対しては、ワード名として
「商品コード」、「個数」、「金額」が設定され、「商
品コード」がキーワードにとして設定されている。また
、ファイル名Bに対しては、ワード名として「担当者コ
ード」、「商品コード」、「売上金額」、「個数」が設
定され、「担当者」コード及び「商品コド」がキーワー
ドにとして設定されている。ソースファイル群24は、
上記キーワードKに基づいて例えば昇順にソートしたレ
コードを記憶している。
The file-specific record structure memory 23 stores the record structure of each file for the source file group 24, as shown in FIG. 5, and the file name, keyword, word No. 1, word name, etc. are set as the data. Ru. For example, for file name A, "product code", "quantity", and "amount" are set as word names, and "product code" is set as a keyword. In addition, for file name B, "person in charge code", "product code", "sales amount", and "quantity" are set as word names, and "person in charge" code and "product code" are set as keywords. It is set. The source file group 24 is
Records sorted, for example, in ascending order based on the keyword K are stored.

第6図は、ソースファイル群24の各ファイルにおける
可変長レコード形態を示すもので、「キデータ」、「ワ
ードデータ」がそれぞれ複数記憶できようになっている
。この場合、各レコードの先頭位置には、レコード区切
り記号「(」が挿入され、「キーデータ」と「ワードデ
ータ」との間には区切り記号「;」が挿入される。
FIG. 6 shows a variable length record format in each file of the source file group 24, and is capable of storing a plurality of "key data" and "word data" respectively. In this case, a record delimiter "(" is inserted at the beginning of each record, and a delimiter ";" is inserted between "key data" and "word data".

次に上記実施例の動作を第7図及び第8図のフローチャ
ートに従って説明する。
Next, the operation of the above embodiment will be explained according to the flowcharts of FIGS. 7 and 8.

入力部13から帳票作成の指示を入力することにより、
CPU11の制御に従って第7図のフロチャートに示す
処理が実行される。CPUI 1は、まず、第2図に示
す入力定義書の設定画面を表示部14に表示し、ソース
ファイル名及び定義キーに関するデータ入力をガイドす
る(ステップAt)。この入力画面において、ユーザー
はソースファイル名及びキーワードを定義する。今、例
えばソースファイルBについて第9図(C)に示す売上
順位表を作成するものとすれば、第2図に示すようにソ
ースファイル名としてrBJを指定すると共に、キーワ
ードとして「売上金額(D)」及び「担当者コード(U
)」を指定する。なお、上記(D)はソートが降順であ
ることを示し、(U)は昇順であることを示している。
By inputting instructions for creating a form from the input section 13,
The processing shown in the flowchart of FIG. 7 is executed under the control of the CPU 11. First, the CPU 1 displays the input definition document setting screen shown in FIG. 2 on the display unit 14, and guides data input regarding the source file name and definition key (step At). In this input screen, the user defines source file names and keywords. For example, if we were to create the sales ranking table shown in Figure 9(C) for source file B, we would specify rBJ as the source file name and set the keyword ``sales amount (D )” and “Person in charge code (U
)". Note that (D) above indicates that the sorting is in descending order, and (U) indicates that the sorting is in ascending order.

この入力定義書は、入力定義書メモリ15に記憶設定さ
れる。
This input definition document is stored and set in the input definition document memory 15.

上記入力定義書の設定を終了すると、第3図に示す出力
定義書の設定画面を表示部14に表示し、出力したいワ
ード名、出力X座標に関するデータ入力をガイドする(
ステップA2)。この入力画面において、ユーザーはワ
ード名及び出力X座標を設定する。この出力X座標は、
出力データの印字開始桁の位置を指定するもので、例え
ば画面上に表示されるX座標ガイドを参照して設定する
When the setting of the input definition document is completed, the setting screen of the output definition document shown in FIG. 3 is displayed on the display unit 14, and the data input regarding the word name and output
Step A2). In this input screen, the user sets the word name and output X coordinate. This output X coordinate is
This is used to specify the position of the print start digit of the output data, and is set by, for example, referring to the X coordinate guide displayed on the screen.

第3図は、「売上金額」、「担当者コード」、「商品コ
ード」からなる売上順位表を作成する場合の設定例を示
している。この出力定義書は、出力定義書メモリ20に
記憶設定される。
FIG. 3 shows an example of settings for creating a sales ranking table consisting of "sales amount,""person in charge code," and "product code." This output definition document is stored and set in the output definition document memory 20.

上記出力定義書の設定を終了すると、ソート要否判別部
16が設定されたキーワードの種類とファイルにおける
現在のキーワードの種類とを判別することによりソート
の要否を自動判別し、ソートが必要な場合はソートフラ
グをONし、ソートが不要な場合はソートフラグをOF
Fする(ステップA3)。このソート要否の判別処理に
ついては詳細を後述する。
When the setting of the above output definition document is completed, the sorting necessity determining unit 16 automatically determines whether sorting is necessary by determining the type of keyword set and the type of keyword currently in the file, and if sorting is necessary. If so, turn on the sort flag, and if sorting is not necessary, turn the sort flag off.
F (step A3). The details of the process for determining whether or not sorting is necessary will be described later.

その後、上記ソートフラグのON / OF Fをチエ
ツクしてソートが必要か否かを判別しくステップA5)
、ソートが必要であればソート処理を実行しくステップ
A6)、帳票出力を行なう(ステップA7)。また、上
記ステップA5でソーI・の必要がないと判別された場
合は、直ちにステップA7に進んで帳票出力を行なう。
After that, check the ON/OFF status of the sort flag to determine whether sorting is necessary or not (step A5).
, if sorting is necessary, execute the sorting process (step A6), and output the form (step A7). If it is determined in step A5 that there is no need for sawing, the process immediately proceeds to step A7 to output a form.

次に上記ステップA3のソート要否判別部16によるソ
ート判別処理の詳細について第8図により説明する。ソ
ート要否判別部16は、まず、ソートフラグを0FFL
 (ステップBl)、内部のレジスタiに「0」をセッ
トする(ステップB2)。次いで入力定義書メモリ15
より定義キーの先頭ワード、第2図の例では「売上金額
」を読出しくステップB3)、この読出しワードに対応
するワードナンバをファイル別レコード構造メモリ23
から読出しくステップB4)、このワドナンバに対して
昇/降順を定義ナンバメモリ17に設定する(ステップ
B5)。第5図の例では、ファイルBにおける「売上金
額」のソードナンバは「3」であり、また、この「売上
金額」は入力定義書メモリ15において降順指定が行な
われているので、ワードナンバ「3」が降順である旨を
定義ナンバメモリ17に設定する。
Next, details of the sorting determination process by the sorting necessity determining section 16 in step A3 will be explained with reference to FIG. The sorting necessity determining unit 16 first sets the sorting flag to 0FFL.
(Step B1), and sets "0" to internal register i (Step B2). Next, input definition memory 15
Then, read out the first word of the definition key, in the example of FIG.
Then, the ascending/descending order for this word number is set in the definition number memory 17 (step B5). In the example shown in FIG. 5, the word number of "sales amount" in file B is "3", and since this "sales amount" is specified in descending order in the input definition memory 15, the word number "sales amount" is "3". 3'' is set in the definition number memory 17 to the effect that it is in descending order.

その後、ソート要否判別部16は、レジスタiの内容を
r+IJL(ステップB8)、iの値が定義キーの数以
上か否かを判断し、以上であればステップB8に進み、
以上でなければステップB9に進む。この時点ではlの
値は「1」、ファイルBの定義キー数は「2」であるの
で、ステップB7の判断結果はNoとなり、ステップB
8に進んで上記第2図の入力定義書における定義キーの
次のワード「担当者コード」を読出す。
Thereafter, the sorting necessity determining unit 16 determines whether the contents of register i are r+IJL (step B8), the value of i is equal to or greater than the number of definition keys, and if it is, the process proceeds to step B8.
If not, proceed to step B9. At this point, the value of l is "1" and the number of definition keys of file B is "2", so the judgment result in step B7 is No, and step B
Proceeding to step 8, the next word "person in charge code" of the definition key in the input definition document shown in FIG. 2 is read out.

その後、ステップB4に戻り、ファイル別しコド構造メ
モリ23からファイルBにおける「担当者コード」の対
応ワードナンバ「1」を読出し、このワードナンバに対
して昇/降順、この場合には昇順を定義ナンバメモリ1
7に設定する(ステップB5)。そして、レジスタiの
内容を「+1」して「2」としくステップB6)、iの
値が定義キーの数以上か否かを判断する(ステップB7
)。
After that, return to step B4, read out the word number "1" corresponding to the "person in charge code" in file B from the file code structure memory 23, and define ascending/descending order, in this case, ascending order for this word number. Number memory 1
7 (step B5). Then, the content of register i is incremented by "+1" to "2" (step B6), and it is determined whether the value of i is greater than or equal to the number of definition keys (step B7).
).

入力定義書メモリ15の定義キー数は「2」であるので
、ステップB7の判断結果はYESとなり、ステップB
9に進む。
Since the number of definition keys in the input definition document memory 15 is "2", the judgment result in step B7 is YES, and step B
Proceed to step 9.

このステップB9では、レコードのキー数が定義キー数
以上であるか否かを判断する。ファイルBのレコードキ
ー数及び定義キー数は共に「2」であるので、ステップ
B9の判断結果はYESとなり、ステップBIOに進ん
でレジスタlに「1」をセットする。そして、定義ナン
バメモリ17から先頭ナンバ「3」を読出しくステップ
B11)、この読出ナンバ「3」がレジスタiの内容と
一致しているか否かをチエツクする(ステップB12)
In this step B9, it is determined whether the number of keys of the record is greater than or equal to the number of defined keys. Since the number of record keys and the number of definition keys of file B are both "2", the determination result in step B9 is YES, and the process proceeds to step BIO, where "1" is set in register l. Then, the first number "3" is read from the definition number memory 17 (Step B11), and it is checked whether this read number "3" matches the contents of register i (Step B12).
.

即ち、定義キーの順番とレコードキーの順番が一致して
いるか否かをチエツクする。この場合、レジスタiの内
容は「1」であるので、ステップB12の判別結果はN
Olつまり、定義キーの順番とレコードキーの順番が不
一致であると判断され、ステップB17に進んでソート
フラグをONする。
That is, it is checked whether the order of definition keys matches the order of record keys. In this case, the content of register i is "1", so the determination result in step B12 is N
In other words, it is determined that the order of the definition keys and the order of the record keys do not match, and the process proceeds to step B17 to turn on the sort flag.

上記ステップB12の判断結果がYES、つまり、定義
キーとレコードキーの最初の順位が一致していた場合は
、ステップB13に進んで更に定義ナンバメモリ17に
設定されたナンバが昇順か否かを判断する。この判断結
果、昇順でなければ上記ステップB17に進み、昇順で
あればステップB14に進んでレジスタiの内容を「+
1」し、レジスタiの値が定義キーの数より大きくなっ
たか否かを判断する。レジスタiの値が定義キーの数よ
り大きければ、定義キーの順番とレコードキーの順番が
一致し、かつ、共に昇順となっている場合、即ち、定義
内容がソースファイルに記憶されているファイルデータ
とソート条件が一致している場合であるので、ソートが
不要であると判断し、ソートフラグをOFFした状態で
判別処理を終了する。
If the determination result in step B12 is YES, that is, the initial order of the definition key and record key match, the process proceeds to step B13, where it is further determined whether or not the numbers set in the definition number memory 17 are in ascending order. do. As a result of this judgment, if the order is not in ascending order, the process proceeds to step B17, and if it is in ascending order, the process proceeds to step B14 and the contents of register i are changed to "+".
1'' and determines whether the value of register i has become greater than the number of defined keys. If the value of register i is greater than the number of definition keys, the order of definition keys matches the order of record keys, and both are in ascending order, that is, file data whose definition contents are stored in the source file. Since this is a case where the sorting conditions match, it is determined that sorting is not necessary, and the determination processing is ended with the sorting flag turned OFF.

また、上記ステップB15においてレジスタiの値が定
義キー数より大きくないと判断された場合は、入力定義
書メモリ15から次のナンバを読出し、ステップB12
に戻る。以下、同様の処理を繰り返し、定義内容とファ
イルデータのソート条件が一致している場合はソートフ
ラグをOFF状態に保持し、不一致の場合はソートフラ
グをONして処理を終了する。
Further, if it is determined in step B15 that the value of register i is not greater than the number of definition keys, the next number is read from the input definition document memory 15, and step B12
Return to Thereafter, the same process is repeated, and if the definition content and the file data sorting conditions match, the sort flag is kept in the OFF state, and if they do not match, the sort flag is turned ON and the process ends.

また、上記ステップB9において、レコードキーの数が
定義キー数より少ないと判断された場合は、ステップ8
1gに進んでステップB24までの処理を行なう。この
ステップB1g〜B24では、上記ステップBIO〜B
1Bとほぼ同様の処理を行なう。
In addition, if it is determined in step B9 that the number of record keys is less than the number of defined keys, step 8
The process advances to 1g and processes up to step B24 are performed. In steps B1g to B24, steps BIO to B
Almost the same processing as 1B is performed.

即ち、ステップB15でレジスタiの値が定義キーの数
より大きいか否かを判断しているのに対し、ステップ8
23ではレジスタiの値がレコードキーの数より大きい
か否かを判断するようにした点が異なるのみで、その他
の処理は全く同じである。
That is, while step B15 judges whether the value of register i is greater than the number of definition keys, step B15 judges whether the value of register i is greater than the number of definition keys.
23, the only difference is that it is determined whether the value of register i is greater than the number of record keys, and the other processing is exactly the same.

上記ステップ818〜B24の処理においても、入力定
義書の内容とファイルデータのソート条件が一致してい
るか否かをチエツクするもので、定義内容とファイルデ
ータのソート条件が一致している場合はソートフラグを
OFF状態に保持し、不一致の場合はソートフラグをO
Nして処理を終了する。
In the processing of steps 818 to B24 described above, it is checked whether the contents of the input definition document and the sorting conditions of the file data match, and if the contents of the definition and the sorting conditions of the file data match, the sorting is performed. Keep the flag OFF, and if there is a mismatch, turn the sort flag OFF.
Press N to end the process.

上記ソート要否判別処理によりソートフラグがONされ
ると、ソート処理部18が第7図のステップA6に示す
ソート処理を実行する。第9図はファイルBに記憶され
ているデータから売上順位表を作成する場合のソート及
び帳票出力について示したものである。
When the sorting flag is turned on by the sorting necessity determination process, the sorting processing unit 18 executes the sorting process shown in step A6 of FIG. 7. FIG. 9 shows sorting and form output when creating a sales ranking table from the data stored in file B.

第9図(a)はファイルBの記憶データを示すもので、
このファイルは第5図に示したように第1キーワードで
ある「担当者コード」によりソートされ、担当者コード
が同じ場合に第2キーワードである「商品コード」によ
りソートされている。
FIG. 9(a) shows the stored data of file B.
As shown in FIG. 5, this file is sorted by the first keyword, "person in charge code," and when the person in charge codes are the same, it is sorted by the second keyword, "product code."

しかして、ソート処理部18は、ソート要否判別部16
においてソートが必要であると判別されると、つまり、
ソートフラグがONされると、ソースファイル群24か
らファイルBの内容をワークファイル19に読出し、第
2図に示す入力定義書に定義された「売上金額」を第1
キーワードとしてソートし、売上金額が同じ場合には「
担当者コード」を第2キーワードとしてソートする。第
9図(b)はこのソート結果を示している。
Therefore, the sorting processing unit 18
When it is determined that sorting is necessary, that is,
When the sort flag is turned ON, the contents of file B are read from the source file group 24 to the work file 19, and the "sales amount" defined in the input definition sheet shown in FIG.
Sort by keyword, and if the sales amount is the same,
Sort by using "person in charge code" as the second keyword. FIG. 9(b) shows the result of this sorting.

上記のソート処理を終了すると、帳票作成部21が動作
し、第7図のステップA7に示す帳票出力処理を行なう
。即ち、帳票作成部21は、出力定義書メモリ20の設
定内容に基づいて、「売上金額」、「担当者コード」、
「商品コード」の順にワークファイル19からデータを
読出し、帳票出力部22に出力してプリントアウトする
When the above sorting process is completed, the form creation section 21 operates and performs the form output process shown in step A7 in FIG. That is, the form creation unit 21 generates "sales amount", "person in charge code",
Data is read from the work file 19 in the order of "product code" and output to the form output section 22 to be printed out.

第9図(C)は、この帳票(売上順位表)の出力結果を
示している。また、上記ソート要否判別部16でソート
の必要が無いと判別された場合には、上記のソート処理
を行なうことなく、直ちに帳票出力処理を実行する。
FIG. 9(C) shows the output result of this form (sales ranking table). Further, if the sorting necessity determining unit 16 determines that there is no need for sorting, the form output process is immediately executed without performing the above sorting process.

上記のように入力定義書メモリ15に設定された定義内
容に基づいてソートの要否が判別され、ソートが必要で
あればソートを行なった後に帳票出力が行なわれる。ま
た、ソートの必要が無い場合、つまり、指定ファイルの
記憶データが入力定義書メモリ15の定義内容と一致し
ている場合には直ちに帳票出力が行なわれる。
As described above, it is determined whether or not sorting is necessary based on the definition contents set in the input definition document memory 15, and if sorting is necessary, the form is output after sorting. Further, if there is no need for sorting, that is, if the data stored in the specified file matches the definition contents of the input definition document memory 15, the form is immediately output.

[発明の効果] 以上詳記したように本発明によれば、設定されたキーワ
ードの種類とファイルにおける現在のキーワードの種類
を判別してソートの要、不要を自動弁別するようにした
ので、無駄なソート処理を無くして帳票出力を効率的に
行なうことができ、また、ファイルの構成を変更しても
、そのファイルを処理するプログラムに関して、ユーザ
ーがソートの要、不要、ソートキーなどの変更を指示す
る必要が無くなり、帳票出力を容易に行なうことができ
る。
[Effects of the Invention] As detailed above, according to the present invention, it is possible to automatically determine whether sorting is necessary or not by determining the type of keyword set and the type of keyword currently in the file. It is possible to efficiently output forms by eliminating the need for sorting processing, and even if the file structure is changed, the user can instruct the program that processes the file to change whether or not sorting is necessary, sort keys, etc. There is no need to do this, and the form can be output easily.

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

第1図は本発明の一実施例によるファイル処理装置の回
路構成を示すブロック図、第2図は入力定義書の設定例
を示す図、第3図は出力定義書の設定例を示す図、第4
図は定義ナンバメモリの記憶構成を示す図、第5図はフ
ァイル別レコード構造メモリのデータ記憶例を示す図、
第6図はソースファイルの可変長レコード形態を示す図
、第7図は帳票作成処理を示すフローチャート、第8図
はソート判別処理の詳細を示すフローチャート、第9図
は指定ファイルに対するソート及び帳票出力の具体例を
示す図である。 11・・・CPU、12・・・パスライン、13・・・
入力部、14・・・表示部、15・・・入力定義書メモ
リ、16・・・ソート要否判別部、17・・・定義ナン
バメモリ、18・・・ソート処理部、19・・・ワーク
ファイル、20・・・出力定義書メモリ、21・・・帳
票出力部、23・・・ファイル別レコード構造メモリ、
24・・・ソースファイル群。
FIG. 1 is a block diagram showing a circuit configuration of a file processing device according to an embodiment of the present invention, FIG. 2 is a diagram showing an example of settings for an input definition document, and FIG. 3 is a diagram showing an example of settings for an output definition document. Fourth
The figure shows the storage configuration of the definition number memory, and FIG. 5 shows an example of data storage in the file-by-file record structure memory.
Figure 6 is a diagram showing the variable length record format of the source file, Figure 7 is a flowchart showing the form creation process, Figure 8 is a flowchart showing details of the sorting determination process, and Figure 9 is sorting and form output for the specified file. It is a figure showing a specific example. 11...CPU, 12...Pass line, 13...
Input section, 14... Display section, 15... Input definition document memory, 16... Sorting necessity determining section, 17... Definition number memory, 18... Sorting processing section, 19... Work File, 20... Output definition memory, 21... Form output section, 23... Record structure memory for each file,
24... Source file group.

Claims (1)

【特許請求の範囲】 予め決められたキーワード順にソートされたレコードを
記憶する記憶手段と、 任意のキーワードを設定するキーワード設定手段と、 上記予め決められたキーワードと上記キーワード設定手
段により任意に設定されたキーワードの種類が一致する
か否かを判別する判別手段と、この判別手段により一致
していないと判別された際、設定されたキーワードを基
準にしてレコードをキーワード順にソートするソート手
段と、このソート手段によりソートされたレコードを設
定されたキーワード順に出力する出力手段とを具備した
ことを特徴とするファイル処理装置。
[Claims] Storage means for storing records sorted in the order of predetermined keywords; keyword setting means for setting arbitrary keywords; a discriminating means for discriminating whether or not the types of keywords set match; a sorting means for sorting the records in keyword order based on the set keywords when the discriminating means determines that they do not match; 1. A file processing device comprising: output means for outputting records sorted by a sorting means in order of set keywords.
JP02158784A 1990-06-19 1990-06-19 File processing device Expired - Lifetime JP3143910B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02158784A JP3143910B2 (en) 1990-06-19 1990-06-19 File processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP02158784A JP3143910B2 (en) 1990-06-19 1990-06-19 File processing device

Publications (2)

Publication Number Publication Date
JPH0449416A true JPH0449416A (en) 1992-02-18
JP3143910B2 JP3143910B2 (en) 2001-03-07

Family

ID=15679264

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02158784A Expired - Lifetime JP3143910B2 (en) 1990-06-19 1990-06-19 File processing device

Country Status (1)

Country Link
JP (1) JP3143910B2 (en)

Also Published As

Publication number Publication date
JP3143910B2 (en) 2001-03-07

Similar Documents

Publication Publication Date Title
US4924385A (en) Method of detecting types of parts constituting a larger group of parts
EP1248206A1 (en) Method and apparatus for database table definition
JP3020849B2 (en) Data retrieval device
JPH0449416A (en) File processor
US7216124B2 (en) Method for generic list sorting
JP2898305B2 (en) File management device and file management method
US6643632B1 (en) Data processing system and computer-readable recording medium recorded with a program for causing a computer to process data
JPH0782429B2 (en) How to merge multiple files
JPH0449417A (en) File processor
JPH06325101A (en) Electronic filing device
JPS63137335A (en) Method for controlling file in storage device
JP2760755B2 (en) Method of storing and redisplaying the operation button history for computer processing
JPH04135266A (en) Picture display system
CN116795779A (en) A file directory processing method and device for Linux operating system
JPH04230517A (en) Hierarchical menu processing device
JPH04130570A (en) Document processor
JP3553093B2 (en) Data file system
JPH10228451A (en) System for restricting start of application program
JPH0619040U (en) Deduction amount file generator
JPH0259861A (en) Preparation, storage, and retrieval device for indexed document
JPH04143858A (en) Document processor
JPH0816382A (en) Erroneously corrected line retrieving device
JPH09274620A (en) Data output device
JPH01200446A (en) Data processor
JPH03282841A (en) Direct input/output processing system for variable length record

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090105

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100105

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110105

Year of fee payment: 10

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110105

Year of fee payment: 10