JPH0778213A - Form output device - Google Patents
Form output deviceInfo
- Publication number
- JPH0778213A JPH0778213A JP5173634A JP17363493A JPH0778213A JP H0778213 A JPH0778213 A JP H0778213A JP 5173634 A JP5173634 A JP 5173634A JP 17363493 A JP17363493 A JP 17363493A JP H0778213 A JPH0778213 A JP H0778213A
- Authority
- JP
- Japan
- Prior art keywords
- record
- name
- code
- item
- file
- 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
Links
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
(57)【要約】
【目的】 所望する帳票を得る為に、帳票出力イメージ
にしたがって出力レコードのレコード名の配置位置、出
力対象項目のコード条件を単に指定するだけで、コード
条件に合致する全てのレコードを所定ファイルから読み
出し、その名称と共に指定内容通りのイメージで出力す
る。
【構成】 入力部1から集計レコードのレコード名の配
置位置を指定すると共に、集計レコードを抽出する際の
対象項目を示すコード条件を指定すると、表構造解析部
5はこのコード条件に合致する項目コードを有するレコ
ードを所定ファイルから読み出すと共に、この項目コー
ドに対応する名称を索引テーブルから読み出す。これに
よって読み出された名称はレコード名の配置位置に出力
され、また所定ファイルから読み出されたレコードはそ
れに該当する名称に対応付けられて出力される。
(57) [Abstract] [Purpose] To obtain the desired form, simply specify the position of the record name of the output record and the code condition of the output target item according to the form output image. Is read from a predetermined file and is output as an image according to the specified contents together with its name. [Structure] When the layout position of the record name of the totalized record is specified from the input unit 1 and the code condition indicating the target item when the totalized record is extracted is specified, the table structure analysis unit 5 sets the items that match this code condition. The record having the code is read from the predetermined file, and the name corresponding to this item code is read from the index table. The name read by this is output to the arrangement position of the record name, and the record read from the predetermined file is output in association with the corresponding name.
Description
【0001】[0001]
【産業上の利用分野】この発明は、オフィスコンピュー
タやパーソナルコンピュータ等において、会計ファイ
ル、人事ファイル等からレコードデータを読み出して帳
票出力する帳票出力装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a form output device for reading record data from an accounting file, a personnel file, etc. and outputting a form in an office computer, a personal computer or the like.
【0002】[0002]
【従来の技術】従来、オフィスコンピュータや汎用コン
ピュータ等の事務処理装置においては、会計ファイル、
人事ファイル、売上伝票ファイル、在庫ファイル等、各
種多様のファイルを記憶管理しているが、各ファイルを
構成するレコード構造は、ファイル毎に異なっており、
同一レコード形態(レコードを構成する各項目が一致す
るレコード)毎にまとめて別ファイルとして記憶管理し
ている。ところで、任意の項目を指定してその項目を含
むレコードを所定のファイルから読み出して帳票出力さ
せる為には、予め、レコード配置位置等のレイアウトを
考慮しながら出力レコードの名称および出力対象項目を
1つずつ対応付けて入力する必要があった。2. Description of the Related Art Conventionally, in an office processing device such as an office computer or a general-purpose computer, an accounting file,
Various types of files such as personnel files, sales slip files, inventory files, etc. are stored and managed, but the record structure that constitutes each file is different for each file.
The same record form (records in which each item that constitutes a record matches) is collectively managed as a separate file. By the way, in order to specify an arbitrary item and read a record including the item from a predetermined file and output the form, the name of the output record and the output target item are set to 1 in advance while considering the layout such as the record arrangement position. It was necessary to input them in correspondence with each other.
【0003】[0003]
【発明が解決しようとする課題】しかしながら、出力レ
コード毎にその名称や出力対象項目を1つずつ直接入力
ことはレコード数が多い場合、その入力作業が極めて困
難となると共に、記述ミス等の恐れもあった。この発明
の課題は、所望する帳票を得る為に、帳票出力イメージ
にしたがって出力レコードのレコード名の配置位置、出
力対象項目のコード条件を単に指定するだけで、コード
条件に合致する全てのレコードを所定ファイルから読み
出し、その名称と共に指定内容通りのイメージで出力で
きるようにすることである。However, if the name or the output target item is directly input for each output record when the number of records is large, the input work becomes extremely difficult and there is a risk of a description error or the like. There was also. An object of the present invention is to obtain all desired records by simply specifying the layout position of the record name of the output record and the code condition of the output target item according to the form output image, in order to obtain the desired form. It is to be able to read from a predetermined file and output the image with the name and the specified contents.
【0004】[0004]
【課題を解決するための手段】第1の発明の手段は次の
通りである。 (1A)、指定手段は出力レコードのレコード名の配置
位置を指定すると共に、出力レコードを抽出する際の対
象項目を示すコード条件を指定する。ここで、コード条
件とは例えば項目コードが3桁の数値コードから成り、
その上位2桁をコード条件として指定することによっ
て、上位2桁のコードを含む全ての項目コードを抽出対
象項目とする為のコード条件、つまり、抽出対象範囲を
指定する為のコード条件であるが、複数項目を抽出対象
としない場合には、項目コードをコード条件として指定
してもよい。 (2A)、テーブル記憶手段は項目コードと名称とを対
応付けて成る索引テーブルを記憶する。 (3A)、読出手段は前記指定手段で指定されたコード
条件に合致する項目コードを有するレコードを所定ファ
イルから読み出すと共に、この項目コードに対応する名
称を前記索引テーブルから読み出す。 (4A)、出力手段はこの読出手段によって読み出され
た名称を前記指定手段で指定されたレコード名の配置位
置に出力すると共に、所定ファイルから読み出されたレ
コードをそれに該当する名称に対応付けて出力する。な
お、前記読出手段によって読み出された名称を前記指定
手段で指定されたレコード名の配置位置に出力する際
に、この名称と共に対応する項目コードを出力するよう
にしてもよい。 第2の発明の手段は次の通りである。 (1B)、第1の指定手段は出力レコードのレコード名
を指定すると共に、出力レコードを抽出する際の対象項
目を示すコード内容を指定する。ここで、対象項目のコ
ード内容とは例えば、項目コードをそのまま、つまり、
項目コードが3桁の数値コードから成る場合には、3桁
の数値コードそのままがコード内容となる。 (2B)、第2の指定手段は出力レコードのレコード名
の配置位置を指定すると共に、出力レコードを抽出する
際の対象項目を示すコード条件を指定する。 (3B)、テーブル記憶手段は項目コードと名称とを対
応付けて成る索引テーブルを記憶する。 (4B)、第1の読出手段は前記第1の指定手段で指定
されたコード内容に合致するレコードを所定ファイルか
ら読み出す。 (5B)、第2の読出手段は前記第2の指定手段で指定
されたコード条件に合致する項目コードを有するレコー
ドを所定ファイルから読み出すと共に、この項目コード
に対応する名称を前記索引テーブルから読み出す。 (6B)、第1の出力手段は前記第1の読出手段によっ
て読み出されたレコードを前記第1の指定手段で指定さ
れたレコード名に対応付けて出力する。 (7B)、第2の出力手段は前記第2の読出手段によっ
て読み出された名称を前記第2の指定手段で指定された
レコード名の配置位置に出力すると共に、所定ファイル
から読み出されたレコードをそれに該当する名称に対応
付けて出力する。Means for Solving the Problems The means of the first invention is as follows. (1A), the designating unit designates the arrangement position of the record name of the output record and also designates the code condition indicating the target item when the output record is extracted. Here, the code condition is, for example, an item code consisting of a three-digit numerical code,
By specifying the upper 2 digits as the code condition, the code condition for specifying all the item codes including the upper 2 digits code as the extraction target item, that is, the code condition for specifying the extraction target range. If a plurality of items are not extracted, the item code may be designated as the code condition. (2A), the table storage means stores an index table in which item codes and names are associated with each other. (3A), the reading means reads a record having an item code that matches the code condition designated by the designating means from a predetermined file, and reads the name corresponding to the item code from the index table. (4A), the output means outputs the name read by the reading means to the arrangement position of the record name designated by the designating means, and associates the record read from the predetermined file with the corresponding name. Output. When the name read by the reading unit is output to the arrangement position of the record name specified by the specifying unit, the corresponding item code may be output together with the name. The means of the second invention is as follows. (1B), the first designating means designates the record name of the output record and also designates the code content indicating the target item when the output record is extracted. Here, the code content of the target item is, for example, the item code as it is, that is,
When the item code is composed of a 3-digit numerical code, the 3-digit numerical code is the code content as it is. (2B), the second designating means designates the layout position of the record name of the output record and also designates the code condition indicating the target item when the output record is extracted. (3B), the table storage means stores an index table in which item codes and names are associated with each other. (4B), the first reading means reads a record matching the code content designated by the first designating means from a predetermined file. (5B), the second reading means reads a record having an item code that matches the code condition designated by the second designating means from a predetermined file, and also reads a name corresponding to the item code from the index table. . (6B), the first output means outputs the record read by the first reading means in association with the record name designated by the first designating means. (7B), the second output means outputs the name read by the second reading means to the arrangement position of the record name designated by the second designating means, and is also read from the predetermined file. The record is output in association with the corresponding name.
【0005】[0005]
【作用】第1の発明の手段の作用は次の通りである。い
ま、所望する帳票を得る為に、出力レコードに付加され
るレコード名の配置位置を指定すると共に、出力レコー
ドを抽出する際の対象項目となるコード条件を指定する
と、このコード条件に合致する項目コードを有するレコ
ードが所定ファイルから読み出されると共に、この項目
コードに対応する名称が索引テーブルから読み出され
る。これによって読み出された名称は予め指定されたレ
コード名の配置位置に出力され、また、所定ファイルか
ら読み出されたレコードはそれに該当する名称に対応付
けられて出力される。第2の発明の手段の作用は次の通
りである。いま、所望する帳票を得る為に、出力レコー
ドのレコード名を指定すると共に、出力レコードを抽出
する際の対象項目となるコード内容を指定する他、上述
と同様に、出力レコードに付加されるレコード名の配置
位置およびコード条件を指定しておく。すると、指定さ
れたコード内容に合致するレコードが所定ファイルから
読み出され、指定されたレコード名に対応付けて出力さ
れる。また指定されたコード条件に合致する全ての項目
コードを有するレコードが所定ファイルから読み出され
ると共に、この項目コードに対応する名称が索引テーブ
ルから読み出され、この名称はレコード名配置位置に出
力されると共に、所定ファイルから読み出されたレコー
ドはそれに該当する名称に対応付けて出力される。した
がって、所望する帳票を得る為に、帳票出力イメージに
したがって出力レコードのレコード名の配置位置、出力
対象項目のコード条件を単に指定するだけで、コード条
件に合致する全てのレコードを所定ファイルから読み出
し、その名称と共に指定内容通りのイメージで帳票を出
力することができる。The operation of the means of the first invention is as follows. Now, in order to obtain the desired form, if you specify the layout position of the record name added to the output record and also specify the code condition that is the target item when extracting the output record, items that match this code condition The record having the code is read from the predetermined file, and the name corresponding to this item code is read from the index table. The name read by this is output to the arrangement position of the record name designated in advance, and the record read from the predetermined file is output in association with the corresponding name. The operation of the means of the second invention is as follows. Now, in order to obtain the desired form, in addition to specifying the record name of the output record and the code content that is the target item when extracting the output record, the record added to the output record is the same as above. Specify the placement position of the name and the code condition. Then, a record that matches the specified code content is read from the predetermined file and is output in association with the specified record name. Further, a record having all the item codes that match the designated code condition is read from the predetermined file, the name corresponding to this item code is read from the index table, and this name is output to the record name arrangement position. At the same time, the record read from the predetermined file is output in association with the corresponding name. Therefore, in order to obtain the desired form, all the records that match the code condition are read from the specified file by simply specifying the layout position of the record name of the output record and the code condition of the output target item according to the form output image. , It is possible to output a form with its name and an image as specified.
【0006】[0006]
【第1実施例】以下、図1〜図15を参照して第1実施
例を説明する。図1は本実施例に係るデータ処理装置の
ブロック構成図である。このデータ処理装置はオフィス
コンピュータを構成するもので、専門的知識を有しない
業務担当者等が集計定義表を用いて集計レベル毎に集計
対象等を任意に指定しておくだけで、この集計定義表の
定義内容に該当するレコードを所定ファイルから読み出
して集計レベルに応じた階層構造でレコードを分類集計
し、この集計結果を帳票データとして印刷出力するもの
である。入力部1は各種のデータやコマンド等を入力す
るキー入力装置で、入力部1から入力されたデータはパ
ラメータ設定部2に取り込まれて処理されると共に表示
部3に表示出力される。なお、入力部1は所定のキー操
作に応答してパラメータ設定部2に対して起動命令を与
える。[First Embodiment] A first embodiment will be described below with reference to FIGS. FIG. 1 is a block diagram of the data processing apparatus according to this embodiment. This data processing device constitutes an office computer, and a person in charge of business who does not have specialized knowledge can simply specify the aggregation target etc. for each aggregation level using the aggregation definition table. The records corresponding to the definition contents of the table are read from a predetermined file, the records are classified and aggregated in a hierarchical structure according to the aggregation level, and the aggregation result is printed out as form data. The input unit 1 is a key input device for inputting various data and commands, and the data input from the input unit 1 is fetched by the parameter setting unit 2 and processed, and is displayed and output on the display unit 3. The input unit 1 gives a start command to the parameter setting unit 2 in response to a predetermined key operation.
【0007】パラメータ設定部2は入力部1からの起動
命令に応答して動作し、業務担当者等が所望する任意の
レコード集計を指示する為に集計レコードのレコード名
の配置位置や集計対象項目のコード条件等を定義する定
義表(本実施例にあっては2種類のA表、B表)を入力
部1から入力されたデータにしたがって生成し、表示部
3から表示出力させると共に、パラメータファイル4に
設定する。なお、A表、B表については後で詳細に説明
するので、ここでは簡単に説明しておくものとする。The parameter setting section 2 operates in response to a start command from the input section 1, and in order to instruct any record aggregation desired by a person in charge of business or the like, an arrangement position of record names of aggregated records and items to be aggregated. A definition table (two types of tables A and B in this embodiment) that defines the code conditions and the like is generated in accordance with the data input from the input unit 1, and is displayed and output from the display unit 3. Set to file 4. Since the tables A and B will be described in detail later, they will be briefly described here.
【0008】例えば、所望する帳票として図2に示す様
な「売上実績表」を印刷出力させる為に、この帳票の出
力イメージにしたがった集計定義表としてA表およびB
表を生成しておく。ここで、図2に示す帳票は集計レコ
ードのレコード名を行項目に配置し、また集計レコード
のデータ項目名を列項目に配置したものであり、この帳
票を得る為に定義されたA表は図3の(A)、B表は図
3の(B)に示す如く構成されている。A表は集計対象
のファイル名の他、集計レベルに対応して集計レコード
におけるレコード名の配置位置や出力レコードを抽出す
る際の対象項目を示すコード条件等を定義する。即ち、
図示の例において、集計対象のファイル名として「回収
ファイル」が指定され、また、実際のレコード名、例え
ば○○営業所、××営業所等に代わる総括的な代用名称
として「営業所」を括弧書きで記述することによってレ
コード名の配置位置が指定されている。なお、この記述
の仕方は任意であり、レコード名の配置位置に丸印を付
ける等の簡単な方法で位置指定を行ってもよいが、本実
施例においては総括的な代用名称を記述し、その名称が
代用名称であることを示す為に括弧で囲むようにしてい
る。また、集計レコードを抽出する際の対象項目を示す
コード条件として例えば「10?」が指定されている。
このコード条件「10?」は項目コードから3桁の数値
コードから成り、その上位2桁の値「10」を含む全て
の項目コードを集計対象項目とすることを示している。
つまり、複数の項目コードを1つの定義で一括指定する
為に、?マークを付けた記述でコード条件を定義してい
るが、1つの項目コードのみを指定する場合には項目コ
ードをそのままコード条件として定義すればよい。B表
は集計レコードのデータ項目として出力される項目名お
よびこの項目名に対応して帳票印刷時の書式、集計対象
ファイル、データ項目として抽出される集計対象の項目
を定義する。For example, in order to print out a “sales record table” as shown in FIG. 2 as a desired form, tables A and B are used as a summary definition table according to the output image of this form.
Generate a table. Here, in the form shown in FIG. 2, the record name of the totalized record is arranged in the line item, and the data item name of the totalized record is arranged in the column item, and the table A defined for obtaining this form is Tables (A) and B of FIG. 3 are configured as shown in (B) of FIG. In addition to the file name to be totalized, the table A defines the arrangement position of the record name in the totalized record, the code condition indicating the target item when extracting the output record, etc., corresponding to the totalization level. That is,
In the example shown in the figure, "collection file" is specified as the file name of the aggregation target, and "sales office" is used as a general substitute name for the actual record name, for example, XX sales office, XX sales office, etc. The position of the record name is specified by writing in parentheses. Note that this description method is arbitrary, and the position may be specified by a simple method such as adding a circle to the position where the record name is arranged, but in this embodiment, a general substitute name is described. The name is enclosed in parentheses to indicate that it is a substitute name. In addition, for example, “10?” Is designated as the code condition indicating the target item when extracting the totalized record.
This code condition "10?" Is composed of a three-digit numerical code from the item code, and indicates that all item codes including the upper two-digit value "10" are to be totaled items.
In other words, to specify multiple item codes in a single definition ,? Although the code condition is defined by the marked description, when only one item code is designated, the item code may be defined as the code condition as it is. The table B defines the item name output as the data item of the totalized record and the format at the time of printing the form, the totaling target file, and the totaling target item extracted as the data item corresponding to this item name.
【0009】パラメータファイル4にはA表、B表に対
応してその基本フォーマット(罫線データ等)が予めメ
ーカサイドによって固定的に格納されている他に、入力
部1から任意に入力された各種帳票のA表パラメータデ
ータ、B表パラメータデータおよび、入力部1から任意
に入力された各種の帳票名とA表パラメータデータ、B
表パラメータデータとを対応付ける対応テーブルが記憶
されている。In the parameter file 4, the basic formats (ruled line data, etc.) corresponding to the tables A and B are fixedly stored in advance by the maker side, and various types are arbitrarily input from the input section 1. Table A parameter data and B table parameter data of the form, and various form names and A table parameter data arbitrarily input from the input unit 1 and B
A correspondence table that correlates with the table parameter data is stored.
【0010】表構造解析部5は帳票印刷時に入力部1か
ら入力された起動命令にしたがって動作し、出力対象と
して任意に指定された帳票名に対応するA表パラメータ
データ、B表パラメータデータを解析し、その解析結果
にしたがって構成ファイル7を作成する。ここで、テー
ブルメモリ6は項目コードと名称とを対応付けて成る索
引テーブル等を記憶するもので、この索引テーブル等は
入力部2からユーザが任意に設定したものである。表構
造解析部5はこのテーブルメモリ6を参照し、A表のコ
ード条件に合致する全ての項目コードに対応する名称を
索引テーブルから読み出しながら構成ファイル7の作成
を行う。The table structure analysis unit 5 operates according to the start command input from the input unit 1 when printing the form, and analyzes the A table parameter data and the B table parameter data corresponding to the form name arbitrarily designated as an output target. Then, the configuration file 7 is created according to the analysis result. Here, the table memory 6 stores an index table or the like in which item codes and names are associated with each other, and this index table or the like is arbitrarily set by the user from the input unit 2. The table structure analysis unit 5 refers to the table memory 6 and creates the configuration file 7 while reading the names corresponding to all the item codes matching the code condition of the table A from the index table.
【0011】ここで、図4はテーブルメモリ6に設定さ
れているテーブルの一部を示している。ファイル認識テ
ーブルはファイル毎に設けられたもので、ファイル項目
名と索引テーブルのテーブル名とを対応付けたテーブル
で、図示のファイル認識テーブルは回収ファイルに対応
するテーブルである。また、営業所テーブル、得意先テ
ーブルは図示したファイル認識テーブルに対応する索引
テーブルで、項目コードとその名称とを対応付けた構成
となっている。この索引テーブルから項目コードに対応
する名称が読み出されて名称の自動生成が行われる。FIG. 4 shows a part of the table set in the table memory 6. The file recognition table is provided for each file, and is a table in which the file item name is associated with the table name of the index table, and the illustrated file recognition table is a table corresponding to the collection file. Further, the sales office table and the customer table are index tables corresponding to the illustrated file recognition table, and have a configuration in which item codes are associated with their names. The name corresponding to the item code is read from this index table and the name is automatically generated.
【0012】なお、構成ファイル7は後で詳述するが、
集計対象の項目コードとそれに対応する集計レコードと
の対応関係や集計レベルの階層構造における親子関係
(上下関係)等を表わす各種の構成レコードから成るも
のである。更に、表構造解析部5はB表のヘッダー位置
に定義されている各欄の項目名、例えば“売上額”等の
名称を読み出して印刷書式メモリ8に設定する他、B表
の書式の位置に定義されている各欄の印刷書式を読み出
して印刷書式メモリ8に設定する。その後、表構造解析
部5は展開ファイル作成部9に起動命令を与える。The configuration file 7 will be described in detail later,
It is composed of various constituent records representing the correspondence between the item code to be totaled and the corresponding totalization record, the parent-child relationship (upper and lower relationships) in the hierarchical structure of the totalization level, and the like. Further, the table structure analysis unit 5 reads out the item name of each column defined in the header position of the B table, for example, the name of “sales amount” and sets it in the print format memory 8, and the position of the B table format. The print format of each column defined in 1 is read out and set in the print format memory 8. After that, the table structure analysis unit 5 gives a start command to the expansion file creation unit 9.
【0013】展開ファイル作成部9はパラメータ解析テ
ーブル6内の各種テーブル内容を参照し、データファイ
ル10を構成する各種のソースファイルA……Nの中か
ら集計対象ファイルを指定したり、この集計対象ファイ
ルから抽出したレコードに基づいて1レコードずつ展開
レコードを順次生成し、展開ファイル11に書き出す。
これによって展開ファイル11を作成すると、展開ファ
イル作成部9は展開集計処理部12に起動命令を与え
る。The expansion file creating unit 9 refers to various table contents in the parameter analysis table 6 to specify a file to be totalized from various source files A ... Based on the records extracted from the file, expanded records are sequentially generated one by one and written in the expanded file 11.
When the expansion file 11 is created in this way, the expansion file creation unit 9 gives a start command to the expansion aggregation processing unit 12.
【0014】展開集計処理部12は構成ファイル7を参
照しながら展開ファイル11の内容に基づいて1レコー
ドずつ集計レコードを順次作成し、集計ファイル13に
書き出す。これによって集計ファイル13を作成する
と、展開集計処理部12は印刷処理部14に起動命令を
与える。印刷処理部14は集計ファイル13の内容を印
刷書式メモリ8に設定されている印刷書式にしたがって
1レコードずつ帳票フォーマットと共にプリンタ15か
ら印字出力させることにより、帳票作成を行う。The expansion totalization processing unit 12 refers to the configuration file 7 and sequentially creates one total record based on the contents of the expansion file 11 and writes the totalized records in the totalization file 13. When the totalization file 13 is created in this way, the expansion totalization processing unit 12 gives a start instruction to the print processing unit 14. The print processing unit 14 prints out the contents of the totalization file 13 from the printer 15 one record at a time in accordance with the print format set in the print format memory 8 together with the form format, thereby creating a form.
【0015】次に、本実施例の動作を説明する。先ず、
所望する帳票を得る為に入力部1からA表、B表の作成
を指示すると、パラメータ設定部2はこれに応答して動
作する。先ず、A表作成時にパラメータ設定部2はパラ
メータファイル4から読み出したA表の基本フォーマッ
トにしたがって表枠等を表示出力させる。この状態にお
いて、入力部1からA表のパラメータデータを入力す
る。図3の(A)はA表にパラメータデータを入力した
場合の表示例である。ここで、A表の行方向には集計レ
ベルA、B、Cに対応して集計レコードにおけるレコー
ド名の配置位置を特定する為に、実際のレコード名に代
わる総括的な代用名称が括弧書きで入力されている。例
えば、行No「01」には集計レベルAに対応して「(営
業所)」が入力され、また、行No「02」には集計レベ
ルBに対応して「(得意先)」が入力されている。な
お、集計レベルの階層構造はA>B>Cの関係にあり、
この集計レベルに対応してレコード名の配置位置を定義
しておくと、集計レベルに応じた階層構造でレコード集
計が行われ、集計レベルBのレコードはそれよりも上位
レベルにある集計レコードAのレコードに集計される。Next, the operation of this embodiment will be described. First,
When the input unit 1 gives an instruction to create the tables A and B in order to obtain a desired form, the parameter setting unit 2 operates in response to this. First, when creating the A table, the parameter setting unit 2 displays and outputs a table frame and the like according to the basic format of the A table read from the parameter file 4. In this state, the parameter data of Table A is input from the input unit 1. FIG. 3A is a display example when parameter data is input to the A table. Here, in the row direction of table A, in order to specify the layout position of the record name in the totalized record corresponding to the totaling levels A, B, and C, the general substitute name in place of the actual record name is written in parentheses. It has been entered. For example, in row No. “01”, “(sales office)” is entered corresponding to the aggregation level A, and in row No “02” is entered “(customer)” corresponding to the aggregation level B. Has been done. In addition, the hierarchical structure of the aggregation level has a relation of A>B> C,
If the layout position of the record name is defined in correspondence with this aggregation level, the records are aggregated in the hierarchical structure according to the aggregation level, and the records of the aggregation level B have the records of the aggregation record A at a higher level than that. It is aggregated into records.
【0016】また、A表には任意のファイル名および項
目名が入力されている。例えば、図3の(A)に示すA
表においては、ファイル名「回収ファイル」が入力され
ており、これによって集計レコードをどのファイルから
抽出すべきかの対象ファイル名が定義される。また、フ
ァイル名に対応する項目名として第1指定項目、第2指
定項目が入力されている。例えば、第1指定項目として
項目名「営業所コード」、第2指定項目として項目名
「得意先コード」が入力されており、これによって集計
レコードとして抽出すべき対象項目名が定義される。こ
れらの2つの項目名に対応してA表には集計対象項目の
コード条件がそれぞれ入力されている。即ち、行No「0
1」には第1指定項目に対応してコード条件「10?」
が入力され、また、行No「02」には第2指定項目に対
応してコード条件「3???」が入力されている。この
コード条件「10?」は3桁の数値コードから成る各項
目コードのうちその上位2桁の値「10」を含む全ての
項目コードを集計対象項目とすることを示している。ま
た、コード条件「3???」は4桁の数値コードから成
る各項目コードのうちその上位1桁の値「3」を含む全
ての項目コードを集計対象項目とすることを示してい
る。このように、図示のA表内には複数の項目名に対応
付けてそのコード条件がそれぞれ定義されている。この
場合、複数のレコード条件にそれぞれ該当するレコード
が集計対象となる。つまり、営業所コードの上位2桁に
「10」の値を持ち、かつ得意先コードの上位1桁に
「3」の値を持つ全てのレコードが集計対象となる。な
お、図示の例では階層関係を明確にする為に第1指定項
目のコード条件を行No「01」に定義したが、行No「0
2」の対応位置に定義しても同等である。Further, in the table A, arbitrary file names and item names are entered. For example, A shown in FIG.
In the table, the file name “collected file” is entered, and by this, the target file name from which the total record should be extracted is defined. Further, the first designated item and the second designated item are input as the item names corresponding to the file names. For example, the item name “sales office code” is input as the first designated item, and the item name “customer code” is input as the second designated item, which defines the target item name to be extracted as the aggregated record. Corresponding to these two item names, the code conditions of the items to be totaled are entered in the table A, respectively. That is, line No. "0
"1" corresponds to the first designated item and the code condition "10?"
Is entered, and the code condition “3 ??????” is entered in line No. “02” corresponding to the second designated item. The code condition "10?" Indicates that all item codes including the upper 2-digit value "10" of each item code consisting of a 3-digit numerical code are to be totaled items. Further, the code condition “3 ????” indicates that all the item codes including the value “3” of the upper one digit of each item code consisting of the four-digit numerical code are set as the aggregation target items. In this way, the code conditions are defined in the illustrated table A in association with a plurality of item names. In this case, records corresponding to a plurality of record conditions are to be aggregated. That is, all records having the value “10” in the upper two digits of the business office code and the value “3” in the upper one digit of the customer code are to be aggregated. In the illustrated example, the code condition of the first designated item is defined in line No. “01” in order to clarify the hierarchical relationship.
Even if it is defined in the corresponding position of "2", it is equivalent.
【0017】一方、A表には各行Noに対応して出力順序
エリアが設けられており、この「出力順序」は対応する
コード条件に該当するレコード内容をどの順序で出力す
るかを定義するものである。ここで、行No「01」、
「02」に対応する出力順序として図示の例では「コー
ド順」が入力されており、該当レコードを昇順とする様
な並び順で出力すべきことを示している。即ち、例えば
営業所コードのコード条件に一致する項目コードとして
「102」を持ったレコードと「105」を持ったレコ
ードがそれぞれ該当する場合において、先ず、項目コー
ド「102」を持ったレコード、次に、項目コード「1
05」を持ったレコードの並び順で出力すべきことを定
義している。なお、「出力順序」としてはコード順の
他、名称順、逆順等であってもよい。また、A表には各
行に対応して管理単位エリアが設けられており、任意の
行を指定してそれに対応する位置に丸印を入力する。な
お、この管理単位は構成ファイル7の作成時に参照され
る。このようにしてA表を作成すると、パラメータ設定
部2はそのパラメータデータをパラメータファイル4に
設定する。On the other hand, the table A is provided with an output order area corresponding to each row No. This "output order" defines in what order the record contents corresponding to the corresponding code conditions are output. Is. Here, line No. “01”,
In the illustrated example, "code order" is input as the output order corresponding to "02", indicating that the output should be performed in the order of arrangement such that the corresponding records are in ascending order. That is, for example, when a record having “102” and a record having “105” as the item codes that match the code condition of the sales office code respectively correspond to the record having the item code “102”, And the item code "1
It is defined that records should be output in the order of the records having "05". The "output order" may be a code order, a name order, a reverse order, or the like. Further, the table A has a management unit area corresponding to each row, and an arbitrary row is designated and a circle is input at a position corresponding to the designated row. It should be noted that this management unit is referred to when the configuration file 7 is created. When the table A is created in this way, the parameter setting unit 2 sets the parameter data in the parameter file 4.
【0018】次に、パラメータ設定部2はパラメータフ
ァイル4からB表の基本フォーマットを読み出して表示
出力させる。この行方向の見出し部にはその行項目のラ
ベルとして「書式」、「対象ファイル」、「集計項目」
が予め固定的に設定されており、また、B表の列方向に
おける見出し部の各列項目はその項目位置を示す名称と
して「A」、「B」、「C」……に対応付けられてい
る。Next, the parameter setting section 2 reads out the basic format of the table B from the parameter file 4 and outputs it for display. In this heading section in the row direction, "Format", "Target file", and "Summary item" are used as labels for the line item.
Is fixedly set in advance, and each column item in the heading section in the column direction of the table B is associated with “A”, “B”, “C” ... As a name indicating the item position. There is.
【0019】いま、B表の基本フォーマットが表示出力
されている状態において、業務担当者は入力部1からB
表のパラメータデータを入力する。図3(B)はB表に
パラメータデータを入力した場合の表示例である。ここ
で、B表の列方向における見出し部には集計レコードの
データ項目として印刷出力される項目名が入力されてい
る。例えば、項目位置「B」には項目名「売上額」が入
力されている。また、B表の行項目において、「書式」
には項目データの印刷書式として列項目毎に欄幅、文字
種、文字サイズ等が入力されている。また、次の「対象
ファイル」には列項目位置「B」に対応して「回収ファ
イル」が入力されている。更に、次の「集計項目」は集
計対象として抽出されたレコードの中からどの項目デー
タを集計すべきかを定義するもので、列項目位置「B」
に対応して「売上額」が入力されている。このようにし
てB表を作成すると、パラメータ設定部2はそのパラメ
ータデータをパラメータファイル4に設定する。Now, in the state in which the basic format of the table B is displayed and output, the person in charge of business works from the input section 1 to the B
Enter the parameter data in the table. FIG. 3B is a display example when parameter data is input to the B table. Here, in the heading portion in the column direction of table B, the item name to be printed out as the data item of the total record is input. For example, the item name “sales amount” is entered in the item position “B”. Also, in the line item of table B, "format"
The column width, character type, character size, etc. are input for each column item as a print format of item data. Further, in the next "target file", "collection file" is input corresponding to the column item position "B". Further, the next “total item” defines which item data should be totaled from the records extracted as the total target, and the column item position “B”.
"Sales amount" is entered corresponding to. When the table B is created in this way, the parameter setting unit 2 sets the parameter data in the parameter file 4.
【0020】いま、A表、B表を作成した後、入力部1
から任意の帳票名を指定してその印刷指令を与えると、
表構造解析部5はA表パラメータにしたがって構成ファ
イル7を作成する。ここで、図5〜図8は構成ファイル
7を作成する際の動作を示したフローチャート、また、
図9は構成ファイル7を作成する際の動作内容を示した
図、また図10は図3の(A)に示すA表に基づいて作
成された構成ファイル7の具体的な内容を示した図であ
る。なお、構成レコードは「子コード」、「親コー
ド」、「終了印」、「名称」から成り、「子コード」、
「親コード」は集計対象項目とそれに対応する集計レコ
ードとの対応関係を表わしたり、集計レベルの階層構造
における親子関係(上下関係)を表わすコードである。
また、「終了印」は親コードに最上位の集計レベルAが
含まれている場合に“1”となるフラグであり、終了印
に“1”がセットされている場合にはそれよりも上位レ
ベルへのレコード集計を行わないことを示している。ま
た、「名称」は集計レコードのレコード名であり、テー
ブルメモリ6内の索引テーブル等を参照することによっ
て自動的に生成された名称である。After creating tables A and B, input section 1
If you specify an arbitrary form name from and give the print command,
The table structure analysis unit 5 creates the configuration file 7 according to the table A parameters. Here, FIG. 5 to FIG. 8 are flowcharts showing the operation when creating the configuration file 7,
FIG. 9 is a diagram showing operation contents when the configuration file 7 is created, and FIG. 10 is a diagram showing specific contents of the configuration file 7 created based on the table A shown in FIG. Is. The configuration record consists of "child code", "parent code", "end mark", and "name".
The “parent code” is a code that represents a correspondence relationship between the item to be totaled and the corresponding totalized record, and represents a parent-child relationship (upper / lower relationship) in a hierarchical structure at the totaling level.
The “end mark” is a flag that becomes “1” when the parent code includes the highest aggregation level A, and is higher than the end mark when “1” is set. It indicates that records are not aggregated to the level. The “name” is the record name of the totalized record, and is the name automatically generated by referring to the index table or the like in the table memory 6.
【0021】先ず、表構造解析部5はパラメータファイ
ル4からA表のパラメータデータを読み出し、このA表
内に定義されているファイル名によって示されるデータ
ファイル10内のソースファイルを指定する(ステップ
A1)。次に、A表の先頭行を指定し(ステップA
2)、表構造解析部5内の後述する最終項目ワークメモ
リ(図9の(B)参照)の内容を全てクリアしておくと
共に(ステップA3)、現在着目中のレベル(現在レベ
ル)として指定行のレベルを指定しておく(ステップA
4)。そして、A表に定義されている第1指定項目のコ
ード条件に合致する項目コードを有するレコードを指定
ファイルから検索する(ステップA5)。いま、図3の
(A)に示すA表にはファイル名として「回収ファイ
ル」、第1指定項目(項目名「営業所コード」)のコー
ド条件として「10?」が定義されているので、上位2
桁の値が「10」となる営業所コードを有するレコード
を回収ファイルから検索する。この場合、回収ファイル
は図9の(D)に示す如く構成されているものとする。
即ち、回収ファイルにはその先頭から営業所コードが
「112」、「102」、「102」、「105」、
「105」「125」……を持ったレコードが順次格納
されているものとすると、先ず、第1指定項目のコード
条件「10?」に該当するレコードとして回収ファイル
から2番目のレコードつまり、営業所コード「102」
を持ったレコードが検索される。First, the table structure analysis unit 5 reads the parameter data of the A table from the parameter file 4 and specifies the source file in the data file 10 indicated by the file name defined in the A table (step A1). ). Next, specify the first row of table A (step A
2) Clear all the contents of the final item work memory (see FIG. 9B) in the table structure analysis unit 5 described later (step A3), and specify it as the currently focused level (current level). Specify the line level (Step A)
4). Then, the record having the item code that matches the code condition of the first designated item defined in the table A is searched from the designated file (step A5). Now, in the table A shown in FIG. 3A, "collection file" is defined as the file name and "10?" Is defined as the code condition of the first designated item (item name "office code"). Top 2
A record having a sales office code with a digit value of “10” is searched from the collection file. In this case, the recovery file is assumed to be configured as shown in FIG.
That is, in the collection file, the business office codes are “112”, “102”, “102”, “105”,
Assuming that the records having “105”, “125”, ... Are sequentially stored, first, as the record corresponding to the code condition “10?” Of the first designated item, the second record from the collection file, that is, the sales Office code "102"
The record with is searched.
【0022】すると、現在レベルと現在着目しているA
表の行Noと該当するレコード内の項目コードとからレベ
ル行データを生成する(ステップA6)。いま、A表の
先頭行に着目しているので現在レベルは「A」、行Noは
「01」、該当レコード内の項目コードは「102」、
したがってこれらを組み合せたレベル行データ「A01
102」が生成される。次に、該当する項目コードに対
応する名称をテーブルメモリ6内の索引テーブルより読
み出す(ステップA7)。即ち、A表に定義されている
ファイル名に対応するをテーブルメモリ6内のファイル
認識テーブルをアクセスし、このファイル認識テーブル
を参照して第1指定項目の項目名に対応するテーブル名
を呼び出し、このテーブル名に対応する索引テーブルを
アクセスして該当する項目コードに対応する名称をこの
索引テーブルから読み出す。この場合、営業所テーブル
から項目コード「102」に対応する名称「B営業所」
が読み出される。次に、生成したレベル行データと索引
テーブルから読み出した名称とを最終項目ワークメモリ
の現在レベルの位置にセットする(ステップA8)。こ
の結果、図9の(B)に示す様に、最終項目ワークメモ
リの現在レベルAの位置に対応してレベル行データ「A
01102」、名称「B営業所」がセットされる。な
お、最終項目ワークメモリは図9の(B)に示す様に集
計レベルA、B、C、D……に対応してレベル行データ
および名称を記憶する構成となっている。Then, the current level and the current A
Level row data is generated from the row number of the table and the item code in the corresponding record (step A6). Now, since the focus is on the first row of table A, the current level is "A", the row number is "01", the item code in the corresponding record is "102",
Therefore, the level line data “A01
102 "is generated. Next, the name corresponding to the corresponding item code is read from the index table in the table memory 6 (step A7). That is, the file recognition table in the table memory 6 corresponding to the file name defined in the table A is accessed, and the table name corresponding to the item name of the first designated item is called by referring to this file recognition table, The index table corresponding to this table name is accessed and the name corresponding to the corresponding item code is read from this index table. In this case, the name "B sales office" corresponding to the item code "102" from the sales office table
Is read. Next, the generated level row data and the name read from the index table are set at the current level position in the last item work memory (step A8). As a result, as shown in FIG. 9B, the level line data “A
"01102" and the name "B sales office" are set. The final item work memory is configured to store level line data and names corresponding to the aggregation levels A, B, C, D ... As shown in FIG.
【0023】次に、現在行の管理単位エリアに丸印が付
されているか否かをチェックする(ステップA9)。い
ま、A表の先頭行には丸印が付されていないので、A表
の次行に着目してその行にデータが設定されているか否
かをチェックする(ステップA10)。ここで、設定有
りが検出されると、現在行を更新して次行の指定を行う
(ステップA11)。これによってA表の2行目が指定
されてステップA12に進み、指定行のレベルが現在レ
ベル以上か否かのエラーチェックを行い、現在レベル以
上であれば、最終項目メモリ内で指定行のレベル以下の
内容を全てクリアしておく(ステップA13)。いま、
指定行レベルBは現在レベルA未満であるので、ステッ
プA14に進み、指定行レベルを現在レベルとして現在
レベルの更新を行う。Next, it is checked whether or not the management unit area of the current line is circled (step A9). Since the first row of the A table is not marked with a circle, the next row of the A table is focused on to check whether or not data is set in that row (step A10). When the setting is detected, the current line is updated and the next line is designated (step A11). As a result, the second row of table A is designated, and the procedure advances to step A12, and an error check is performed to see if the level of the designated row is at or above the current level. The following contents are all cleared (step A13). Now
Since the designated row level B is lower than the current level A, the process proceeds to step A14, where the designated row level is set as the current level and the current level is updated.
【0024】次に、図6のステップA15に進み、検索
レコード(第1指定項目のコード条件に基づいてステッ
プA5で検索されたレコード)内にA表に定義されてい
る第2指定項目のコード条件に該当する項目コードが含
まれているかをチェックする。いま、第2指定項目(項
目名「得意先コード」)のコード条件は「3???」
で、検索レコードは図9の(D)に示す2番目のレコー
ド、つまり営業所コード「102」を有するレコードで
あり、この2番目の検索レコード内の得意先コード「3
001」はそのコード条件「3???」に合致する為、
ステップA16でそのことが検出されてステップA17
に進み、最終項目ワークメモリ内において、現在レベル
Bよりも1つ上位のレベル位置(集計レベルAの位置)
に格納されているレベル行データの中から行No「01」
と項目コード「102」とを読み出す。そして、現在レ
ベルBと最終項目ワークメモリから読み出した行No「0
1」および項目コード「102」と、第2指定項目のコ
ード条件に該当する項目コード「3001」とを順次組
み合せてレベル行データ「B011023001」を生
成する(ステップA18)。次に、第2指定項目のコー
ド条件に該当する項目コード「3001」に基づいてそ
れに対応する名称「○○商店」を索引テーブル(得意先
テーブル)から読み出し(ステップA19)、この名称
をステップA18で生成したレベル行データと共に最終
項目ワークメモリ内の現在レベルに対応するレベル位置
にセットする(ステップA20)。これによって最終項
目ワークメモリのレベルBの位置にはレベル行データ
「B011023001」と名称「○○商店」がセット
される(図9の(B)参照)。そして、次のステップA
21ではこのレベル行データを構成レコードの子コード
としてセットする(図9の(A)参照)。Next, proceeding to step A15 in FIG. 6, the code of the second designated item defined in the table A in the retrieved record (the record retrieved in step A5 based on the code condition of the first designated item). Check whether the item code corresponding to the condition is included. Now, the code condition for the second designated item (item name "customer code") is "3 ????"
Then, the search record is the second record shown in FIG. 9D, that is, the record having the sales office code "102", and the customer code "3" in the second search record.
Since "001" matches the code condition "3 ???",
When this is detected in step A16, step A17
To the last item, in the work memory, the level position one level higher than the current level B (position of the aggregation level A)
No. "01" from the level line data stored in
And the item code “102” are read. Then, the line number "0" read from the current level B and the last item work memory
1 ”and the item code“ 102 ”are sequentially combined with the item code“ 3001 ”corresponding to the code condition of the second designated item to generate the level line data“ B011023001 ”(step A18). Next, based on the item code "3001" corresponding to the code condition of the second designated item, the corresponding name "XX store" is read from the index table (customer table) (step A19), and this name is read in step A18. It is set to the level position corresponding to the current level in the final item work memory together with the level row data generated in step A20. As a result, the level line data "B011023001" and the name "XX store" are set at the level B position of the final item work memory (see FIG. 9B). And the next step A
At 21, the level line data is set as a child code of the constituent record (see (A) of FIG. 9).
【0025】次に、図7のステップA31に進み、最終
項目ワークメモリの中から(現在レベル+1)のレベル
位置に格納されているレベル行データを読み出し、これ
を構成レコードの親コードとしてセットする。いま、現
在レベルはB、したがって最終項目ワークメモリのレベ
ルAの位置に格納されているレベル行データ「A011
02」が親コードとなる(図9の(A)参照)。ここ
で、親コードのレベルがAであれば(ステップA3
3)、構成レコードの終了印に“1”をセットする(ス
テップA34)。次に、親コードの名称を最終項目ワー
クメモリから読み出して構成レコードの名称としてセッ
トする(ステップA35)。このようにして1レコード
分のデータとして子コード「B011023001」、
親コード「A01102」、終了印「1」、名称「B営
業所」が揃うと、この構成レコ−ドは図10に示す様に
構成ファイル7の1レコード目のデータとして書き出さ
れる(ステップA36)。Next, in step A31 of FIG. 7, the level line data stored at the level position (current level + 1) is read out from the last item work memory and set as the parent code of the configuration record. . Now, the current level is B, so the level line data “A011” stored at the position of level A in the last item work memory.
02 ”is the parent code (see FIG. 9A). Here, if the level of the parent code is A (step A3
3), "1" is set to the end mark of the configuration record (step A34). Next, the name of the parent code is read from the final item work memory and set as the name of the configuration record (step A35). In this way, the child code “B011023001” as data for one record,
When the parent code "A01102", the end mark "1", and the name "B office" are complete, this configuration record is written out as the data of the first record of the configuration file 7 as shown in FIG. 10 (step A36). .
【0026】このようにして1レコード目の構成レコー
ドを生成すると、次に図5のステップA9に戻るが、こ
の場合、現在行つまり、行No「02」に対応する管理単
位エリアには丸印が付されているので、図8のステップ
A36に進み、最終項目ワークメモリ内の現在レベル位
置に格納されているレベル行データから第1指定項目の
コード条件に該当する項目コード「102」と第2指定
項目のコード条件に該当する項目コード「3001」と
をそれぞれ読み出し、この組み合せコードを次の構成レ
コードの子コードとしてセットする(図9の(C)参
照)。次に、最終項目ワークメモリ内の現在レベル位置
に格納されているレベル行データ「B01102300
1」を読み出し、これを構成レコードの親コードとして
セットし(ステップA37)、また、この親コードの名
称を最終項目ワークメモリから読み出して構成レコード
の名称としてセットする(ステップA38)。図9の
(C)はこれによって生成された構成レコードを示し、
この構成レコードは子コードが「1023001」、親
コードが「B011023001」、名称が「○○商
店」から成るもので、構成ファイル7の2レコード目の
データとして書き出される(ステップA39)。When the first constituent record is generated in this way, the process returns to step A9 in FIG. 5, but in this case, the management unit area corresponding to the current line, that is, the line No. "02" is circled. 8, the process proceeds to step A36 of FIG. 8 and the item code "102" corresponding to the code condition of the first designated item is determined from the level line data stored at the current level position in the last item work memory. The item code "3001" corresponding to the code condition of the two designated items is read out, and this combination code is set as a child code of the next configuration record (see (C) of FIG. 9). Next, the level line data "B01102300" stored at the current level position in the last item work memory.
1 "is read out and set as the parent code of the configuration record (step A37), and the name of this parent code is read out from the last item work memory and set as the name of the configuration record (step A38). FIG. 9C shows the configuration record generated by this,
This configuration record has a child code of "1023001", a parent code of "B011023001", and a name of "XX store", and is written as data of the second record of the configuration file 7 (step A39).
【0027】このようにして2レコード目を構成レコー
ドを生成すると、図6のステップA22に進み、最終項
目ワークメモリ内において、現在レベルの1つ上位のレ
ベル位置に格納されているレベル行データの中から項目
コード「102」を読み出し、この項目コードと同一コ
ードを持つ他のレコードがソースファイル内に有るかを
検索する(ステップA23)。いま、図9の(D)に示
す様に回収ファイルの3レコード目の営業所コードも
「102」であるので、ステップA24で同一コード有
りが検出されてステップA15に戻る。この場合、この
検索レコードの得意先コードは「3003」、したがっ
て第2指定項目のコード条件「3???」と一致する
為、以下、上述と同様にこの検索レコードに基づいて構
成レコードの生成を行う。即ち、最終項目ワークメモリ
内の1つ上位のレベル位置から読み出した行No「0
1」、項目コード「102」と、現在レベルBと、第2
指定項目の項目コード「3003」とからレベル行デー
タ「B011023003」を生成すると共に(ステッ
プA17、A18)、この項目コード「3003」に対
応する名称「××販売」を得意先テーブルから読み出し
(ステップA19)、このレベル行データと名称とを最
終項目ワークメモリの現在レベル位置にセットする(ス
テップA20)。この結果、図9の(B)に示す最終項
目ワークメモリのレベルB位置の内容が書き替えられ、
そのレベル行データは「B011023003」、名称
は「××販売」となる。そして、このレベル行データを
構成レコードの子コードとしてセットする(ステップA
21)。次に、最終項目ワークメモリのレベルAの位置
から読み出したレベル行データ「A01102」を構成
レコードの親コードとしてセットすると共に(ステップ
A31)、構成レコードの終了印に“1”をセットし
(ステップA33)、また親コードの名称「B営業所」
を構成レコードの名称としてセットする(ステップA3
4)。これによって生成された構成レコードは構成ファ
イル7の3レコード目に書き出される(図10参照)。When the constituent record of the second record is generated in this way, the process proceeds to step A22 in FIG. 6, and the level line data stored in the last item work memory is stored in the level position one level higher than the current level. The item code "102" is read from the inside, and it is searched whether another record having the same code as this item code exists in the source file (step A23). Now, as shown in FIG. 9 (D), the office code of the third record of the collection file is also "102", so that the same code is detected in step A24 and the process returns to step A15. In this case, the customer code of this search record is "3003", and therefore matches the code condition "3 ???" of the second designated item. Therefore, the configuration record is generated based on this search record as described above. I do. That is, the line number "0" read from the level position one level higher in the last item work memory.
1 ”, item code“ 102 ”, current level B, second
Level line data “B011023003” is generated from the item code “3003” of the designated item (steps A17 and A18), and the name “xx sales” corresponding to the item code “3003” is read from the customer table (step S17). A19), this level line data and name are set at the current level position of the last item work memory (step A20). As a result, the contents of the level B position of the last item work memory shown in FIG. 9B are rewritten,
The level line data is “B011023003”, and the name is “XX sale”. Then, this level line data is set as a child code of the configuration record (step A
21). Next, the level line data “A01102” read from the position of level A of the last item work memory is set as the parent code of the configuration record (step A31), and “1” is set to the end mark of the configuration record (step S31). A33) and the name of the parent code "B sales office"
Is set as the name of the constituent record (step A3).
4). The configuration record thus generated is written in the third record of the configuration file 7 (see FIG. 10).
【0028】続いて、ステップA9に戻るが、この場合
においても管理単位に丸印有りが検出されるので、図8
のステップA36〜A39が実行される結果、図10に
示す4レコード目の構成レコードが生成される。この場
合、子コードは「1023003」、親コードは「B0
11023003」、名称は「××販売」となる。Then, the process returns to step A9, but in this case as well, a circle mark is detected in the management unit.
As a result of execution of steps A36 to A39, the fourth constituent record shown in FIG. 10 is generated. In this case, the child code is “1023003” and the parent code is “B0
"11230003" and the name is "XX sale".
【0029】そして、図6のステップA22に戻るが、
この場合、回収ファイルには図9の(D)に示す様に、
営業所コードが「102」となる他のレコードは存在し
ない為、ステップA25に進み、第1指定項目のコード
条件「10?」に該当する他の項目コードを回収ファイ
ルから検索する。この場合、図9の(D)に示す様に、
このコード条件に該当するレコードとして回収ファイル
の4レコード目には営業所コードが「105」となるレ
コードが存在する為、ステップA26で該当コード有り
が検出されてステップA27に進み、最終項目ワークメ
モリ内において現在レベルの1つ上位のレベル位置に格
納されているレベル行データの中からレベル名および行
Noを読み出し、このレベル名および行Noと、第1指定項
目のコード条件に該当する項目コードとからレベル行デ
ータを生成する(ステップA28)。この場合、レベル
行データとして「A01105」が生成される。次に第
1指定項目に該当する項目コード「105」に基づいて
対応する名称「E営業所」を索引テーブルから読み出し
(ステップA29)、これをレベル行データと共に最終
項目ワークメモリの1つ上位のレベル位置にセットする
(ステップA30)。この結果、図9の(B)に示す最
終項目ワークメモリのレベルA位置の内容が書き替えら
れ、そのレベル行データは「A01105」、名称は
「E営業所」となる。Then, returning to step A22 in FIG. 6,
In this case, as shown in (D) of FIG.
Since there is no other record having the office code of "102", the process proceeds to step A25, and another item code corresponding to the code condition "10?" Of the first designated item is searched from the collection file. In this case, as shown in FIG.
As the record corresponding to this code condition, there is a record whose sales office code is "105" in the fourth record of the collection file, so the presence of the corresponding code is detected in step A26, and the process proceeds to step A27, where the final item work memory. Level name and line from the level line data stored in the level position one level higher than the current level in
No is read, and level line data is generated from the level name and line number, and the item code corresponding to the code condition of the first designated item (step A28). In this case, "A01105" is generated as the level row data. Next, based on the item code "105" corresponding to the first designated item, the corresponding name "E sales office" is read from the index table (step A29), and this is read along with the level row data, and is one level higher than the last item work memory. It is set at the level position (step A30). As a result, the contents of the level A position of the final item work memory shown in FIG. 9B are rewritten, and the level line data becomes "A01105" and the name becomes "E sales office".
【0030】次に、ステップA15に戻るが、この場
合、回収ファイルの4レコード目の得意先コードは「3
102」、したがって第2指定項目のコード条件「3?
??」に該当する為、このレコードに基づいて構成レコ
ードが生成される(ステップA17〜A21、A31〜
A35)。これによって生成された5レコード目の構成
レコードは図10に示す如く、子コードが「B0110
53102」、親コードが「A01105」、終了印が
「1」、名称が「E営業所」となる。以下、ステップA
10でA表の次行に設定無しが検出されるまで構成レコ
ードを生成する処理を1レコードずつ繰り返す。これに
よって図10に示す様な構成ファイル7が作成される。Next, returning to step A15, in this case, the customer code of the fourth record of the collection file is "3.
102 ”, and thus the code condition“ 3?
? ? ", The configuration record is generated based on this record (steps A17-A21, A31-).
A35). As shown in FIG. 10, the child record “B0110” is generated in the fifth component record thus generated.
53102 ”, the parent code is“ A01105 ”, the end mark is“ 1 ”, and the name is“ E sales office ”. Step A below
In step 10, the process of generating the configuration record is repeated record by record until no setting is detected in the next row of table A. As a result, the configuration file 7 as shown in FIG. 10 is created.
【0031】このようにして構成ファイル7を作成する
と、表構造解析部5はパラメータファイル4からB表パ
ラメータを読み出し、このパラメータデータから書式デ
ータを読み出して印刷書式モリ8にセットしておく。こ
の場合、表構造解析部5はB表のヘッダー位置に定義さ
れている各欄の項目名を読み出して印刷書式モリ8にセ
ットする。その後、表構造解析部5は展開ファイル作成
部9を起動させる。When the configuration file 7 is created in this way, the table structure analysis unit 5 reads the B table parameter from the parameter file 4, reads the format data from this parameter data, and sets it in the print format memory 8. In this case, the table structure analysis unit 5 reads the item name of each column defined in the header position of the table B and sets it in the print format memory 8. Then, the table structure analysis unit 5 activates the expansion file creation unit 9.
【0032】すると、展開ファイル作成部9は図11の
フローチャートにしたがって展開ファイル作成処理を行
う。なお、展開ファイル11は帳票の出力データである
集計ファイル13を作成するまでに中間的に生成される
ファイルである。ここで、図12はソースファイルが回
収ファイルの場合に、そのファイル内容にしたがって生
成された展開レコードを示している。先ず、展開ファイ
ル作成部9はパラメータファイル4内のA表に定義され
ているファイル名に対応するソースファイルを指定する
と共に(ステップB1)、この指定ファイルの先頭レコ
ードを指定する(ステップB2)。そして、この指定レ
コードからA表に定義されている第1指定項目に対応す
る項目コードを読み出し(ステップB3)、この項目コ
ードがそのコード条件に該当するかをチェックする(ス
テップB4)。いま、回収ファイルの先頭レコードが指
定されて第1指定項目「営業所コード」に対応する項目
コード「112」が読み出されるが、この項目コードは
そのコード条件「10?」に該当しない為、ステップB
7に進み、指定ファイル内に次のレコードが有るかを調
べ、有れば、ステップB8で次のレコードを指定したの
ち、ステップB3に戻る。Then, the expansion file creating unit 9 executes the expansion file creating process according to the flowchart of FIG. The expansion file 11 is a file that is intermediately generated until the total file 13 that is the output data of the form is created. Here, FIG. 12 shows the expansion record generated according to the contents of the file when the source file is the recovery file. First, the expansion file creation unit 9 specifies the source file corresponding to the file name defined in the table A in the parameter file 4 (step B1) and the top record of this specified file (step B2). Then, the item code corresponding to the first designated item defined in the table A is read from this designated record (step B3), and it is checked whether this item code satisfies the code condition (step B4). Now, the first record of the collection file is designated and the item code "112" corresponding to the first designated item "sales office code" is read out, but since this item code does not correspond to the code condition "10?", The step B
7, the process proceeds to step 7 to check if the next record exists in the specified file. If there is, the next record is specified in step B8, and then the process returns to step B3.
【0033】これによって回収ファイルの2番目のレコ
ードが指定されてその営業所コード「102」が読み出
される。この営業所コードは、第1指定項目のコード条
件に該当する為、ステップB5に進み、指定レコードか
らA表の第2指定項目に対応する項目コードを読み出
し、そのコード条件に該当するかをチェックする(ステ
ップB6)。いま、第2指定項目は「得意先コード」で
あり、その項目コード「3001」はそのコード条件
「3???」に該当する為、ステップB9に進み、第1
指定項目および第2指定項目に対応する該当コード「1
02」、「3001」を結合し、これを展開レコードの
分類キーとしてセットする。次に、指定レコードからB
表の集計項目に対応する項目データを読み出し(ステッ
プB10)、展開レコードの対応位置にセットする(ス
テップB11)。ここで、B表の集計項目としてその列
項目位置Bには「売上額」が定義されているので、回収
ファイルの2番目のレコードからこの売上額「200,
000」が読み出されて展開レコードの対応位置Bにセ
ットされる。これによって生成された展開レコードは展
開ファイル11の1レコード目に書き出される(ステッ
プB12)。As a result, the second record of the collection file is designated and the business office code "102" is read. Since this office code corresponds to the code condition of the first designated item, the process proceeds to step B5, the item code corresponding to the second designated item of the table A is read from the designated record, and it is checked whether the code condition is met. (Step B6). Now, the second designated item is "customer code", and the item code "3001" corresponds to the code condition "3 ????"
Corresponding code "1" corresponding to the designated item and the second designated item
02 "and" 3001 "are combined and set as the classification key of the expansion record. Next, from the specified record, B
Item data corresponding to the tabulated items in the table are read (step B10) and set to the corresponding positions of the expansion record (step B11). Here, since the “sales amount” is defined in the column item position B as the total item of the table B, the sales amount “200,” is calculated from the second record of the collection file.
“000” is read out and set in the corresponding position B of the expansion record. The expansion record thus generated is written to the first record of the expansion file 11 (step B12).
【0034】次に、ステップB7に戻り、以下、指定フ
ァイルの3レコード目が指定される。このレコードもA
表に定義されている第1および第2指定項目のコード条
件にそれぞれ該当する為、そのレコードに基づいて展開
レコードが生成される。この場合の展開レコードは図1
2に示す2レコード目の内容となる。更に回収ファイル
の4レコード目においてもそれに基づいて展開レコード
が生成され、図12に示す3レコード目の内容となる。
以下、指定ファイルの全レコードについて上述の動作を
繰り返し、展開レコードを1レコードずつ生成する処理
を行う。これによって展開ファイル11を作成すると、
展開ファイル作成部9は展開集計処理部12を起動させ
る。Next, returning to step B7, the third record of the designated file is designated. This record is also A
Since the code conditions of the first and second designated items defined in the table are respectively satisfied, the expansion record is generated based on the record. The expansion record in this case is shown in Figure 1.
This is the content of the second record shown in 2. Further, a developed record is also generated in the fourth record of the collected file based on the fourth record, and has the contents of the third record shown in FIG.
Hereinafter, the above-described operation is repeated for all the records of the specified file, and a process of generating expanded records one by one is performed. When the expansion file 11 is created by this,
The expansion file creation unit 9 activates the expansion aggregation processing unit 12.
【0035】図13は展開集計処理部12の動作を示し
たフローチャート、また、図14は展開集計処理部12
の動作内容を具体的に説明する為の図である。展開ファ
イル作成部9は展開ファイル11の内容と構成ファイル
7の内容とに基づいて集計ファイル13を部品展開手法
にしたがって生成する。先ず、展開集計処理部12は展
開ファイル11の先頭から1レコード分のデータを読み
込む(ステップC1)。そして、次のステップC2では
データ終了か、つまり、展開ファイル11の先頭から全
てのレコードを読み出したか否かをチェックする。最初
は展開ファイル11の先頭から1レコード分のデータを
読み込んだ場合であるから、次のステップC3に進み、
構成ファイル7の内容をサーチし、その分類キーと一致
する子コードを構成ファイル7から検索する。いま、図
12に示す様に展開ファイル11の先頭レコード内の分
類キーは「1023001」であり、構成ファイル7に
は図10に示す様にこれと一致する子コードを持った構
成レコードがその2レコード目に存在する為、ステップ
C3でそのことが検出されてステップC4に進み、集計
ファイル13のレコード(集計レコード)を生成する。
即ち、図14の具体例において、先ず、展開集計処理部
12はこの子コード「1023001」に対応する親コ
ードを構成ファイル7から読み出し、この親コード「B
011023001」を集計レベルとそれ以外の数値と
に分解し、この数値「011023001」を集計ファ
イル13の1レコード目の先頭項目に配置し、また集計
レベルの「B」をそれに続けて配置する。そしてこの子
コードに対応する名称「○○商店」を構成ファイル7か
ら読み出し、集計レコードの次の項目に配置する。これ
に続けて展開ファイル11のデータ項目「200,00
0」を集計レコードの次項目以降に順次配置する。FIG. 13 is a flow chart showing the operation of the expansion totalization processing unit 12, and FIG. 14 is the expansion totalization processing unit 12.
FIG. 7 is a diagram for specifically explaining the operation content of FIG. The expansion file creation unit 9 generates the totalization file 13 according to the parts expansion method based on the contents of the expansion file 11 and the contents of the configuration file 7. First, the expansion totalization processing unit 12 reads data for one record from the beginning of the expansion file 11 (step C1). Then, in the next step C2, it is checked whether the data has ended, that is, whether all the records have been read from the beginning of the expanded file 11. First, since the data for one record is read from the beginning of the expanded file 11, the process proceeds to the next step C3,
The contents of the configuration file 7 are searched, and a child code that matches the classification key is searched from the configuration file 7. Now, as shown in FIG. 12, the classification key in the first record of the expansion file 11 is "1023001", and the configuration file 7 has a configuration record having a child code matching this as shown in FIG. Since it exists in the record, it is detected in step C3 and the process proceeds to step C4 to generate a record (total record) of the total file 13.
That is, in the specific example of FIG. 14, the expansion tabulation processing unit 12 first reads the parent code corresponding to the child code “1023001” from the configuration file 7, and the parent code “B
“011023001” is decomposed into a totaling level and other numerical values, and this numerical value “011023001” is placed in the first item of the first record of the totaling file 13, and the totaling level “B” is placed following it. Then, the name "XX store" corresponding to this child code is read from the configuration file 7 and placed in the next item of the total record. Following this, the data item “200,00” of the expansion file 11
"0" is sequentially arranged after the next item of the aggregation record.
【0036】これによって集計ファイル13の1レコー
ド目のデータが生成されると、この生成レコードを集計
ファイル13に書き出すが、その際、集計ファイル13
内に既に同一分類キーを持つレコードが存在していれ
ば、それを1レコードにまとめて集計ファイル13内に
書き込み、また同一分類キーのレコードが存在していな
ければ、今回生成したレコードを新たに集計ファイル1
3に追加する(ステップC5)。When the data of the first record of the totalization file 13 is generated in this way, this generated record is written to the totalization file 13. At this time, the totalization file 13
If a record having the same classification key already exists in the record, it is put together into one record and written into the totalization file 13. If no record having the same classification key exists, the record generated this time is newly added. Summary file 1
3 (step C5).
【0037】次に、構成ファイル7内の該当レコード位
置に終了印がセットされているか否かをチェックする
(ステップC6)。ここで、構成ファイル7内の終了印
は親コードの集計レベルが「A」のときに“1”となる
もので、終了印が“1”のときにはそのままステップC
3に戻るが、終了印が“1”でなければ新たな展開レコ
ードを生成して展開ファイル11への書き出しを行う
(ステップC7)。この場合、構成ファイル7の該当レ
コード位置には終了印がセットされていないので、図1
4に示す様な新たな展開レコードを生成して展開ファイ
ル11へ戻す。即ち、今回生成した集計レコードよりも
上位レベルにあるレコードがA表に定義されていれば、
今回生成した集計レコードの集計結果を上位レベルにあ
るレコードへ集計させる為に、新たな展開レコードを生
成してプリンタ15への書き出しを行う。ここで、構成
ファイル7内の該当する親コード「B01102300
1」を先頭項目に配置し、これに続けて展開ファイル1
1から読み出した項目データを対応位置に順次配置して
成るレコードを展開ファイル11へ書き出す。Next, it is checked whether or not the end mark is set at the corresponding record position in the configuration file 7 (step C6). Here, the end mark in the configuration file 7 is "1" when the aggregation level of the parent code is "A", and when the end mark is "1", the step C is used as it is.
Returning to step 3, if the end mark is not "1", a new expanded record is generated and written in the expanded file 11 (step C7). In this case, since the end mark is not set in the corresponding record position of the configuration file 7,
A new expansion record as shown in 4 is generated and returned to the expansion file 11. That is, if a record at a higher level than the aggregate record generated this time is defined in table A,
A new expansion record is generated and written to the printer 15 in order to total the totalized result of the totalized records generated this time to the record at the higher level. Here, the corresponding parent code “B01102300” in the configuration file 7
"1" is placed in the first item, followed by expansion file 1
A record formed by sequentially arranging item data read from 1 at corresponding positions is written to the expansion file 11.
【0038】その後、ステップC3に戻り、以下、構成
ファイル7の内容を全てサーチし、該当レコードが検出
されなくなるまで上述の動作を繰り返す。この結果、ス
テップC3で該当レコード無しが検出されて不一致終了
となると、ステップC1に戻り、展開ファイル11から
次のレコードを読み出す。このような動作は展開ファイ
ル11の全レコードに対して行われる。すると、ステッ
プC1でデータ終了が検出されてステップC8に進み、
集計ファイル13を構成する各レコードをその先頭項目
のキー内容にしたがってソートする。この場合、展開集
計処理部12はパラメータファイル4内のA表に定義さ
れている出力順序にしたがって集計ファイル13の内容
をソートする。図15はこの場合の集計ファイル13の
内容を示し、(A)はソート前、(B)はソート後を示
している。ここで、A表に定義されている「出力順序」
は「営業所」、「得意先」共、コード順である為、集計
ファイル13内の対応するレコードはそのキー内容にし
たがって昇順(コード順)にソートされ、図15の
(B)に示す様な並びとなる。その後、展開集計処理部
12は印刷処理部14を起動させる。すると、印刷処理
部14は印刷書式メモリ8の内容を取り込んでその印刷
書式にしたがって集計ファイル13の内容を帳票フォー
マットと共にプリンタ15から印刷出力させることによ
り帳票作成を行う。この場合、印刷処理部14は集計フ
ァイル13の先頭から1レコードずつ集計レコードを読
み出し、この集計レコード内に含まれている集計レベル
を判別し、それに対応する括り用の罫線フォーマットと
共に、集計レコード内の名称およびデータを1レコード
ずつ印字出力させると共に、印刷書式メモリ8に記憶さ
れている各項目名を順次取り出して罫線フォーマットの
対応位置に印刷出力させる。図2はこの場合の帳票印刷
例で、その行方向には集計レベルに応じた階層構造のフ
ォーマットと共に、集計レコードの名称が印刷されると
共に、列方向には集計レコードの項目名が印刷され、更
に、集計ファイル13の内容が1レコード毎に印刷出力
される。Thereafter, the process returns to step C3, and thereafter, the entire contents of the configuration file 7 are searched, and the above operation is repeated until the corresponding record is not detected. As a result, when no corresponding record is detected in step C3 and the mismatch ends, the process returns to step C1 to read the next record from the expanded file 11. Such an operation is performed for all the records of the expanded file 11. Then, the end of data is detected in step C1 and the process proceeds to step C8,
The records forming the totalization file 13 are sorted according to the key content of the first item. In this case, the expansion totalization processing unit 12 sorts the contents of the totalization file 13 according to the output order defined in the table A in the parameter file 4. FIG. 15 shows the contents of the tabulation file 13 in this case, (A) shows before sorting, and (B) shows after sorting. Here, "output order" defined in table A
Since “Sales office” and “Customer” are in code order, the corresponding records in the aggregation file 13 are sorted in ascending order (code order) according to their key contents, as shown in FIG. It becomes a line. After that, the development totalization processing unit 12 activates the print processing unit 14. Then, the print processing unit 14 takes in the content of the print format memory 8 and prints out the content of the totalization file 13 together with the form format from the printer 15 according to the print format to create the form. In this case, the print processing unit 14 reads the totalized records one by one from the beginning of the totalization file 13, determines the totalization level included in the totalized record, and determines the totalized level in the totalized record together with the corresponding ruled line format for bundling. The name and data are printed out one record at a time, and each item name stored in the print format memory 8 is sequentially taken out and printed out at the corresponding position of the ruled line format. FIG. 2 is an example of printing a form in this case. In the row direction, the format of the hierarchical structure according to the aggregation level is printed, the names of the aggregation records are printed, and the item names of the aggregation records are printed in the column direction. Further, the contents of the totalization file 13 are printed out for each record.
【0039】以上の様に、本実施例においては、集計レ
コードを抽出する際の対象項目をコード条件で定義する
ことによって多数の項目コードを一括指定したとして
も、そのコード条件に該当する全てのレコードの名称を
索引テーブルから読み出して自動生成し、予め定義して
おいたレコード名の配置位置に出力するので、集計レコ
ードの名称を1レコードずつ記述しておく必要はなく、
その記述を大幅に簡略化することが可能となり、全体が
見易くなって記述ミスも削減することが可能となる。ま
た、多数の項目コードを集計対象として指定する場合、
その項目コードの内容を出力順序の並び順にしたがって
1つずつ直接記述しておく必要はなく、コード条件の記
述によって一括指定したとしても、このコード条件に該
当する全てのレコードが予め定義されている出力順序に
したがった並び順で出力されるので、集計定義表の記述
を更に簡略化することができる。また、複数のコード条
件を集計レベルに応じた階層構造で定義した場合には、
複数のコード条件に該当する全てのレコードを集計レベ
ルに応じて分類集計すると共に、この集計結果を階層構
造で出力するので、予めシステムエンジニア等の専門家
によって分類集計用のコード体系(コード変換テーブ
ル)を作成しておく必要はなく、簡単な集計定義表を記
述しておくだけで、誰でも容易に所望する帳票を得るこ
とが可能となる。As described above, in the present embodiment, even if a large number of item codes are collectively designated by defining the target item for extracting the totalized record by the code condition, all items corresponding to the code condition are The name of the record is read from the index table, automatically generated, and output to the position where the record name is defined in advance. Therefore, it is not necessary to describe the name of the totalized record one by one.
The description can be greatly simplified, the whole is easy to see, and the description error can be reduced. Also, when specifying a large number of item codes as aggregation targets,
It is not necessary to directly describe the contents of the item code one by one according to the arrangement order of the output order, and even if they are collectively specified by the description of the code condition, all the records corresponding to this code condition are defined in advance. Since the output is performed in the order according to the output order, the description of the aggregate definition table can be further simplified. Also, when multiple code conditions are defined in a hierarchical structure according to the aggregation level,
All records that correspond to multiple code conditions are classified and aggregated according to the aggregation level, and this aggregation result is output in a hierarchical structure. Therefore, an expert such as a system engineer in advance can classify and aggregate code systems (code conversion table). ) Is not required to be created, and anyone can easily obtain a desired form simply by describing a simple tabulation definition table.
【0040】[0040]
【第2実施例】以下、図16〜図19を参照して第2実
施例を説明する。図16は本実施例のA表を示し、A表
の行No「01」、「02」に対応する定義内容は上記第
1実施例と同様であるが、行No「03」には集計レコー
ドの任意のレコード名を集計レベルに対応させて直接記
述すると共に、集計レコードを抽出する際の対象項目の
コード内容をそのまま第1指定項目、第2指定項目に対
応させて定義したものである。即ち、本実施例において
は、上記第1実施例の第1および第2の指定項目に対応
するコード条件に該当しない項目も集計対象とすること
ができるようにしたもので、図示の例では第1指定項目
のコード条件「10?」には該当するが第2指定項目の
コード条件「3???」には該当しない項目、つまり、
第1指定項目のコード内容が「105」で第2指定項目
のコード内容が「2001」の項目を集計対象とする定
義内容を示している。なお、この行No「03」には集計
レベルBに対応させてレコード名「ZZ販売」が直接記
述されているが、この名称は上記第1実施例の様な総括
的な代用名称ではない実際のレコード名である為、括弧
書きで記述する必要はない。このように、複数の集計対
象項目を一括して指定する記述と、集計対象を個々に指
定する記述が混在していても、本実施例においてはこの
定義内容にしたがってレコード集計を行うと共に、定義
内容通りのイメージで帳票出力を行うようにしたもので
ある。[Second Embodiment] A second embodiment will be described below with reference to FIGS. FIG. 16 shows the A table of the present embodiment, and the definition contents corresponding to the row numbers “01” and “02” of the A table are the same as those of the first embodiment, but the row No “03” has the aggregation record. Is directly described in association with the aggregation level and the code content of the target item when the aggregation record is extracted is defined as it is in correspondence with the first designated item and the second designated item. That is, in the present embodiment, items which do not correspond to the code conditions corresponding to the first and second designated items of the first embodiment can be targeted for aggregation. Items that correspond to the code condition “10?” Of the first designated item but not the code condition “3 ???” of the second designated item, that is,
The definition content is shown in which the code content of the first designated item is “105” and the code content of the second designated item is “2001”. Although the record name "ZZ sale" is directly described in the row No. "03" in association with the aggregation level B, this name is not a general substitute name as in the first embodiment. Since it is the record name of, it is not necessary to write it in parentheses. As described above, even if the description for collectively specifying a plurality of items to be totalized and the description for individually specifying the totaling target are mixed, in the present embodiment, the record totalization is performed according to the definition contents and the definition is performed. The form is output with the image as it is.
【0041】図17は図16に示すA表を基に作成され
た構成ファイル7の内容を示している。ここで、構成フ
ァイル7の7レコード目と8レコード目が本実施例にお
いて新たに生成された構成レコードで、その他は上記第
1実施例と同様である。この新たに生成された構成レコ
ードは、その子コード、親コードのコード形態に特徴が
あり、デルタ記号という特殊な記号が用いられている。
即ち、7レコード目の子コードと8レコード目の親コー
ドは本来「B011052001」となるが、「B01
105Δ03」で表現され、また、8レコード目の子コ
ードは本来「1052001」となるが、これも「10
5Δ03」で表現されている。ここで、デルタ記号に続
く「03」は行Noを示している。このように第2指定項
目のコード内容「2001」に代えてそれをデルタ記号
で表現したのは、帳票出力時にこの例外的な「ZZ販
売」のレコードを最下行に配置させる為である。即ち、
上述した様に、この構成ファイル7の内容にしたがって
作成された集計ファイル13は、構成レコードの親コー
ド(集計レベルを除く)をキーとし、このキー内容を参
照してA表に定義されている出力順序でソートされ、帳
票出力時の印刷順に並べ替えられる為、例外的なレコー
ドのキーに第2指定項目のコード内容がそのまま含まれ
ていると、このレコードが最下行に配置されなくなる。
これを防ぐ為に、本実施例においては、第2指定項目の
コード内容に代わってデルタ記号を用いている。ここ
で、集計ファイル13の内容をコード順(昇順)にソー
トする場合、0〜9、A〜Z、a〜z、Δの順でソート
するようにしている。FIG. 17 shows the contents of the configuration file 7 created based on the table A shown in FIG. Here, the 7th record and the 8th record of the configuration file 7 are the configuration records newly generated in this embodiment, and the others are the same as those in the first embodiment. This newly generated configuration record is characterized by the code form of its child code and parent code, and a special symbol called a delta symbol is used.
That is, the child code of the 7th record and the parent code of the 8th record are originally "B011052001".
It is expressed by "105Δ03", and the child code of the 8th record is originally "1052001".
5Δ03 ”. Here, "03" following the delta symbol indicates a row number. In this way, the reason why the code content “2001” of the second designated item is replaced by the delta symbol is that this exceptional “ZZ sale” record is arranged at the bottom line when the form is output. That is,
As described above, the totalization file 13 created in accordance with the contents of the configuration file 7 uses the parent code (excluding the totalization level) of the configuration record as a key, and is defined in the table A by referring to this key content. Since the records are sorted in the output order and sorted in the print order when the form is output, if the code content of the second designated item is included as it is in the key of the exceptional record, this record will not be placed at the bottom line.
In order to prevent this, in this embodiment, a delta symbol is used in place of the code content of the second designated item. Here, when the contents of the totalization file 13 are sorted in code order (ascending order), they are sorted in the order of 0-9, AZ, az, and Δ.
【0042】図18は集計ファイル13のソート前、ソ
ート後における内容を示し、例外的なレコードが集計フ
ァイル13の途中に含まれていてもそれをコード順にソ
ートすることによってそのレコードは最終のレコード位
置に並べ替えられる。このソート後の集計ファイル13
の内容を印刷出力すると、図19に示す様な帳票が得ら
れ、「ZZ販売」の集計結果は帳票の最下行に配置さ
れ、定義内容通りのイメージで帳票出力される。なお、
構成レコード内にデルタ記号に続けて行Noを付加したの
は、例外的なレコードが複数定義されている場合にその
定義内容通りの並び順で帳票出力させる為である。FIG. 18 shows the contents of the totalization file 13 before and after sorting. Even if an exceptional record is included in the middle of the totalization file 13, by sorting it in code order, that record is the last record. Sorted by position. Total file 13 after this sort
When the contents of is printed out, a form as shown in FIG. 19 is obtained, and the totalized result of "ZZ sales" is placed in the bottom line of the form, and the form is output as an image according to the definition contents. In addition,
The line No. is added after the delta symbol in the constituent records in order to output the forms in the order of arrangement as defined when a plurality of exceptional records are defined.
【0043】このように構成された本実施例においても
上記第1実施例と同様の効果を有する他、複数の集計対
象項目を一括指定する記述に含まれない例外的な項目も
個別にレコード集計されて帳票出力することが可能とな
る。The present embodiment thus constructed has the same effect as that of the first embodiment, and records exceptional items individually even if they are not included in the description for collectively designating a plurality of items to be aggregated. Then, the form can be output.
【0044】[0044]
【第3実施例】以下、図20、図21を参照して第3実
施例を説明する。図20は本実施例のA表を示し、上記
第1実施例と相違する点は集計レベルに対応して記述さ
れる総括的な代用名称に「,」を付加して括弧書きにし
たものである。このように「,」を代用名称に付加して
おくと、帳票出力時に、対応する項目コードがレコード
名に添えて印刷出力される(図21参照)。この場合、
集計ファイル13の内容をその先頭から1レコードずつ
読み出す際に、そのキーに含まれている項目コードを名
称と共に読み出して印字出力すればよい。このように構
成された本実施例においても上記第1実施例と同様の効
果を有する他、項目コードを正確に覚えてない場合に
は、それを再認識することが可能となる。[Third Embodiment] A third embodiment will be described below with reference to FIGS. FIG. 20 shows Table A of the present embodiment, which differs from the first embodiment described above in that the general substitute name described in correspondence with the aggregation level is parenthesized by adding “,”. is there. When "," is added to the substitute name in this way, the corresponding item code is printed out along with the record name when the form is output (see FIG. 21). in this case,
When reading the contents of the totalization file 13 one record at a time from the beginning, the item code included in the key may be read together with the name and printed out. The present embodiment configured as described above has the same effect as that of the first embodiment, and when the item code is not remembered correctly, it can be recognized again.
【0045】なお、上記各実施例においては集計対象項
目のコード条件として「10?」、「3???」という
様に、項目コードの一部に?マークを付けて複数の項目
を一括指定するようにしたが、例えば、123<?<1
34というようなコード条件で指定してもよい。また、
上記実施例は第1指定項目、第2指定項目にコード条件
を定義するようにしたが、第3指定項目を設け、この第
3指定項目にもコード条件を定義するようにしてもよ
い。更に、上記実施例はA表およびB表をそれぞれ別個
に定義するようにしたが、A表、B表をまとめて定義す
るようにしてもよい。また、上記第3実施例においては
総括的な代用名称に「,」を付加することにより項目コ
ードと名称とを対応付けて印字出力させることを定義し
たが、特別な記号を付加しなくてもレコード名の配置位
置を単に指定しておくだけで名称と項目コードとを対応
付けて印字出力するようにしてもよい。In each of the above-mentioned embodiments, a part of the item code such as "10?" Or "3 ???" Although a mark is added to specify a plurality of items at once, for example, 123 <? <1
It may be specified by a code condition such as 34. Also,
In the above embodiment, the code condition is defined in the first designated item and the second designated item, but a third designated item may be provided and the code condition may be defined in the third designated item. Further, in the above embodiment, the A table and the B table are defined separately, but the A table and the B table may be defined together. Further, in the third embodiment, the item code and the name are associated and printed by adding "," to the general substitute name, but it is not necessary to add a special symbol. The name and the item code may be associated with each other and printed out by simply specifying the arrangement position of the record name.
【0046】[0046]
【発明の効果】この発明によれば、所望する帳票を得る
為に、帳票出力イメージにしたがって出力レコードのレ
コード名の配置位置、出力対象項目のコード条件を単に
指定するだけで、コード条件に合致する全てのレコード
を所定ファイルから読み出し、その名称と共に指定内容
通りのイメージで出力することができるので、出力レコ
ード毎にレコード名を直接記述したり、出力対象項目毎
に項目コードを直接記述する必要もなく、簡単な指定
で、所望する帳票を誰でも容易に得ることが可能とな
り、極めて実用性に富んだものとなる。According to the present invention, in order to obtain a desired form, it is possible to match the code condition by simply specifying the arrangement position of the record name of the output record and the code condition of the output target item according to the form output image. It is possible to read all the records to be read from a specified file and output the image with the name as the specified contents, so it is necessary to directly describe the record name for each output record or the item code for each output target item. Nonetheless, anyone can easily obtain a desired form with a simple designation, which is extremely practical.
【図1】実施例に係るデータ処理装置のブロック構成
図。FIG. 1 is a block configuration diagram of a data processing device according to an embodiment.
【図2】帳票の印刷出力例を示した図。FIG. 2 is a diagram showing a printout example of a form.
【図3】集計定義表を示し、(A)はA表、(B)はB
表の内容を示した図。FIG. 3 shows an aggregation definition table, (A) is A table, and (B) is B.
The figure which showed the content of the table.
【図4】テーブルメモリ6の一部を示し、(A)はファ
イル認識テーブル、(B)は営業所テーブル、(C)は
得意先テーブルを示した図。FIG. 4 is a diagram showing a part of a table memory 6, (A) showing a file recognition table, (B) showing a sales office table, and (C) showing a customer table.
【図5】構成ファイル作成処理の一部を詳細に示したフ
ローチャート。FIG. 5 is a flowchart showing a part of a configuration file creation process in detail.
【図6】図5に続く構成ファイル作成処理の一部を示し
たフローチャート。FIG. 6 is a flowchart showing a part of a configuration file creation process following FIG.
【図7】図5に続く構成ファイル作成処理の一部を示し
たフローチャート。FIG. 7 is a flowchart showing a part of a configuration file creation process following FIG.
【図8】図5に続く構成ファイル作成処理の一部を示し
たフローチャート。FIG. 8 is a flowchart showing a part of a configuration file creation process following FIG.
【図9】構成レコードの作成状態を具体的に示した図
で、(A)、(C)は構成レコード、(B)は最終項目
ワークメモリの内容、(D)は回収ファイルの一部を示
した図。9A and 9B are diagrams specifically showing a creation state of a configuration record, where FIGS. 9A and 9C show configuration records, FIG. 9B shows the contents of the last item work memory, and FIG. 9D shows a part of a collection file. The figure shown.
【図10】構成ファイルの具体的な内容を示した図。FIG. 10 is a diagram showing specific contents of a configuration file.
【図11】展開ファイル作成処理を示した図。FIG. 11 is a diagram showing a developed file creation process.
【図12】展開レコード作成状態を示した図。FIG. 12 is a diagram showing a developed record creation state.
【図13】展開集計処理を示したフローチャート。FIG. 13 is a flowchart showing a development totaling process.
【図14】展開集計処理の動作内容を具体的に示した図
で、(A)は展開ファイル、構成ファイルから集計レコ
ードが生成される様子を示した図、(B)は新たに生成
される展開レコードを示した図。14A and 14B are diagrams specifically showing the operation contents of the expansion and aggregation process, in which FIG. 14A is a view showing a generation record from the expansion file and the configuration file, and FIG. 14B is newly generated. The figure which showed the expansion record.
【図15】集計ファイルのソート前、ソート後における
集計ファイルの内容を示した図。FIG. 15 is a diagram showing the contents of a totalization file before and after sorting the totalization file.
【図16】第2実施例に係るA表の記述例を示した図。FIG. 16 is a diagram showing a description example of table A according to the second embodiment.
【図17】第2実施例に係る構成ファイルの内容を示し
た図。FIG. 17 is a diagram showing the contents of a configuration file according to the second embodiment.
【図18】第2実施例に係る集計ファイルのソート前、
ソート後の内容を示した図。FIG. 18 is a diagram showing a summary file before sorting according to the second embodiment;
The figure showing the contents after sorting.
【図19】第2実施例に係る帳票印刷例を示した図。FIG. 19 is a diagram showing an example of printing forms according to the second embodiment.
【図20】第3実施例に係るA表の記述例を示した図。FIG. 20 is a diagram showing a description example of table A according to the third embodiment.
【図21】第3実施例に係る帳票出力例を示した図。FIG. 21 is a diagram showing a form output example according to the third embodiment.
1 入力部 2 パラメータ設定部 3 表示部 4 パラメータファイル 5 表構造解析部 6 テーブルメモリ 7 構成ファイル 8 印刷書式メモリ 9 展開ファイル作成部 10 データファイル 11 展開ファイル 12 展開集計処理部 13 集計ファイル 14 印刷処理部 15 プリンタ 1 Input Section 2 Parameter Setting Section 3 Display Section 4 Parameter File 5 Table Structure Analysis Section 6 Table Memory 7 Configuration File 8 Print Format Memory 9 Expansion File Creation Section 10 Data File 11 Expansion File 12 Expansion Aggregation Processing Section 13 Aggregation File 14 Printing Processing Part 15 Printer
Claims (3)
定すると共に、出力レコードを抽出する際の対象項目を
示すコード条件を指定する指定手段と、 項目コードと名称とを対応付けて成る索引テーブルを記
憶するテーブル記憶手段と、 前記指定手段で指定されたコード条件に合致する項目コ
ードを有するレコードを所定ファイルから読み出すと共
に、この項目コードに対応する名称を前記索引テーブル
から読み出す読出手段と、 この読出手段によって読み出された名称を前記指定手段
で指定されたレコード名の配置位置に出力すると共に、
所定ファイルから読み出されたレコードをそれに該当す
る名称に対応付けて出力する出力手段と、 を具備したことを特徴とする帳票出力装置。1. An index table formed by associating an item code and a name with a designating unit that designates a layout position of a record name of an output record and a code condition that indicates a target item when the output record is extracted. Table reading means for storing, and a reading means for reading a record having an item code matching the code condition designated by the designating means from a predetermined file and reading a name corresponding to the item code from the index table, The name read by the reading means is output to the arrangement position of the record name designated by the designating means, and
An output device for outputting a record read from a predetermined file in association with a name corresponding to the record, and a output device.
出された名称を前記指定手段で指定されたレコード名の
配置位置に出力する際に、この名称と共に対応する項目
コードを出力するようにしたことを特徴とする請求項
(1)記載の帳票出力装置。2. When outputting the name read by the reading means to the arrangement position of the record name designated by the designating means, the output means outputs the corresponding item code together with the name. The form output device according to claim 1, characterized in that.
に、出力レコードを抽出する際の対象項目を示すコード
内容を指定する第1の指定手段と、 出力レコードのレコード名の配置位置を指定すると共
に、出力レコードを抽出する際の対象項目を示すコード
条件を指定する第2の指定手段と、 項目コードと名称とを対応付けて成る索引テーブルを記
憶するテーブル記憶手段と、 前記第1の指定手段で指定されたコード内容に合致する
レコードを所定ファイルから読み出す第1の読出手段
と、 前記第2の指定手段で指定されたコード条件に合致する
項目コードを有するレコードを所定ファイルから読み出
すと共に、この項目コードに対応する名称を前記索引テ
ーブルから読み出す第2の読出手段と、 前記第1の読出手段によって読み出されたレコードを前
記第1の指定手段で指定されたレコード名に対応付けて
出力する第1の出力手段と、 前記第2の読出手段によって読み出された名称を前記第
2の指定手段で指定されたレコード名の配置位置に出力
すると共に、所定ファイルから読み出されたレコードを
それに該当する名称に対応付けて出力する第2の出力手
段と、 を具備したことを特徴とする帳票出力装置。3. A first designation means for designating a record name of an output record, a code content indicating a target item when the output record is extracted, and a layout position of the record name of the output record. Second designation means for designating a code condition indicating a target item when extracting an output record, table storage means for storing an index table in which item codes and names are associated with each other, and the first designation means. And a record having an item code matching the code condition designated by the second designating means, from the predetermined file. Second reading means for reading the name corresponding to the item code from the index table, and the first reading means for reading the name. First output means for outputting the record in association with the record name designated by the first designating means, and the name read by the second reading means designated by the second designating means. A form output device comprising: a second output unit that outputs a record name to a layout position and outputs a record read from a predetermined file in association with a corresponding name.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP05173634A JP3109330B2 (en) | 1993-06-22 | 1993-06-22 | Form output device |
| US08/261,723 US5642521A (en) | 1993-06-22 | 1994-06-17 | Data processing apparatus for extracting and processing arbitrary records from a file |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP05173634A JP3109330B2 (en) | 1993-06-22 | 1993-06-22 | Form output device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0778213A true JPH0778213A (en) | 1995-03-20 |
| JP3109330B2 JP3109330B2 (en) | 2000-11-13 |
Family
ID=15964252
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP05173634A Expired - Fee Related JP3109330B2 (en) | 1993-06-22 | 1993-06-22 | Form output device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3109330B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018097552A (en) * | 2016-12-13 | 2018-06-21 | カシオ計算機株式会社 | Information processing apparatus and program |
-
1993
- 1993-06-22 JP JP05173634A patent/JP3109330B2/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018097552A (en) * | 2016-12-13 | 2018-06-21 | カシオ計算機株式会社 | Information processing apparatus and program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3109330B2 (en) | 2000-11-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7370271B2 (en) | Methods and apparatus for generating a spreadsheet report template | |
| JP3108984B2 (en) | Data processing device | |
| JPH05113879A (en) | Program creation and data processing method | |
| KR940002481B1 (en) | Method and apparatus for data processing | |
| US6108677A (en) | Data processing apparatus | |
| US5642521A (en) | Data processing apparatus for extracting and processing arbitrary records from a file | |
| JP3109324B2 (en) | Data aggregation device | |
| US5805881A (en) | Method and apparatus for generating arbitrary output records in response to output designation of records | |
| JP4501459B2 (en) | Program, method and apparatus for creating cross table | |
| JP3109331B2 (en) | Form output device | |
| JP3109330B2 (en) | Form output device | |
| JP3554768B2 (en) | Data aggregation device | |
| JP3548866B2 (en) | Data processing device | |
| JPH04290126A (en) | How to customize input/output format | |
| JP3551445B2 (en) | Form processing device | |
| JP3064706B2 (en) | Data processing device | |
| JP3533469B2 (en) | Form output device | |
| JP3482651B2 (en) | Data processing device | |
| JPH0793426A (en) | Data processing device | |
| JPH04181372A (en) | Table sheet totalization system for data | |
| JPH06309345A (en) | Data output method | |
| JP4737659B2 (en) | Table set database system and table set data creation device | |
| JPH06309344A (en) | Data totalizing method | |
| JPH0452866A (en) | Business program automatic generation method | |
| JP2849290B2 (en) | Screen form definition body automatic generation processing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090914 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100914 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100914 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110914 Year of fee payment: 11 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120914 Year of fee payment: 12 |
|
| LAPS | Cancellation because of no payment of annual fees |