JP3047401B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JP3047401B2
JP3047401B2 JP63189970A JP18997088A JP3047401B2 JP 3047401 B2 JP3047401 B2 JP 3047401B2 JP 63189970 A JP63189970 A JP 63189970A JP 18997088 A JP18997088 A JP 18997088A JP 3047401 B2 JP3047401 B2 JP 3047401B2
Authority
JP
Japan
Prior art keywords
record
update
word
keyword
data
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 - Fee Related
Application number
JP63189970A
Other languages
Japanese (ja)
Other versions
JPH0239322A (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 JP63189970A priority Critical patent/JP3047401B2/en
Publication of JPH0239322A publication Critical patent/JPH0239322A/en
Application granted granted Critical
Publication of JP3047401B2 publication Critical patent/JP3047401B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related 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 data processing device for counting records in a file.

[従来の技術] 一般に、コンピュータを用いたデータ処理では、ディ
スク等に種々のファイルを記憶し、入力されたレコード
データに基づいて諸ファイルを更新している。ところ
で、各ファイルはユーザの要望に応じて設計され、ファ
イル内のレコード構造及び各レコードのワード位置はデ
ィスク等のメモリ上に実質上固定的に定められている。
そして、ファイル内のレコードを読み出すに当っては、
当該ファイルのレコード構造に対応して、独自のプログ
ラムを設計し、このプログラムによって各レコードもし
くはワードの位置をアドレス指定して読み出していた。
更に、各種帳表等のデータとして出力させるために、前
述のようにしてファイルから読み出されたレコードを集
計するためにプログラムを作成してこれによって集計し
ていた。このように、システムの運用に際しては、各ユ
ーザの要望に応じたシステム設計を行なっていたことは
周知の通りである。
[Related Art] Generally, in data processing using a computer, various files are stored in a disk or the like, and various files are updated based on input record data. By the way, each file is designed according to the user's request, and the record structure and the word position of each record in the file are substantially fixedly determined on a memory such as a disk.
And when reading records in the file,
In accordance with the record structure of the file, a unique program was designed, and the position of each record or word was designated by this program and read.
Further, in order to output the data as various kinds of book tables and the like, a program is created for totalizing the records read from the file as described above, and the program is totalized. As described above, when operating the system, it is well known that the system was designed in accordance with each user's request.

[発明が解決しようとする課題] 前記システム設計はユーザの要望に応じて種々設計し
なければならず多大な労力と時間を要していた。例え
ば、帳表を出力する際には、帳表に必要なレコードをフ
ァイル内のレコードから抽出したり、またファイル内の
レコードを集計しなければならないが従来は、帳表に合
わせたプログラムを作成することによって対応してい
た。即ち、出力する帳表はユーザによってまちまちであ
るため、個々のユーザ毎のシステム設計が必要であっ
た。
[Problems to be Solved by the Invention] The system design has to be variously designed according to the demands of the user, which requires a great deal of labor and time. For example, when outputting a book table, it is necessary to extract the records required for the book table from the records in the file and to aggregate the records in the file. Was to respond. In other words, since the output ledger varies depending on the user, it is necessary to design a system for each individual user.

本発明の課題は、種々のプログラムを作成することな
く、帳表出力のために必要とするファイル内のレコード
の上位集計レコードを適宜、簡単な指定によって得られ
るようにすることである。
SUMMARY OF THE INVENTION It is an object of the present invention to obtain a high-order total record of a record in a file required for book output without appropriately creating various programs by appropriately specifying it.

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

レコードキーワードとデータワードより構成される複
数のレコード、及び集計レコードであることを示すレコ
ードキーワードと複数のレコードを集計したデータワー
ドより構成される集計レコードを記憶するファイル記憶
手段。
File storage means for storing a plurality of records composed of record keywords and data words, and a total record composed of a record keyword indicating a total record and a data word obtained by totaling the plurality of records.

レコードキーワードとデータワードより成るレコード
を記憶するレコード記憶手段。
Record storage means for storing records consisting of record keywords and data words.

このレコード記憶手段に記憶されたレコードをレコー
ドキーワードが一致する前記ファイル記憶手段内のレコ
ードへ集計する集計手段。
Tabulation means for tabulating records stored in the record storage means into records in the file storage means having matching record keywords.

前記レコード記憶手段に記憶されたレコードの上位の
集計レコードを示すレコードキーワードが有れば当該上
位の集計レコードを生成して対応するデータワードへ集
計する上位集計手段。
If there is a record keyword indicating a higher-order total record of the records stored in the record storage means, a higher-level totalizer that generates the higher-order total record and totals it into a corresponding data word.

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

レコード記憶手段に入力されたレコードキーワードと
データワードより成るレコードは、集計手段によってフ
ァイル記憶手段に集計される。ファイル記憶手段には、
レコードキーワードとデータワードより構成される複数
のレコード、及び集計レコードであることを示すレコー
ドキーワードと複数のレコードを集計したデータワード
より構成される集計レコードが記憶されている。集計手
段は、レコード記憶手段に記憶されたレコードをレコー
ドキーワードが一致する前記ファイル記憶手段内のレコ
ードへ集計する。更に、上位集計手段は前記レコード記
憶手段に記憶されたレコードの上位の集計レコードを示
すレコードキーワードが有れば当該上位の集計レコード
を生成して対応するデータワードへ集計する。
Records composed of record keywords and data words input to the record storage means are totaled by the file storage means by the totalization means. In the file storage means,
A plurality of records each including a record keyword and a data word, and a total record including a record keyword indicating a total record and a data word obtained by totaling the plurality of records are stored. The counting means counts the records stored in the record storage means into records in the file storage means having the same record keyword. Further, when there is a record keyword indicating a higher-order total record of the records stored in the record storage means, the higher-order totaling means generates the higher-order total record and totals it into a corresponding data word.

したがって、集計レコードのレコードキーワードを適
宜設定して予めファイル記憶手段へ記憶しておけば、フ
ァイル記憶手段に対するレコードの書き込みの時点で、
集計レコードへの集計も自動的に行われる結果、後の帳
票出力時点ではこれら所望の集計レコードを読み出して
配列するだけで良い。
Therefore, if the record keyword of the aggregation record is appropriately set and stored in the file storage unit in advance, at the time of writing the record to the file storage unit,
As a result of the tabulation into the tabulation records, the desired tabulation records only need to be read and arranged at the time of outputting the form.

[実施例] 以下、一実施例を第1図乃至第6図を参照して説明す
る。
Embodiment An embodiment will be described below with reference to FIGS. 1 to 6.

第1図はデータ処理装置の全体構成図を示したもので
ある。同図において11は入力装置で、伝票データ等を入
力するものであり、例えば各種指定データを予め設定す
る為の設定キー、データを入力するテンキー及びファン
クションキー等を備えている。前記入力装置11には、入
力処理装置12、更新レコード生成装置13、ファイル更新
処理装置14が順次接続される。そして、前記入力処理装
置12、更新レコード生成装置13、ファイル更新処理装置
14にはそれぞれ入力レコード指定メモリ15、更新レコー
ド指定メモリ16、更新用メモリ17が接続されると共に、
作成レコードメモリ18、更新レコードメモリ19、ファイ
ルメモリ20が接続される。前記入力レコード指定メモリ
15、更新レコード指定メモリ16には、入力装置11により
それぞれ所定の指定データが予め設定される。各指定デ
ータの詳細は後述するが、入力レコード指定メモリ15に
は、作成されるレコードのワードNo.とワード内容との
対応関係が設定される。このワード内容とは、例えば
「入力ワード」、「索引ワード」、「計算ワード」等を
示すものである。更新レコード指定メモリ16には、一つ
又は複数のレコードキーワード、データワードからなる
更新レコードの各ワードと作成レコードメモリ18内のレ
コードの各ワードとの対応を示すデータ及び、更新対象
のファイル名を示すファイルキーワード、更新の内容を
示すデータが設定される。
FIG. 1 shows an overall configuration diagram of a data processing device. In FIG. 1, reference numeral 11 denotes an input device for inputting slip data and the like, and includes, for example, a setting key for setting various kinds of designated data in advance, a numeric keypad for inputting data, a function key, and the like. An input processing device 12, an update record generation device 13, and a file update processing device 14 are sequentially connected to the input device 11. Then, the input processing device 12, the update record generation device 13, the file update processing device
14, an input record designation memory 15, an update record designation memory 16, and an update memory 17 are connected,
The creation record memory 18, the update record memory 19, and the file memory 20 are connected. The input record designation memory
15. In the update record designation memory 16, predetermined designation data is preset by the input device 11, respectively. Although the details of each designated data will be described later, the input record designation memory 15 is set with the correspondence between the word number and the word content of the record to be created. The word content indicates, for example, an “input word”, an “index word”, a “calculation word”, and the like. The update record designation memory 16 stores one or more record keywords, data indicating the correspondence between each word of the update record consisting of data words and each word of the record in the creation record memory 18, and the name of the file to be updated. A file keyword indicating the content and data indicating the content of the update are set.

入力処理装置12は、入力装置11から入力されたデータ
を入力レコード指定メモリ15に設定されているワード内
容に従って処理し、設定されているワードNo.に対応し
て作成レコードメモリ18にレコードを書込み、この作成
レコードメモリ18へ1レコード分もしくは複数レコード
分からなる1伝票分のレコードの書込みを終了すると、
更新レコード生成装置13を起動する。更新レコード生成
装置13は、更新レコード指定メモリ16の設定内容に基づ
いて作成レコードメモリ18内のレコードから更新レコー
ドを生成し、更新レコードメモリ19に書込む。前記更新
レコードメモリ19に書込まれる更新レコードは、ファイ
ルキーワード、一つ又は複数のレコードキーワード、更
新の内容、データワードからなっている。
The input processing device 12 processes the data input from the input device 11 in accordance with the word content set in the input record designation memory 15, and writes a record in the created record memory 18 corresponding to the set word number. Upon completion of writing one record or one record of a plurality of records into the created record memory 18,
The update record generation device 13 is started. The update record generation device 13 generates an update record from a record in the creation record memory 18 based on the settings in the update record designation memory 16 and writes the update record in the update record memory 19. The update record written in the update record memory 19 includes a file keyword, one or a plurality of record keywords, contents of update, and a data word.

ファイル更新処理装置14は、更新レコード生成装置13
からの更新レコード生成終了命令によって、もしくはバ
ッチ処理の場合は入力装置11からの更新指示命令によっ
て起動され、更新レコードメモリ19に記憶された更新レ
コードに基づき、つまり、更新レコードのファイルキー
ワード、レコードキーワードに従い、更新用メモリ17を
用いてファイルメモリ20内の対応ファイルのレコード群
に対する更新処理を行なう。前記更新用メモリ17は例え
ばRAMにより構成されて内部にA、B、Cの領域を有し
ワークメモリとして使用される。
The file update processing device 14 includes an update record generation device 13
, Or in the case of batch processing, by an update instruction command from the input device 11 and based on the update record stored in the update record memory 19, that is, the file keyword and the record keyword of the update record. The update process is performed on the record group of the corresponding file in the file memory 20 using the update memory 17 in accordance with the following. The update memory 17 is composed of, for example, a RAM and has areas A, B, and C therein and is used as a work memory.

前記ファイルメモリ20内には、一つ又は複数のレコー
ドキーワードとデータワードより構成されるレコード群
がファイル別にキーワードの順に記憶されている。そし
て、このファイルメモリ20に記憶されたファイル内の各
レコードは出力レコード生成装置21により読出される。
この出力レコード生成装置21には、出力レコード指定メ
モリ22が接続されている。この出力レコード指定メモリ
22には、出力レコードを作成する為の指定データ、例え
ばファイルキーワード、検索条件、作成ワード、ワード
内容等が入力装置11により予め設定されている。前記出
力レコード生成装置21は、入力装置11からの出力指示命
令によって起動し、出力レコード指定メモリ22の設定内
容に基づいてレコードを作成し、そのレコードを前記作
成レコードメモリ18に書込む。前記作成レコードメモリ
18に記憶されたレコードは出力処理装置23により読み出
され、出力様式指定メモリ24内に予め設定された指定デ
ータに従って所定の印字位置及び所定のフォームで出力
され出力装置25で印字もしくは表示される。
In the file memory 20, a record group including one or a plurality of record keywords and data words is stored for each file in the order of keywords. Each record in the file stored in the file memory 20 is read by the output record generation device 21.
The output record generation device 21 is connected to an output record designation memory 22. This output record specification memory
Designated data 22 for creating an output record, for example, a file keyword, a search condition, a created word, word content, and the like are set in the input device 22 in advance. The output record generation device 21 is activated by an output instruction command from the input device 11, creates a record based on the settings in the output record designation memory 22, and writes the record into the created record memory 18. The created record memory
The record stored in 18 is read by the output processing device 23, output in a predetermined printing position and a predetermined form according to the specified data set in the output format specifying memory 24, and printed or displayed by the output device 25. .

第2図(a)、(b)、(c)はファイルメモリ20内
のレコードの記憶状態を示すものである。同図(a)で
は、ファイル区切コード「[」の後にファイルキーワー
ド「F1」及びワード区切コード「。」が記憶され、以下
各レコードの先頭にはレコード区切コード「(」が記憶
される。各レコードのワードNo.「01」のワードはレコ
ードキーワードであり、レコードキーワードを構成する
コードが記憶され、レコードキーワードの区切コー
ド「.」で区分されている。このレコードキーワード以
降にはワードNo.「11」、「12」……で示されるデータ
ワード、例えば「単価」、「数量」……等のデータがワ
ード区切コード「。」によって区分されて記憶されてい
る。各データは可変長データであり、実存するデータの
みが完全につめ込まれて収容されている。尚、同図では
各レコードのワードの対応関係が明確になるようにスペ
ース部分を設けて記載しているが、ディスク等のメモリ
上においては前記スペースは無く、完全につま込まれて
記憶されている、各レコードのワードNo.「01」で示さ
れるレコードキーワードに記憶されるコードのコード体
系は第3図に示すコード体系になっている。商品コード
「111」、「112」、……は商品名「腕時計A」、「腕時
計B」、……を示している。この第3図の商品コード
は、各商品の大分類、中分類を表わしており、商品コー
ドの上位2桁が共通のコード、例えば「11」は「腕時
計」を、「12」は「クロック」を示し、商品コードの上
位1桁が共通のコード、例えば「1」は「時計」を、
「2」は「電卓」を示している。即ち、商品コード等の
レコードキーワードとして用いられるコードは各コード
の上位桁から順に、大分類、中分類……等に対応した重
み付けがなされている。この大分類、中分類等に対応し
て、最下位レベルのレコードのデータワードを集計した
レコード(以下、集計レコードと称する)は、ファイル
メモリ20内においては、第2図(a)に示すように、レ
コードキーワードのコードの上位桁コードの後に特殊符
号「*」を付して表わす。例えば「11*」は「腕時計」
の集計レコードを、「12*」は「クロック」の集計レコ
ードを、「1*」は「時計」の集計レコードを、「2
*」は「電卓」の集計レコードを示す。更に前記特殊符
号は「*」はレコードキーワードとして用いられるコー
ドの各キャラクタ、例えば0、1、2……9等よりも重
み付けを小さくしており、この結果、ファイルメモリ20
内の各レコードをレコードキーワードの昇順に配列する
場合には、レコードキーワードのコードの各桁を上位桁
から順に比較して行けば、第2図(a)に示す順に配列
される。第2図(b)は各ワードが固定長データから成
る場合の例であるが、この場合の集計レコードのレコー
ドキーワードは上位桁コードの後の特殊符号を最下位桁
まで連続してもしくは上位桁コードの直後の桁のみに付
しておけばよい。第2図(c)は集計レコードの他の記
憶例である、この例では、レコードキーワードが複数ワ
ードから成る例であり、各レコードキーワードは上位の
ワードから順に重み付けがされており、集計レコードは
下位のレコードキーワードが空ワードになっている。更
に、レコードキーワードの各ワーを区分する区切コード
は、レコードキーワードのコードの各キャラクタよりも
小さい重み付けのコードを用いる。したがって、レコー
ドキーワードを比較する際には、各レコードの先頭のワ
ードの先頭のコードから区切コードも含めて1桁ずつ順
に比較していき、不一致の桁のコードの重みによって大
もしくは小を判別する。そして、この判別結果によって
各レコードをレコードキーワードの昇順に配列して記憶
する。
2A, 2B and 2C show the storage states of records in the file memory 20. FIG. In FIG. 9A, a file keyword "F 1 " and a word delimiter code "." Are stored after the file delimiter code "[", and a record delimiter code "(" is stored at the head of each record. The word of word No. "01" of each record is a record keyword, a code constituting the record keyword is stored, and is separated by a record keyword delimiter code "." Data words such as “11”, “12”,..., For example, “unit price”, “quantity”,... Only the existing data is completely packed and accommodated.In the figure, a space is provided to clarify the correspondence between words in each record. However, there is no space on a memory such as a disk, and the code stored in the record keyword indicated by the word No. “01” of each record, which is completely inserted and stored. The code system is the code system shown in Fig. 3. The product codes "111", "112", ... indicate the product names "Watch A", "Watch B", .... The product code in the figure represents the major classification and middle classification of each product, and the upper two digits of the product code are common codes, for example, "11" indicates "watch", "12" indicates "clock", The upper one digit of the product code is a common code, for example, "1" represents "clock",
“2” indicates “calculator”. That is, codes used as record keywords such as product codes are weighted in order from the upper digit of each code in accordance with the large classification, the middle classification, and so on. A record in which data words of the lowest level record are totaled (hereinafter, referred to as a totaling record) corresponding to the major classification, the intermediate classification, and the like is stored in the file memory 20 as shown in FIG. , A special code “*” is added after the upper digit code of the code of the record keyword. For example, "11 *" means "watch"
Tally record, “12 *” is a tally record of “Clock”, “1 *” is a tally record of “Clock”, “2”
“*” Indicates a tally record of “calculator”. In addition, the special code "*" has a smaller weight than each character of the code used as a record keyword, for example, 0, 1, 2,...
Are arranged in the ascending order of the record keywords, if the digits of the code of the record keyword are compared in order from the upper digit, they are arranged in the order shown in FIG. 2 (a). FIG. 2 (b) shows an example in which each word is composed of fixed-length data. In this case, the record keyword of the tally record is such that the special code after the upper digit code is continued to the lowermost digit or the upper digit. It only needs to be added to the digit immediately after the code. FIG. 2 (c) shows another example of storage of the tally record. In this example, the record keyword is composed of a plurality of words, and each record keyword is weighted in order from the highest word. The lower record keyword is an empty word. Furthermore, a code with a smaller weight than each character of the code of the record keyword is used as a division code for dividing each word of the record keyword. Therefore, when comparing the record keywords, the comparison is performed sequentially one digit at a time including the delimiter code from the head code of the head word of each record, and large or small is determined based on the weight of the code of the mismatched digit. . Then, the records are arranged and stored in the ascending order of the record keywords according to the result of this determination.

以上述べた集計レコードをファイルメモリ20に設定す
る際には、ファイルの初期設定時において、前記特殊符
号を付したレコードキーワード、もしくは空ワードを有
するレコードキーワードから成るレコードを前記入力手
段11より入力し、更新レコード指定メモリ16内の指定デ
ータによって、所定のファイルキーワード及び更新の内
容として「追加」を指定する。この指定によって、前記
入力されたレコードに基づいて更新レコードメモリ19内
に更新レコードが作成され、この更新レコードに基づい
てファイル更新処理装置14の更新処理が実行されて前記
集計レコードがファイルメモリ20へ設定される。即ち、
ユーザは集計レコードのキーワードとなるべく上位のコ
ード及び特殊符号から成る集計レコードのキーワードを
入力するだけで任意のレベルの集計レコードの設定が可
能である。
When the above-described total record is set in the file memory 20, at the time of initial setting of the file, a record composed of a record keyword with the special code or a record keyword having an empty word is input from the input unit 11. In accordance with the designated data in the update record designation memory 16, "addition" is designated as a predetermined file keyword and update content. By this designation, an update record is created in the update record memory 19 based on the input record, the update process of the file update processing device 14 is executed based on the update record, and the totaled record is transferred to the file memory 20. Is set. That is,
The user can set an aggregated record of any level simply by inputting a keyword of the aggregated record including a higher-order code and a special code as a keyword of the aggregated record.

次に実施例の動作を説明する。入力装置11から伝票等
に基づいて入力レコードの各ワードデータを入力する
と、このデータは入力処理装置12へ入力される。入力処
理装置12は、データが入力されると、第4図に示すよう
に入力レコード指定メモリ15の指定データを参照し、ワ
ードNo.「I1、I2、……、In」に対応するワード内容「W
1、W2、……、Wn(入力、索引、計算等)」に従って入
力された各ワードデータをワードNo.順に処理し、その
処理した結果をワードデータ「m1、m2、……、mn」とし
て作成レコードメモリ18に順次書込む。ワード内容が
「入力ワード」の場合は、入力されたワードデータをワ
ードNo.と対応する作成レコードメモリ18のワードへ入
力する。「索引ワード」の場合は、入力処理装置12内の
図示しない索引メモリを参照して、入力されたワードデ
ータ、例えばコードデータをキャラクタデータに変換し
てこれを作成レコードメモリ18の該当ワードへ入力す
る。「計算ワード」の場合は、ワードNo.を用いて定義
されているワード間の演算に従って計算を行ない、その
計算結果のデータを作成ワードメモリ18の該当ワードへ
入力する。例えばワード内容「W3」として「I1×I2」と
定義されている場合は、作成レコードメモリ21内のワー
ドNo.「I1」及び「I2」のワードデータ「m1」及び「m
2」を読み出して乗算し、この結果のワードデータ「3
m」を作成レコードメモリ18の入力ワードNo.「I3」へ入
力する。このようにして入力処理装置12は、入力レコー
ド指定メモリ15内の各ワード内容に従った処理を行な
う。作成レコードメモリ18に1レコード分もしくは複数
レコード分から成る1伝票分のデータの入力が完了する
と、更新レコード生成装置13を起動する。この更新レコ
ード生成装置13は、作成レコードメモリ18に保持されて
いるレコードを更新レコード指定メモリ16の指定データ
に基づいて更新レコードを生成し、生成した更新レコー
ドを更新レコードメモリ19へ書き込む。更新レコード指
定メモリ16には、第5図に示すように一つ又は複数のレ
コードキーワード、データワードを作成レコードメモリ
18内のレコードのワードNo.で示すと共に、更新の内
容、更新対象のファイル名を示すデータが指定データと
して予め記憶設定されている。例えば指定データ16−1
としては、更新の内容として「集計」が、ファイルキー
ワードとして「F2」が、レコードキーワードとして「I
2、I3」が、データワードとして「I5、I6、I1、I4」が
設定されており、レコードキーワードが二つの場合の例
を示している。また、指定データ16−2としては、更新
の内容として「集計」が、ファイルキーワードとして
「F3」が、レコードキーワードとして「I1」が、データ
ワードとして「I13、I14」が設定されており、レコード
キーワードが一つの場合の例を示している。た、前記指
定データ中の更新の内容には「追加」、「削除」、「集
計」、「訂正」のいずれかを示すデータが設定される。
そして、前記指定データに基づいて作成レコードメモリ
18内のレコードから更新レコードが作成されるもので、
例えば指定データ16−1に対しては、更新の内容が「集
計」、ファイルキーワードが「F2」、レコードキーワー
ド「m2、m3」、データワードが「m5、m6、m1、m4」から
なる更新レコード19−1が作成される。その他の更新レ
コードについても同様にして作成され、更新レコードメ
モリ19に記憶される。尚、この更新レコードメモリ19に
記憶される更新レコードの各ワードは区切コー
ド「。」、「.」で区分され、各更新レコードは区切コ
ード「(」で区分される可変長データである。各レコー
ドの構成は、レコード区切コード「(」に続く先頭ワー
ドが「更新の内容」を示すワードであり、次のワードが
ファイルキーワードを示すワードであり、更に次のワー
ドら区切コード「.」までの一つもしくは複数のワード
(各ワードは区切コード「。」で区分される)はレコー
ドキーワードである。更に、上記区切コード「.」に続
く各ワードはデータワードである。
Next, the operation of the embodiment will be described. When each word data of an input record is input from the input device 11 based on a slip or the like, the data is input to the input processing device 12. When the data is input, the input processing device 12 refers to the designated data in the input record designation memory 15 as shown in FIG. 4, and reads the word contents corresponding to the word No. “I1, I2,..., In”. "W
1, W2,..., Wn (input, index, calculation, etc.) are processed in the order of word numbers, and the processing results are processed as word data "m1, m2,..., Mn". The data is sequentially written into the created record memory 18. If the word content is "input word", the input word data is input to the word of the created record memory 18 corresponding to the word No. In the case of an "index word", the input word data, for example, code data is converted to character data by referring to an index memory (not shown) in the input processing device 12 and input to the corresponding word of the creation record memory 18. I do. In the case of the "calculation word", the calculation is performed according to the operation between the words defined using the word No., and the data of the calculation result is input to the corresponding word in the creation word memory 18. For example, if “I1 × I2” is defined as the word content “W3”, the word data “m1” and “m” of the word No. “I1” and “I2” in the created record memory 21
2 is read and multiplied, and the resulting word data "3
"m" is input to the input word No. "I3" of the creation record memory 18. In this way, the input processing device 12 performs processing according to the contents of each word in the input record designation memory 15. When the input of one record or one slip of a plurality of records into the created record memory 18 is completed, the update record generating device 13 is started. The update record generation device 13 generates an update record from the record held in the creation record memory 18 based on the specified data in the update record specification memory 16 and writes the generated update record to the update record memory 19. The update record designation memory 16 stores one or more record keywords and data words as shown in FIG.
Data indicating the word No. of the record in 18 and the contents of the update and the name of the file to be updated are stored and set in advance as designated data. For example, designated data 16-1
As the contents of the update, “total” is used, “F2” is used as the file keyword, and “I
2, I3 "is set as a data word, and" I5, I6, I1, I4 "is set, and an example in which there are two record keywords is shown. As the designated data 16-2, "total" is set as the content of the update, "F3" is set as the file keyword, "I1" is set as the record keyword, and "I13, I14" are set as the data words. An example in the case of one keyword is shown. In addition, data indicating any of “add”, “delete”, “total”, and “correction” is set as the content of the update in the designated data.
Then, based on the specified data, the created record memory
Update record is created from the record in 18,
For example, for the designated data 16-1, an update record whose update content is “total”, the file keyword is “F2”, the record keyword is “m2, m3”, and the data word is “m5, m6, m1, m4” 19-1 is created. Other update records are similarly created and stored in the update record memory 19. Each word of the update record stored in the update record memory 19 is divided by a delimiter code ".", ".", And each update record is variable-length data divided by a delimiter code "(". The structure of the record is such that the first word following the record delimiter code "(" is a word indicating "contents of update", the next word is a word indicating a file keyword, and further from the next word to the delimiter code "." Is a record keyword, and each word following the delimiter code "." Is a data word.

しかして、ファイル更新処理装置14は、更新レコード
生成装置13からの命令もしくは入力装置11からの更新指
示命令によって起動し、第6図のフローチャートに示す
ファイル更新処理を実行する。すなわち、ファイル更新
処理装置14は、ステップS11の処理で、更新レコードメ
モリ19内の更新レコードをファイルキーワード順で、か
つ、レコードキーワード順にソートするそして次のステ
ップS12の処理で、更新レコードメモリ19内の同一のフ
ァイルキーワードの全更新レコードを読出し、更新用メ
モリ17のA領域に書込む。更にステップS13で、ファイ
ルメモリ20内の対応するファイルキーワードの全レコー
ドを読み出し、更新用メモリ17のB領域に書き込む。そ
して、次のステップS14の処理において、前記更新用メ
モリ17のA領域内の更新レコードを1レコード分読み出
し、ステップS15で、この更新レコードの更新の内容が
「集計」であるか否かを判別し、「集計」の更新レコー
ドが読み出されるまで前記ステップS14、S15の処理を繰
り返す。「集計」の更新レコードが読み出されると、こ
の更新レコードのレコードキーワードの上位コードと一
致する集計レコードもしくは上位キーワードと一致する
集計レコードがあるか否かを次のステップS16で判別
し、有ればステップS17の処理で、その集計レコードの
レコードキーワードと同一のレコードキーワードであっ
て、ファイルキーワード及びデータワードを更新レコー
ドのファイルキーワード、データワードと同一にし、更
新の内容を「集計」にした上位集計更新レコードを新た
に作成する。以下、ステップS18で、前記更新用メモリ1
7のB領域内の一ファイル分の各レコードについてレコ
ードキーワードの比較による集計レコードの有無の検出
が終了したか否かが判別され、全てのレコードについて
終了するまで前記ステップS16、S17、S18の処理を繰り
返す。全てのレコードについて終了した後には、ステッ
プS19で更新用メモリ17のA領域内の全ての更新レコー
ドに対する処理が終了したか否かが判別され、終了して
いなければ前記ステップS14の処理に戻って次の更新レ
コードが読み出され、前述した各処理が実行される。ス
テップS19で全ての更新レコードに対する処理が終了し
たことが判別された後は、次のステップS20で、新たに
作成された上位集計更新レコードをそのレコードキーワ
ード順にソートし、同一のレコードキーワードのレコー
ドはデータワードのデータを集計して一つのレコードに
する。そして次のステップS21で、A領域内の更新レコ
ードと上位集計更新レコードとをレコードキーワード順
になるようにマージする。そして、ステップS22の処理
で、更新用メモリ17のA領域及びB領域の各レコードの
レコードキーワードを順次比較し、A領域内の更新レコ
ードと対応するB領域内のレコードを更新の内容に従っ
て更新する。更新されたレコードもしくはB領域内の更
新対象にならなかったレコードはキーワードの順に更新
用メモリ17内のC領域に書込まれ、更新用メモリ17のA
領域、B領域における全ての更新処理が終了すると、更
新用メモリ17のC領域に保持している更新済みのレコー
ドをファイルメモリ20の新たな記憶領域へ書込む。その
後、ステップS23で更新レコードメモリ19に記憶してい
る全てのファイルキーワードに対する更新レコードの更
新処理を終了したか否かを判断し、終了していなければ
ステップS12に戻って残りのファイルキーワードに対す
る更新レコードについての更新処理を行なう。以下、同
様にして前述した各ステップの処理により更新レコード
メモリ19の全更新レコードに対する処理が行なわれる
と、ファイル更新処理を終了する。
Thus, the file update processing device 14 is activated by a command from the update record generation device 13 or an update instruction command from the input device 11, and executes the file update process shown in the flowchart of FIG. That is, the file update processing unit 14, the processing of step S 11, the update records in the update record memory 19 file keywords order by and sorted in a record keyword order and in the processing of the next step S 12, update record memory All update records of the same file keyword in 19 are read out and written in the A area of the update memory 17. Further in step S 13, reads all records of the corresponding file keywords in the file memory 20, and writes the B region of the update memory 17. Then, in the processing of the next step S 14, the update one record read out update record A region of the memory 17, in step S 15, whether or not the contents of the update of the update record is "Aggregate" determine repeats the processing of step S 14, S 15 to update the record of "aggregate" is read. When the update record "Aggregate" is read, it is determined whether there is a summary records matching the summary record or top keywords that match the upper code record keyword of the update records in the next step S 16, there if in the process of step S 17, a record keyword same record keywords and of the summary records, the file keyword and data word file keyword of the update record, the same as the data word, and the contents of the update to the "aggregate" Create a new upper-level summary update record. Hereinafter, in step S 18, the update memory 1
It is determined whether the detection of the presence / absence of the tally record by comparing the record keywords has been completed for each record in one file in the B area of FIG. 7, and the above steps S 16 , S 17 , S 17 Step 18 is repeated. After completed for all records, the processing for all the update records in the A region of the update memory 17 in step S 19 is judged whether or not finished, the processing of the step S 14 If not completed Returning, the next update record is read, and the above-described processing is executed. In step S 19 after the processing for all of the updated records it has been determined to be ended, at the next step S 20, to sort the new host collection updated records created in its record keyword order, the same record keywords The record aggregates the data of the data words into one record. And in the next step S 21, to merge so that the updated records and host collection update records of the A area in the record keyword order. Then, in the process of step S 22, compares the record keyword of the record of the A region and the B region of the update memory 17 sequentially, in accordance with the content of the update records in area B corresponding to the updated record of the A area update I do. The updated record or the record not to be updated in the B area is written in the C area in the update memory 17 in the order of the keywords,
When all the update processes in the area and the area B are completed, the updated record held in the area C of the update memory 17 is written to a new storage area of the file memory 20. Thereafter, it is determined whether or not it is completed to update processing of the update records for all files keywords stored in the update record memory 19 in step S 23, the remaining file keywords returns to step S 12 If not completed Update processing for the update record for. Hereinafter, when the processing for all the update records in the update record memory 19 is performed by the above-described processing of each step, the file update processing ends.

前記ステップS22における更新レコードの更新内容に
応じた更新処理について説明する。更新の内容が「追
加」であれば、この更新レコードのレコードキーワード
とデータワードからなるレコードを、ファイルメモリ20
から読み出されたB領域内のレコードの中にレコードキ
ーワードの順になるように挿入する。「削除」の場合に
は、更新レコードのレコードキーワードと一致するB領
域内のレコードを削除する。更新の内容が「集計」の場
合は、更新レコードのレコードキーワードと一致するB
領域内のレコードの各データワードのうち、更新レコー
ドのデータワードで示されるデータを該当ワードに加算
集計する。尚、更新レコードのデータワードのデータが
負であれば、減算集計される。そして、更新レコードメ
モリ19内に「集計」の更新レコードがあれば、ファイル
メモリ20内のレコードキーワードと一致するレコードに
集計されると共に、ファイルメモリ20内に予め設定され
ている集計レコードにも自動的に集計される。更新の内
容が「訂正」の場合は、更新レコードのレコードキーワ
ードと一致するB領域内のレコードの各ワードのうち、
更新レコードのデータワードと対応するワードを更新レ
コードのデータワードで示されるワードデータに訂正す
る。
Update processing will be described in accordance with the updated contents of the update records in the step S 22. If the content of the update is “addition”, a record consisting of the record keyword and the data word of this update record is stored in the file memory 20.
Are inserted into the records in the area B read out from the record keywords in the order of the record keywords. In the case of “delete”, the record in the B area that matches the record keyword of the update record is deleted. If the content of the update is “total”, B that matches the record keyword of the update record
Among the data words of the records in the area, the data indicated by the data word of the updated record is added to the corresponding word and totaled. If the data of the data word of the update record is negative, the data is subtracted and counted. If there is an update record of “total” in the update record memory 19, the update record is counted to a record that matches the record keyword in the file memory 20, and is automatically added to the count record preset in the file memory 20. Are tallied. When the content of the update is “correction”, among the words of the record in the B area that match the record keyword of the update record,
The word corresponding to the data word of the update record is corrected to the word data indicated by the data word of the update record.

前記実施例では、レコードキーワードの区切コードを
特別に設けて、レコード内におけるレコードキーワード
とデータワードを区別するようにしたが、このレコード
キーワードの区切コードは不要にしてもよい。この場合
はファイルキーワードと対応づけてレコードキーワード
数を記憶し、ファイルメモリ16内のファイルの記憶形態
は次のようになる。即ち、まずファイルの区切コード
「[」が記憶され、次にファイルキーワードが、このフ
ァイルキーワードの前又は後にレコードキーワード数
が、以下、レコードの区切コード「(」を先頭に各ワー
ドがワード区切コード「。」で区分されて記憶される。
レコードキーワードは前記レコード区切コードで示され
る各レコードの先頭から前記レコードキーワード数で示
されるワード数分である。したがってファイル処理装置
等の処理装置はレコード区切コードで各レコードの先頭
を検出し、かつ、レコードキーワード数で示される数の
ワード区切コードを検出してレコードキーワードを検出
するように構成される。この例ではファイル内におい
て、ファイルキーワードの前又は後にレコードキーワー
ド数を記憶したが、各ファイルキーワードと各ファイル
のレコードキーワード数を対応テーブルとして記憶して
もよい。更に、各ファイルのレコードキーワード数が同
一であれば、一括してレコードキーワード数を記憶して
もよく、また特別に記憶しなくとも処理装置自体にレコ
ードの先頭から特定ワード数分をレコードキーワードと
見なす処理を組み込んでもよい。
In the above embodiment, a record keyword delimiter code is specially provided to distinguish a record keyword from a data word in a record. However, the record keyword delimiter code may not be necessary. In this case, the number of record keywords is stored in association with the file keyword, and the storage format of the file in the file memory 16 is as follows. That is, first, the file delimiter code [[] is stored, then the file keyword is the number of record keywords before or after this file keyword, and hereafter, each word is the word delimiter code starting with the record delimiter code "(". It is stored by being divided by ".".
The record keywords are the number of words indicated by the number of record keywords from the beginning of each record indicated by the record separation code. Therefore, a processing device such as a file processing device is configured to detect the head of each record by using a record delimiter code, and detect a record keyword by detecting the number of word delimiter codes indicated by the number of record keywords. In this example, the number of record keywords is stored before or after the file keyword in the file, but each file keyword and the number of record keywords of each file may be stored as a correspondence table. Further, if the number of record keywords in each file is the same, the number of record keywords may be stored collectively, or the processing device itself may use the specified number of words from the beginning of the record as record keywords without special storage. A process to be considered may be incorporated.

尚、実施例において、ファイル内の各レコードのデー
タは可変長データとして説明したが、固定長データであ
ってもよく、要は各レコードがレコードキーワード順に
配列して記憶されているものであればよい。
In the embodiment, the data of each record in the file has been described as variable-length data. However, the data may be fixed-length data. Good.

[発明の効果] 以上述べたように本発明によれば、集計したいレコー
ドのレコードキーワードの上位コードもしくは上位ワー
ドを、集計レコードのレコードキーワードとして予めフ
ァイル記憶手段へ設定しておけば、後のファイル処理に
おいてこの集計レコードへも自動的に集計が行なわれる
ので、従来の如く帳表出力のために種々の独自なプログ
ラムを作成することなく、ファイル内の任意のレコード
の集計を行なえる。
[Effect of the Invention] As described above, according to the present invention, if the upper code or upper word of the record keyword of the record to be tabulated is set in the file storage means in advance as the record keyword of the tabulated record, Since the tabulation record is automatically tabulated in the processing, any record in the file can be tabulated without creating various original programs for outputting the book table as in the related art.

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

第1図乃至第6図は本発明の実施例を示す図であり、第
1図はデータ処理装置の全体構成図、第2図は(a)、
(b)、(c)はファイルメモリ20内のファイルの記憶
状態図、第3図はコード体系を説明する図、第4図は入
力処理装置12の動作を説明する図、第5図は更新レコー
ド生成装置13の動作を説明する図、第6図はファイル更
新処理装置14の動作を説明するフローチャートである。 12……入力処理装置、13……更新レコード生成装置、14
……ファイル更新処理装置、20……ファイルメモリ。
1 to 6 are views showing an embodiment of the present invention. FIG. 1 is an overall configuration diagram of a data processing device, and FIG.
(B) and (c) are diagrams of storage states of files in the file memory 20, FIG. 3 is a diagram for explaining a code system, FIG. 4 is a diagram for explaining the operation of the input processing device 12, and FIG. FIG. 6 is a flowchart for explaining the operation of the record generation device 13, and FIG. 6 is a flowchart for explaining the operation of the file update processing device 14. 12 ... input processing device, 13 ... update record generation device, 14
…… File update processing device, 20 …… File memory.

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】レコードキーワードとデータワードより構
成される複数のレコード、及び集計レコードであること
を示すレコードキーワードと複数のレコードを集計した
データワードより構成される集計レコードを記憶するフ
ァイル記憶手段と、 レコードキーワードとデータワードより成るレコードを
記憶するレコード記憶手段と、 このレコード記憶手段に記憶されたレコードをレコード
キーワードが一致する前記ファイル記憶手段内のレコー
ドへ集計する集計手段と、 前記レコード記憶手段に記憶されたレコードの上位の集
計レコードを示すレコードキーワードが有れば当該上位
の集計レコードを生成して対応するデータワードへ集計
する上位集計手段と を備えたことを特徴とするデータ処理装置。
1. File storage means for storing a plurality of records composed of record keywords and data words, and a record keyword indicating a total record and a total record composed of data words obtained by totaling a plurality of records. A record storage unit for storing a record composed of a record keyword and a data word; a counting unit for counting the records stored in the record storage unit into records in the file storage unit having the same record keyword; If there is a record keyword indicating a higher-order aggregation record of the records stored in the storage device, a higher-order aggregation unit that generates the upper-order aggregation record and aggregates the data into a corresponding data word.
【請求項2】前記上位の集計レコードを示すレコードキ
ーワードは、レコードキーワードの上位桁コードの後に
特殊符号を付してなる 請求項(1)記載のデータ処理装置。
2. The data processing apparatus according to claim 1, wherein the record keyword indicating the higher-order aggregation record has a special code added after the upper digit code of the record keyword.
【請求項3】前記上位の集計レコードを示すレコードキ
ーワードは、レコードキーワードの下位のワードを空ワ
ードとして構成する 請求項(1)記載のデータ処理装置。
3. The data processing apparatus according to claim 1, wherein the record keyword indicating the higher-order aggregation record is configured such that a lower word of the record keyword is an empty word.
【請求項4】前記レコード記憶手段内のレコードは更新
の内容を示すワードを含み、前記集計手段は更新の内容
が集計を示すレコードにもとづいて集計する 請求項(1)記載のデータ処理装置。
4. The data processing apparatus according to claim 1, wherein a record in said record storage means includes a word indicating the content of the update, and said counting means counts based on a record indicating the content of the update.
JP63189970A 1988-07-29 1988-07-29 Data processing device Expired - Fee Related JP3047401B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63189970A JP3047401B2 (en) 1988-07-29 1988-07-29 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63189970A JP3047401B2 (en) 1988-07-29 1988-07-29 Data processing device

Publications (2)

Publication Number Publication Date
JPH0239322A JPH0239322A (en) 1990-02-08
JP3047401B2 true JP3047401B2 (en) 2000-05-29

Family

ID=16250231

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63189970A Expired - Fee Related JP3047401B2 (en) 1988-07-29 1988-07-29 Data processing device

Country Status (1)

Country Link
JP (1) JP3047401B2 (en)

Also Published As

Publication number Publication date
JPH0239322A (en) 1990-02-08

Similar Documents

Publication Publication Date Title
US5293616A (en) Method and apparatus for representing and interrogating an index in a digital memory
JP3160201B2 (en) Information retrieval method and information retrieval device
EP0351210A2 (en) Data base management system
US4924385A (en) Method of detecting types of parts constituting a larger group of parts
EP0350654B1 (en) Data processing apparatus
JP3047401B2 (en) Data processing device
Franks A data management system for time-shared file processing using a cross-index file and self-defining entries
JPH04340163A (en) Keyword retrieval system
JP3337469B2 (en) Information processing device
JPH07296009A (en) Data base integration/retrieval device
JPS59123071A (en) Document file device
JP3047400B2 (en) Data processing device
JP3044718B2 (en) Information processing device
JPS642970B2 (en)
JP3549251B2 (en) Sort processing apparatus and sort processing method
JPS5854447A (en) Retrieving system for program dictionary
JP2760755B2 (en) Method of storing and redisplaying the operation button history for computer processing
JP3109331B2 (en) Form output device
JPH06168270A (en) Character string retrieval system using index and preparing device for index
JP3064706B2 (en) Data processing device
JP3109330B2 (en) Form output device
JPH04559A (en) Data retrieving system
JP3044711B2 (en) File processing device
JPS5834864B2 (en) information retrieval device
JPH08235287A (en) Data processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees