JP3143910B2 - File processing device - Google Patents

File processing device

Info

Publication number
JP3143910B2
JP3143910B2 JP02158784A JP15878490A JP3143910B2 JP 3143910 B2 JP3143910 B2 JP 3143910B2 JP 02158784 A JP02158784 A JP 02158784A JP 15878490 A JP15878490 A JP 15878490A JP 3143910 B2 JP3143910 B2 JP 3143910B2
Authority
JP
Japan
Prior art keywords
file
sorting
keyword
definition
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.)
Expired - Lifetime
Application number
JP02158784A
Other languages
Japanese (ja)
Other versions
JPH0449416A (en
Inventor
克 松村
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)

Description

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

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

[従来技術] 従来のオフィスコンピュータ等においてファイル処理
を行なう場合、ユーザー(プログラマ)がディスク上の
ファイルのデータの並びや、必要とするデータの並びか
らソートの必要性を判断し、ソートが必要であればデー
タ中のどのフィールドをキーとしてソートを行なうかと
いった手順を自から考え、プログラミングによってコン
ピュータに指示している。即ち、ユーザーがプログラミ
ングを行なう時点でソートの要、不要を判断して指示し
ている。
[Prior Art] When file processing is performed in a conventional office computer or the like, a user (programmer) determines the necessity of sorting from the arrangement of data in a file on a disk and the arrangement of necessary data, and sorting is necessary. If there is, the procedure of determining which field in the data is to be used as a key is considered, and the computer is instructed by programming. That is, at the time when the user performs programming, the necessity / unnecessity of sorting is determined and instructed.

[発明が解決しようとする課題] 上記のように従来ではプログラミングを行なう時点
で、ユーザーがソートの要、不要を判断して指示を与え
ており、このためファイルの構成を変更すると、そのフ
ァイルを処理する全てのプログラムに関して、ソートの
要、不要、ソートキーなどの変更が必要になるという問
題があった。
[Problem to be Solved by the Invention] As described above, conventionally, at the time of programming, a user judges whether sorting is necessary or not and gives an instruction. Therefore, if the file configuration is changed, the file is changed. For all the programs to be processed, there is a problem that sorting is necessary or not necessary, and a sort key or the like needs to be changed.

このような原因は、ファイル処理に際してソートの
要、不要を自動的に判断できず、ユーザー自身が判断し
なければならないところにあると考えられる。
Such a cause is considered to be attributable to the fact that it is not possible to automatically determine whether sorting is necessary or not at the time of file processing, and the user must make a determination.

してみれば、ファイル処理時に、設定されたキーワー
ドの種類とファイル上のレコードの並びからソートの
要、不要を自動的に判別し、その判別結果に従って自動
的にソートが行なわれるようにすれば、ファイルの構成
を変更しても、そのファイルを処理するプログラムに関
して、ユーザーがソートの要、不要、ソートキーなどの
変更を指示する必要が無くなることは明らかである。
Then, at the time of file processing, if it is necessary to automatically determine whether sorting is necessary or not based on the type of set keywords and the arrangement of records on the file, it is possible to automatically sort according to the determination result Obviously, even if the configuration of the file is changed, the user does not need to instruct the program that processes the file to change the sort, necessity, or sort key.

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

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

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

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

任意のキーワードを設定するキーワード設定手段。 Keyword setting means for setting an arbitrary keyword.

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

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

例えば入力定義書メモリ15の設定内容を参照してソー
トの要否を判別するソート要否判別部16である。
For example, the sorting necessity judging unit 16 judges the necessity of sorting by referring to the setting contents of the input definition document memory 15.

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

例えばソート処理部18である。 An example is the sort processing unit 18.

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

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

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

帳票を作成する際、キーワード設定手段により帳票作
成の基準となるキーワードを設定する。このキーワード
が設定されると、この設定キーワードと予めファイルに
対して決められているキーワードの種類が一致するか否
かが判別手段により判別される。この判別手段により両
者のキーワードが一致していないと判別された場合の
み、上記キーワード設定手段に設定されたキーワードを
基準にしてファイルのレコードをキーワード順にソート
する。そして、このソート処理を終了すると、そのソー
トされたレコードを設定されたキーワード順に出力して
帳票を作成する。
When creating a form, a keyword which is a reference for creating the form is set by the keyword setting means. When this keyword is set, it is determined by the determination unit whether or not the set keyword matches the type of keyword determined in advance for the file. Only when this discriminating means determines that the two keywords do not match, the records of the file are sorted in the order of keywords based on the keyword set in the keyword setting means. When the sorting process is completed, the sorted records are output in the order of the set keywords to create a form.

上記のように設定されたキーワードの種類とファイル
における現在のキーワードの種類を判別してソートの種
類を自動弁別することにより、ファイルの構成を変更し
ても、そのファイルを処理するプログラムに関して、ユ
ーザーがソートの要、不要、ソートキーなどの変更を指
示する必要が無くなる。
By discriminating the type of keyword set as described above and the type of the current keyword in the file and automatically discriminating the type of sorting, even if the configuration of the file is changed, a user who processes the file can use the program. Eliminates the necessity of sorting, the necessity of sorting, and the necessity of giving an instruction to change the sort key or the like.

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

第1図は、全体の構成を示すブロック図である。同図
において、符号11は回路全体の制御を行なうCPUで、可
変長処理が可能である。このCPU11にはバスライン12を
介して入力部13、表示部14、入力定義書メモリ15、ソー
ト要否判別部16、定義ナンバメモリ17、ソート処理部1
8、出力定義書メモリ20、帳票作成部21、ファイル別レ
コード構造メモリ23、ソースファイル群24が接続され
る。また、上記ソート処理部18にはワークファイル19が
接続され、帳票作成部21には帳票出力部22が接続され
る。
FIG. 1 is a block diagram showing the overall configuration. In the figure, reference numeral 11 denotes a CPU for controlling the entire circuit, which can perform variable length processing. The CPU 11 has an input unit 13, a display unit 14, an input definition document memory 15, a sorting necessity determining unit 16, a definition number memory 17, and a sorting unit 1 via a bus line 12.
8. The output definition document memory 20, the form creation unit 21, the file-specific record structure memory 23, and the source file group 24 are connected. A work file 19 is connected to the sort processing unit 18, and a form output unit 22 is connected to the form creation unit 21.

上記入力定義書メモリ15は、第2図に示す各ソースフ
ァイル別の入力定義書を記憶するもので、各入力定義書
には、ソースファイル名と定義キーが設定される。この
入力定義書メモリ15の設定内容は、ソート要否判別部16
により参照される。このソート要否判別部16は、内部に
レジスタiを備え、ファイル処理時に入力定義書メモリ
15の定義内容を参照してソートの要否を判別し、ソート
が必要であれば定義ナンバメモリ17に第4図に示すよう
に定義ナンバとソート方向(昇順/降順)を設定する。
The input definition document memory 15 stores an input definition document 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 judging section 16 has a register i therein, and stores an input definition document memory during file processing.
The necessity of sorting is determined by referring to the definition contents of No. 15, and if sorting is necessary, the definition number and the sorting direction (ascending / descending order) are set in the definition number memory 17 as shown in FIG.

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

ファイル別レコード構造メモリ23は、第5図に示すよ
うにソースファイル群24に対する各ファイル別のレコー
ド構造を記憶するもので、そのデータとして、ファイル
名、キーワード、ワードNo.、ワード名等が設定され
る。例えばファイル名Aに対しては、ワード名として
「商品コード」、「個数」、「金額」が設定され、「商
品コード」がキーワードKとして設定されている。ま
た、ファイル名Bに対しては、ワード名として「担当者
コード」、「商品コード」、「売上金額」、「個数」が
設定され、「担当者」コード及び「商品コード」がキー
ワードKとして設定されている。ソースファイル群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 as the data, a file name, a keyword, a word No., a word name, etc. are set. Is done. For example, for the file name A, “product code”, “quantity”, and “amount” are set as word names, and “product code” is set as a keyword K. For the file name B, "person in charge code", "product code", "sales amount", and "quantity" are set as word names, and the "person in charge" code and "product code" are used as keywords K. Is set. Source files 24
Stores, for example, records sorted in ascending order based on the keyword K.

第6図は、ソースファイル群24の各ファイルにおける
可変長レコード形態を示すもので、「キーデータ」、
「ワードデータ」がそれぞれ複数記憶できるようになっ
ている。この場合、各レコードの先頭位置には、レコー
ド区切り記号「(」が挿入され、「キーデータ」と「ワ
ードデータ」との間には区切り記号「;」が挿入され
る。
FIG. 6 shows a variable-length record format in each file of the source file group 24.
A plurality of "word data" can be stored. In this case, a record delimiter “(” is inserted at the head position 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 described with reference to the flowcharts of FIGS.

入力部13から帳票作成の指示を入力することにより、
CPU11の制御に従って第7図のフローチャートに示す処
理が実行される。CPU11は、まず、第2図に示す入力定
義書の設定画面を表示部14に表示し、ソースファイル名
及び定義キーに関するデータ入力をガイドする(ステッ
プA1)。この入力画面において、ユーザーはソースファ
イル名及びキーワードを定義する。今、例えばソースフ
ァイルBについて第9図(c)に示す売上順位表を作成
するものとすれば、第2図に示すようにソースファイル
名として「B」を指定すると共に、キーワードとして
「売上金額(D)」及び「担当者コード(U)」を指定
する。なお、上記(D)はソートが降順であることを示
し、(U)は昇順であることを示している。この入力定
義書は、入力定義書メモリ15に記憶設定される。
By inputting a form creation instruction from the input unit 13,
Under the control of the CPU 11, the processing shown in the flowchart of FIG. 7 is executed. First, the CPU 11 displays the input definition document setting screen shown in FIG. 2 on the display unit 14, and guides the data input relating to the source file name and the definition key (step A1). In this input screen, the user defines a source file name and a keyword. Now, for example, if the sales ranking table shown in FIG. 9C is created for the source file B, “B” is designated as the source file name as shown in FIG. (D) "and" person in charge code (U) ". (D) indicates that the sort is in descending order, and (U) indicates that the sort is in ascending order. This input definition document is stored and set in the input definition document memory 15.

上記入力定義書の設定を終了すると、第3図に示す出
力定義書の設定画面を表示部14に表示し、出力したいワ
ード名、出力x座標に関するデータ入力をガイドする
(ステップA2)。この入力画面において、ユーザーはワ
ード名及び出力x座標を設定する。この出力x座標は、
出力データの印字開始桁の位置を指定するもので、例え
ば画面上に表示されるx座標ガイドを参照して設定す
る。第3図は、「売上金額」、「担当者コード」、「商
品コード」からなる売上順位表を作成する場合の設定例
を示している。この出力定義書は、出力定義書メモリ20
に記憶設定される。
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 to guide data input relating to the word name to be output and the output x coordinate (step A2). In this input screen, the user sets a word name and an output x coordinate. This output x coordinate is
This specifies the position of the print start digit of the output data, and is set, for example, with reference to an x-coordinate guide displayed on the screen. FIG. 3 shows a setting example when a sales ranking table including “sales amount”, “person code”, and “product code” is created. This output definition document is stored in the output definition document memory 20.
Is stored and set.

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

その後、上記ソートフラグのON/OFFをチェックしてソ
ートが必要か否かを判別し(ステップA5)、ソートが必
要であればソート処理を実行し(ステップA6)、帳票出
力を行なう(ステップA7)。また、上記ステップA5でソ
ートの必要がないと判別された場合は、直ちにステップ
A7に進んで帳票出力を行なう。
Thereafter, ON / OFF of the sort flag is checked to determine whether or not sorting is necessary (step A5). If sorting is necessary, a sorting process is executed (step A6), and a form is output (step A7). ). If it is determined in step A5 that sorting is not necessary,
Proceed to A7 to output the form.

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

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

その後、ステップB4に戻り、ファイル別レコード構造
メモリ23からファイルBにおける「担当者コード」の対
応ワードナンバ「1」を読出し、このワードナンバに対
して昇/降順、この場合には昇順を定義ナンバメモリ17
に設定する(ステップB5)。そして、レジスタiの内容
を「+1」して「2」とし(ステップB6)、iの値が定
義キーの数以上か否かを判断する(ステップB7)。入力
定義書メモリ15の定義キー数は「2」であるので、ステ
ップB7の判断結果はYESとなり、ステップB9に進む。
Thereafter, returning to step B4, the corresponding word number "1" of the "person in charge" in the file B is read from the file-based record structure memory 23, and the ascending / descending order, in this case, the ascending order is defined for this word number. Memory 17
(Step B5). Then, the content of the register i is incremented by "+1" to "2" (step B6), and it is determined whether or not the value of i is equal to or greater than the number of definition keys (step B7). Since the number of definition keys in the input definition document memory 15 is “2”, the determination result in step B7 is YES, and the process proceeds to step B9.

このステップB9では、レコードのキー数が定義キー数
以上であるか否かを判断する。ファイルBのレコードキ
ー数及び定義キー数は共に「2」であるので、ステップ
B9の判断結果はYESとなり、ステップB10に進んでレジス
タiに「1」をセットする。そして、定義ナンバメモリ
17から先頭ナンバ「3」を読出し(ステップB11)、こ
の読出ナンバ「3」がレジスタiの内容と一致している
か否かをチェックする(ステップB12)。即ち、定義キ
ーの順番とレコードキーの順番が一致しているか否かを
チェックする。この場合、レジスタiの内容は「1」で
あるので、ステップB12の判別結果はNO、つまり、定義
キーの順番とレコードキーの順番が不一致であると判断
され、ステップB17に進んでソートフラグをONする。
In this step B9, it is determined whether or not the number of keys of the record is equal to or larger than the number of defined keys. Since the number of record keys and the number of definition keys of file B are both "2",
The decision result in B9 is YES, and the process proceeds to step B10 to set "1" in the register i. And the definition number memory
The head number "3" is read from 17 (step B11), and it is checked whether or not the read number "3" matches the contents of the register i (step B12). That is, it is checked whether or not the order of the definition keys and the order of the record keys match. In this case, since the content of the register i is "1", the result of the determination in step B12 is NO, that is, it is determined that the order of the definition keys and the order of the record keys do not match. Turn ON.

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

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

また、上記ステップB9において、レコードキーの数が
定義キー数より少ないと判断された場合は、ステップB1
8に進んでステップB24までの処理を行なう。このステッ
プB18〜B24では、上記ステップB10〜B16とほぼ同様の処
理を行なう。即ち、ステップB15でレジスタiの値が定
義キーの数より大きいか否かを判断しているのに対し、
ステップB23ではレジスタiの値がレコードキーの数よ
り大きいか否かを判断するようにした点が異なるのみ
で、その他の処理は全く同じである。上記ステップB18
〜B24の処理においても、入力定義書の内容とファイル
データのソート条件が一致しているか否かをチェックす
るもので、定義内容とファイルデータのソート条件が一
致している場合はソートフラグをOFF状態に保持し、不
一致の場合はソートフラグをONして処理を終了する。
If it is determined in step B9 that the number of record keys is smaller than the number of defined keys, step B1
Proceeding to step 8, the process up to step B24 is performed. In steps B18 to B24, substantially the same processing as in steps B10 to B16 is performed. That is, while it is determined in step B15 whether the value of the register i is larger than the number of definition keys,
In step B23, the only difference is that it is determined whether or not the value of the register i is greater than the number of record keys. The other processing is exactly the same. Step B18 above
Also in the processing from B24 to B24, it checks whether or not the contents of the input definition document and the file data sort conditions match, and turns off the sort flag if the definition contents and the file data sort conditions match. The state is maintained, and if they do not match, the sort flag is turned on and the processing is terminated.

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

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

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

上記のソート処理を終了すると、帳票作成部21が動作
し、第7図のステップA7に示す帳票出力処理を行なう。
即ち、帳票作成部21は、出力定義書メモリ20の設定内容
に基づいて、「売上金額」、「担当者コード」、「商品
コード」の順にワークファイル19からデータを読出し、
帳票出力部22に出力してプリントアウトする。第9図
(c)は、この帳票(売上順位表)の出力結果を示して
いる。また、上記ソート要否判別部16でソートの必要が
無いと判別された場合には、上記のソート処理を行なう
ことなく、直ちに帳票出力処理を実行する。
When the above sort processing is completed, the form creation unit 21 operates to perform the form output processing shown in step A7 of FIG.
That is, the form creation unit 21 reads data from the work file 19 in the order of “sales amount”, “person in charge code”, and “product code” based on the settings in the output definition document memory 20,
The data is output to the form output unit 22 and printed out. FIG. 9 (c) shows an output result of this form (sales ranking table). When the sorting necessity determination unit 16 determines that sorting is not necessary, the form output process is immediately executed without performing the above-described sorting process.

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

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

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

第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 setting an input definition document, FIG. 3 is a diagram showing a setting example of an output definition document, 4th
FIG. 5 is a diagram showing a storage configuration of a definition number memory; FIG. 5 is a diagram showing an example of data storage in a file-based record structure memory;
FIG. 6 is a diagram showing a variable-length record format of a source file, FIG. 7 is a flowchart showing a form creation process, FIG.
FIG. 19 is a flowchart showing details of the sort determination processing, and FIG.
The figure is a diagram showing a specific example of sorting and form output for a specified file. 11 ... CPU, 12 ... bus line, 13 ... input section, 14 ...
Display unit, 15: Input definition document memory, 16: Sort necessity determination unit, 17: Definition number memory, 18: Sort processing unit,
19 …… Work file, 20 …… Output definition memory, 21…
… Form output unit, 23 …… Record structure memory by file,
24 Source files.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】予め決められたキーワード順にソートされ
たレコードを記憶する記憶手段と、 任意のキーワードを設定するキーワード設定手段と、 上記予め決められたキーワードと上記キーワード設定手
段により任意に設定されたキーワードの種類が一致する
か否かを判別する判別手段と、 この判別手段により一致していないと判別された際、設
定されたキーワードを基準にしてレコードをキーワード
順にソートするソート手段と、 このソート手段によりソートされたレコードを設定され
たキーワード順に出力する出力手段と を具備したことを特徴とするファイル処理装置。
1. A storage means for storing records sorted in a predetermined keyword order, a keyword setting means for setting an arbitrary keyword, and an arbitrary setting by the predetermined keyword and the keyword setting means. Discriminating means for discriminating whether or not the types of keywords match; and sorting means for sorting records in order of keywords based on the set keyword when the discriminating means determines that they do not match; Output means for outputting the records sorted by the means in the order of the 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 JPH0449416A (en) 1992-02-18
JP3143910B2 true 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
JPH0449416A (en) 1992-02-18

Similar Documents

Publication Publication Date Title
US6622149B1 (en) Method of searching a database for an item of an assembly drawing
JPH10289251A (en) Data retrieving method and recording medium where program for performing its process is recorded
JP3143910B2 (en) File processing device
JP2003058534A (en) Data processor and program
JP2898305B2 (en) File management device and file management method
JPH09160822A (en) Hyper text with access right function
JPS61182131A (en) Information retrieval system
JPS60122435A (en) Memory damp system
JP3143909B2 (en) File processing device
JP3047400B2 (en) Data processing device
JPH04131944A (en) Document filling device containing batch changing function of document title information
JP3111081B2 (en) Data retrieval device
JP2586799B2 (en) Memory buffer status check device managed by chain method
JP2918553B2 (en) Page number print designation device
JPS62219005A (en) Sequence program processor
JPS60207953A (en) Document processor
JPH0287269A (en) Data controller
JPH0816382A (en) Erroneously corrected line retrieving device
JPS63284639A (en) Retrieving device
JPH0477956A (en) Term explanation generation system
JPH0683747A (en) Device for accessing menu information
JPH09274620A (en) Data output device
JPH0836569A (en) File edition processor
JPH05257775A (en) Data processor
JPH0293853A (en) On-line help device

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