JPH03269619A - Sort processing system using kanji field as sort key - Google Patents

Sort processing system using kanji field as sort key

Info

Publication number
JPH03269619A
JPH03269619A JP7013390A JP7013390A JPH03269619A JP H03269619 A JPH03269619 A JP H03269619A JP 7013390 A JP7013390 A JP 7013390A JP 7013390 A JP7013390 A JP 7013390A JP H03269619 A JPH03269619 A JP H03269619A
Authority
JP
Japan
Prior art keywords
kanji
sort
order
sorted
sorting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7013390A
Other languages
Japanese (ja)
Inventor
Yoichi Ueda
洋一 上田
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP7013390A priority Critical patent/JPH03269619A/en
Publication of JPH03269619A publication Critical patent/JPH03269619A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

PURPOSE:To improve the sort processing efficiency and also to reduce the memory capacity by storing a sort KANJI (Chinese character) order table used for sort processing into a system common virtual storage as the shared software and having accesses in common among plural processes. CONSTITUTION:The number N of KANJI fields designated as sort keys is obtained from a sort parameter table 2. Then '1' is set to a control variable I so that the position L, the number S of characters, and the KANJI order element T of the I-th KANJI field are obtained from the table 2. At the same time, an identification name X of a sort KANJI order table stored in a common software virtual storage area 4 corresponding to the element T is obtained from a sort KANJI order control table 7. Then '0' is set to a control variable J, and a code C of the (L+J)-th KANJI counted from the tip of a record is obtained. Furthermore the collating order value N of the code C is obtained by reference to the sort KANJI table of the name X and adds the value N to the record. The comparison is carried out between J and S. If J is larger than S, '1' is added to the value of I. Then I is compared with N. If I is larger than N, the processing is through. Thus the sort efficiency is improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、漢字コードで表現される漢字がら構成される
漢字フィールドをソートキーとしてソートを行うソート
処理方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a sort processing method that performs sorting using a kanji field composed of kanji characters expressed by kanji codes as a sort key.

〔従来の技術〕[Conventional technology]

従来、漢字コードで表現される漢字の大小関係を定義す
るためのンート漢字順表は補助記m装置内のファイルに
格納されており、漢字フィールドをソートキーとしてソ
ートを行う場合、利用者は、ソート漢字順表が格納され
ている補助記憶装置内のファイル(ソート漢字順表ファ
イル〉を割り当てなければならず、ソート処理において
は、各ブ[]グラム毎に、利用者の割り当てたソート漢
字順表ファイルから必要なソート漢字順表をそのプログ
ラムが使用するワークメモリ内にロードしていた。
Conventionally, the kanji order table for defining the size relationship of kanji expressed by kanji codes is stored in a file in the auxiliary notation device, and when sorting using the kanji field as a sort key, the user can A file (sorted kanji order table file) in the auxiliary storage device in which the kanji order table is stored must be allocated, and in the sorting process, the sorted kanji order table assigned by the user must be allocated for each gram. The required sorted Kanji order table was loaded from the file into the work memory used by the program.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した、漢字コードで表現される漢字から構成される
漢字フィールドをソートキーとしてソートを行う従来の
方式は次のような欠点があった。
The above-mentioned conventional method of sorting using a kanji field composed of kanji characters represented by kanji codes as a sort key has the following drawbacks.

利用者は、ソート漢字順表が格納されている補助記憶装
置内のファイル(ソート漢字順表ファイル)を割り当て
なければならず、ソート処理においては、各プログラム
毎に、利用者の割り当゛(たソート漢字順表ファイルか
ら、必要なソート漢字順表をそのプログラムが使用する
ワークメモリ内にロードする必要があったため、ソート
漢字順表をファイルからロードする処理が、漢字フィー
ルドをソートキーとしてソート処理を行う場合のソート
処理効率の低下をひきおこす。
The user must allocate a file (sorted kanji order table file) in the auxiliary storage device in which the sorted kanji order table is stored, and in the sorting process, the user's allocation ( Since it was necessary to load the necessary sorted kanji order table from the sorted kanji order table file into the work memory used by the program, the process of loading the sorted kanji order table from the file changed to the sort process using the kanji field as the sort key. This causes a decrease in sort processing efficiency when performing .

さらに、漢字フィールドをソートキーとする各プログラ
ム毎に、ソート漢字順表ファイルと、ソート漢字順表フ
ァイルからソート漢字順表をロードするためのメモリ領
域を割り当てなければならないため、特にそのようなプ
ログラムが、システムのなかで同時に多数動作するよう
な場合に、システム全体でのメモリ使用量が多くなって
しまう。
Furthermore, each program that uses a Kanji field as a sort key must allocate a memory area for the sorted Kanji order table file and for loading the sorted Kanji order table from the sorted Kanji order table file. , when a large number of systems operate simultaneously, the amount of memory used by the entire system increases.

本発明の目的は、ソート漢字順表をファイルからロード
する処理がソート処理効率の低下をひきおこさず、また
メモリ使用量が少なくて済む、漢字フィールドをソート
キーとするソート処理方式を提供することである。
An object of the present invention is to provide a sort processing method using a kanji field as a sort key, in which the process of loading a sorted kanji order table from a file does not cause a decrease in sort processing efficiency and requires less memory usage. be.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の、漢字フィールドをソートキーとするソート処
理方式は ソート実行を要求する利用者プログラムと、前記利用者
プログラムがソートパラメータを定義するためのソート
パラメータテーブルと、ソートを実行するためのワーク
エリアとして使用されるソート作業領域と、 共有ソフトウェア仮想記憶域内に共有ソフトウェアとし
て格納されており、ソート主処理、漢字付加フィールド
生成処理の2つの部分から°構成され、漢字フィールド
に対する漢字順序要素を提供しているソート処理手段と
、 漢字コードの大小関係を定義するための表で、前記共有
ソフトウェア仮想記憶域内に共有ソフトウェアとして格
納されており、漢字コードと、その漢字コードの漢字の
、対応する漢字順序要素に従った順序値を示す照合順序
値との組から構成されて一意な識別名を持つソート漢字
層表と。
The sort processing method of the present invention using a Kanji field as a sort key includes a user program that requests sort execution, a sort parameter table for the user program to define sort parameters, and a work area for executing the sort. The sort work area used and the shared software are stored as shared software in the virtual storage area and consist of two parts: sort main processing and kanji additional field generation processing, and provide kanji order elements for kanji fields. A table for defining the size relationship between kanji codes and the sort processing means stored in the kanji code, which is stored as shared software in the shared software virtual storage area, and which stores kanji codes and the corresponding kanji order elements of the kanji of the kanji code. A sorted Kanji layer table with a unique identifier consisting of pairs of collation sequence values indicating ordinal values according to the table.

前記ソート処理手段が提供している漢字順序要素とそれ
に対応する前記ソート漢字層表の識別名の組から構成さ
れるソート漢字順表管理テーブルとを備え、 前記利用者プログラムは、ソートキーとして定義される
漢字フィールドのレコード内位置と文字数、そのキーに
対する漢字順序要素、その他のソート実行に必要なパラ
メータを前記ソートパラメータテーブルに設定し、前記
共有ソフトウェア仮想記憶域内の前記ソート処理手段に
制御を渡し、前記ソート処理手段は、前記利用者プログ
ラムから制御を渡されると、前記ソート主処理を起動し
、前記ソート主処理は、前記ソート作業領域内にソート
するレコードを1件ずつ読み込み、レコードを1件読み
込むごとに、前記漢字付加フィールド生成処理を呼び出
し前記ソート主処理へ制御が戻されると、前記漢字付加
フィールド生成処理によりレコードに付加された漢字付
加フィールドを比較することによりレコードの順序を決
定し、ソート処理を行っていき、 前記漢字付加フィールド生成処理は、前記ソートパラメ
ータテーブルに指定されているその漢字フィールドに対
する漢字順序要素を調べ、その漢字順序要素に対応する
前記ソート漢字層表の識別名を前記ソート漢字順表管理
テーブルから得て、その識別名を持つ、前記共有ソフト
ウェア仮想記憶域内に共有ソフトウェアとして実装され
ている前記ソート漢字層表を参照しながら、前記ソート
パラメータテーブルに指定されているその漢字フィール
ドの位置から始まり、前記ソートパラメータテーブルに
指定されているその漢字フィールドの文字数だけの範囲
の各漢字の漢字コードの照合順序値を、前記ソート作業
領域内にへカされたレコードの漢字付加フィールドとし
て付加していくことにより漢字付加フィールドを生成し
ていく。
The sorting processing means includes a sorted kanji ordering table management table consisting of a pair of kanji ordering elements provided by the sorting processing means and identification names of the sorted kanji layer table corresponding to the kanji ordering elements; setting in the sort parameter table the position and number of characters of the kanji field in the record, the kanji order element for that key, and other parameters necessary for sorting, and passing control to the sort processing means in the shared software virtual storage area; When the sorting processing means is given control from the user program, it starts the sorting main processing, and the sorting main processing reads records to be sorted one by one into the sorting work area and stores one record. Each time it is read, the kanji additional field generation process is called, and when control is returned to the sort main process, the order of the records is determined by comparing the kanji additional fields added to the records by the kanji additional field generation process, The sorting process is performed, and the kanji additional field generation process checks the kanji order element for the kanji field specified in the sort parameter table, and determines the identification name of the sorted kanji layer table that corresponds to the kanji order element. Specified in the sorting parameter table while referring to the sorting kanji layer table, which is obtained from the sorting kanji order table management table and is implemented as shared software in the shared software virtual storage area and has the identification name. Starting from the position of that Kanji field, the collation sequence value of the Kanji code of each Kanji in the range equal to the number of characters of that Kanji field specified in the sort parameter table is added to the Kanji of the record that has been moved to the sort work area. By adding as an additional field, a kanji additional field is generated.

〔作用〕[Effect]

ソート漢字層表がシステムの共有仮想記憶域内に共有ソ
フトウェアとして格納されているので、従来のようにソ
ート漢字層表をファイルからロードする必要がなくなり
、ソート処理効率が向上し、メモリ使用量も削減される
。
Since the sorted Kanji layer table is stored as shared software in the system's shared virtual storage, there is no longer a need to load the sorted Kanji layer table from a file, which improves sort processing efficiency and reduces memory usage. be done.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して詳細に説
明する。
Next, embodiments of the present invention will be described in detail with reference to the drawings.

第1図は本発明の一実施例の、漢字フィールドをソート
キーとするソート処理方式のブロック図である。
FIG. 1 is a block diagram of a sort processing method using a Kanji field as a sort key, according to an embodiment of the present invention.

本実施例は、ソート実行を要求する利用者プログラム1
と、利用者プログラム1がソートパラメータを定義する
ためのソートパラメータテーブル2と、ソートを実行す
るためのワークエリアとして使用されるソート作業領域
3と、複数のプロセスから共通にアクセスできる共有ソ
フトウェアを格納するための共有ソフトウェア仮想記憶
域4と、共有ソフトウェア仮想記憶域4内に共有ソフト
ウェアとして実装されており、ソート主処理51゜漢字
付加フィールド生成処理52の2つの部分からなるソー
ト処理手段5と、漢字コードの大小関係を定義するため
の表で、共有ソフトウェア仮想記憶域4内に共有ソフト
ウェアとして実装されているソート漢字層表6と、ソー
ト処理手段5が提供している漢字順序要素(例・′えば
総区画的、音読み順)とそれに対応するソート漢字層表
6との対応を示すためのソート漢字順表管理テーブル7
で構成されている。
In this embodiment, the user program 1 that requests sort execution is
, a sort parameter table 2 for the user program 1 to define sort parameters, a sort work area 3 used as a work area for executing sorting, and shared software that can be commonly accessed by multiple processes. a shared software virtual storage area 4 for processing the data; and a sort processing means 5 which is implemented as shared software within the shared software virtual storage area 4 and consists of two parts: a sort main processing 51 and a kanji additional field generation processing 52; It is a table for defining the size relationship of kanji codes, and it is a table for defining the size relationship of kanji codes.It is a table for defining the size relationship of kanji codes, and includes a sort kanji layer table 6 implemented as shared software in the shared software virtual storage area 4, and kanji order elements (e.g. sorted kanji order table management table 7 for showing the correspondence between the sorted kanji layer table 6 and the corresponding sorted kanji layer table 6
It is made up of.

利用者プログラム1は、ソートパラメータテーブル2に
、ソートキーとして定義する漢字フィールドのレコード
内位置と文字数、その漢字フィールドに対する漢字順序
要素、その他入出カフアイルのレコード特性(可変長/
固定長種別、レコード長等〉、ソート用のメモリサイズ
、ワークファイル等ソート実行に必要なパラメータを設
定し、共有ソフトウェア仮想記憶域4内のソート処理手
段5に制御を渡す。
The user program 1 stores, in the sort parameter table 2, the position and number of characters in the record of the kanji field defined as the sort key, the kanji sequence element for that kanji field, and other record characteristics (variable length/
Parameters necessary for sort execution, such as fixed length type, record length, etc., memory size for sorting, work file, etc., are set, and control is passed to the sort processing means 5 in the shared software virtual storage area 4.

第2図は、利用者プログラム1がソートパラメータテー
ブル2内に設定するパラメータの形式を示す図である。
FIG. 2 is a diagram showing the format of parameters set in the sort parameter table 2 by the user program 1.

パラメータは、ソートキーとして指定する漢字フィール
ドの個数21、各漢字フィールドのレコード内相対位w
221,231、文字数222゜232、漢字フィール
ドに対する漢字順序要素223.233、その他ソート
実行に必要なパラメータから構成されている。
The parameters are the number of kanji fields specified as sort keys (21), and the relative position of each kanji field within the record.
221, 231, the number of characters 222° 232, kanji order elements 223, 233 for the kanji field, and other parameters necessary for sorting.

第3図はソート漢字順表6の内容を示す図である。FIG. 3 is a diagram showing the contents of the sorted kanji order table 6.

ソート漢字順表6は、漢字コードで表現される漢字1文
字につき1エントリ持ち、各エントリは、漢字コード3
11,321.331と、その漢字コードが、対応する
漢字順序要素に従って何番目に順序付けられているかを
示す照合順序1312゜322.332との組から構成
されている。
The sorted kanji order table 6 has one entry for each kanji character expressed by a kanji code, and each entry has a kanji code of 3.
11,321.331 and collation order 1312°322.332, which indicates the order in which the Kanji code is ranked according to the corresponding Kanji order element.

第4図はソート漢字順表管理テーブル7の内容を示す図
である。
FIG. 4 is a diagram showing the contents of the sorted kanji order table management table 7.

ソート漢字順表管理テーブル7は、ソート処理手段5が
提供する各漢字順序要素につき1エントリ持ち、各エン
トリは、漢字順序要素411゜421.431と、それ
に対応するソートm字順表6の識別名412,422.
432の組から構成されている。
The sorted kanji order table management table 7 has one entry for each kanji order element provided by the sort processing means 5, and each entry contains the identification of the kanji order element 411, 421, 431 and the corresponding sort m-character order table 6. Name 412,422.
It consists of 432 sets.

ソート処理手段5は、利用者プログラム1からIIII
Ilを渡されると、ソート主処理51を起動する。
The sort processing means 5 uses user programs 1 to III.
When Il is passed, the sort main processing 51 is activated.

第5図はソート主処理51の処理ステップを示す流れ図
である。
FIG. 5 is a flowchart showing the processing steps of the main sorting process 51.

まず始めに、ソート用のメモリ/ワークファイルの確保
、ソート入出カフアイルのパラメータ(レコード長、可
変長/固定長種別)のチエツク等のソート実行に必要な
準備を行い(ステップ501 ) 、ソートの対象とな
るレコードを1件ソート作業領域3に入力しくステップ
502) 、入力レコードがもうなくなっていたか否か
判定しくステップ503)、入力レコードがまだあれば
、漢字付加フィールド生成処理52を呼び出すことによ
り、ステップ502で入力されたレコードに漢字付加フ
ィールドを生成する(ステップ504)。そのあと付加
された漢字付加フィールドを比較することによりレコー
ドの大小を決定して、ソートを行っていき、ソートの中
間結果として、ストリングと呼ぶ順序付けられたレコー
ド列をワークファイルに出力していきステップ502へ
戻る(ステップ505)、ステップ503において、入
力レコードがすでになくなっていたならば、ストリング
のマージ処理に移る。ワークファイル内のストリングの
本数と、1回のマージ処理でマージできるストリングの
本数とを比較しくステップ506)、ワークファイル内
のストリングの本数が、1回のマージ処理でマージでき
るストリングの本数以下ならば、最終マージ処理(ステ
ップ508)へ移り、そうでなければ、ワークファイル
内のストリングをマージして再びワークファイルに出力
して(ステップ507〉ステップ506へ戻る。
First of all, preparations necessary for sort execution are made, such as securing memory/work files for sorting and checking the parameters (record length, variable length/fixed length type) of sort input/output files (step 501), and then sorting targets. Input one record into the sorting work area 3 (step 502), determine whether there are no more input records (step 503), and if there are still input records, call the kanji additional field generation process 52. A kanji additional field is generated in the record input in step 502 (step 504). After that, the size of the record is determined by comparing the added kanji additional field, and the record is sorted. As an intermediate result of sorting, an ordered record string called a string is output to a work file. Returning to step 502 (step 505), if the input record has already disappeared in step 503, the process moves to string merging processing. Compare the number of strings in the work file with the number of strings that can be merged in one merge process (Step 506); if the number of strings in the work file is less than or equal to the number of strings that can be merged in one merge process; If not, the process moves to the final merging process (step 508); otherwise, the strings in the work file are merged and output to the work file again (step 507), and the process returns to step 506.

ステップ508は最終マージ処理で、ワークファイル内
のストリングをマージしていき最終的な1本のストリン
グにまとめながら、出力ファイルへ出力していく。その
際ステップ504で付加された漢字付加フィールドは削
除する。ステップ508で全てのレコードを出力し終わ
ると処理を終了する。
Step 508 is a final merging process in which strings in the work file are merged into one final string and output to an output file. At this time, the kanji additional field added in step 504 is deleted. When all records have been output in step 508, the process ends.

第6図は漢字付加フィールド生成処3B!52の処理ス
テップを示す流れ図である。ソート主処理51から制御
を渡されると、まずソートパラメータテーブル2からソ
ートキーとして指定された漢字フィールドの儂数Nを得
る(ステップ601)。次に、iII11ml変数Iに
1を変数しくステップ602)、ソートパラメータ2か
ら、1番目の漢字フィールドの位WL9文字数S、漢字
順序要素Tを得る(ステップ603)。ソート漢字順表
管理テーブル7から、漢字順序要素Tに対応する、共有
ソフトウェア仮想記憶域4内の、ソート漢字順表の識別
名xt!−得る(ステップ604〉。次に、制御変数−
にOを設定しくステップ605)、レコードの先頭から
L十J文字目の漢字の漢字コードC@−得る(ステップ
606)。次に、識別名Xのソート漢字順表を参照して
、漢字コードCの照合順序値Nを得て(ステップ607
)、照合順序値Nをレコードの漢字付加フィールドとし
て付加する(ステップ60B)。−の値に1を加え(ス
テップ609)、JとSとを比較しくステップ610)
、JがSよりも小ならばステップ606へ戻り次の文字
の処1!!に移行し、JがS以上ならばIの値に1を加
え(ステップ6.11)、IとNとを比較しくステップ
612)、IがN以下ならばステップ603へ戻り次の
漢字フィールドの処理を続け、■がNより大ならば、処
理を終了、ソート主処理51に制御を戻す。
Figure 6 shows the Kanji additional field generation section 3B! 5 is a flowchart showing 52 processing steps. When control is passed from the sort main processing 51, first, the number N of the Kanji field designated as the sort key is obtained from the sort parameter table 2 (step 601). Next, set 1 to the iII11ml variable I (step 602), and obtain the number of characters WL9 in the first kanji field and the kanji order element T from the sort parameter 2 (step 603). From the sorted kanji order table management table 7, the identification name xt of the sorted kanji order table in the shared software virtual storage area 4 that corresponds to the kanji order element T! - Obtain (step 604>. Next, the control variable -
is set to O (step 605), and the kanji code C@- of the L1Jth kanji from the beginning of the record is obtained (step 606). Next, refer to the sorted kanji order table for the identifier X to obtain the collation order value N for the kanji code C (step 607
), the collation sequence value N is added as a kanji additional field to the record (step 60B). Add 1 to the value of - (step 609) and compare J and S (step 610)
, if J is smaller than S, the process returns to step 606 and the next character is 1! ! If J is greater than or equal to S, add 1 to the value of I (step 6.11), compare I and N (step 612), and if I is less than or equal to N, return to step 603 and enter the next kanji field. The process continues, and if ■ is greater than N, the process is terminated and control is returned to the sort main process 51.

〔発明の効果〕 以上説明したように本発明は、漢字フィールドをソート
キーとするソート処理において使用するソート漢字層表
をシステムの共有仮想記憶域内に共有ソフトウェアとし
て格納して、複数プロセスで共通にアクセスできるよう
にしておき、漢字フィールドをソートキーとするソート
処理においてソート漢字層表を格納したファイル(ソー
ト漢字層表ファイル)とソート漢字層表ファイルからソ
ート漢字層表をロードするためのメモリ領域をブ【】ダ
ラム毎に割り当てなくてもよいようにすることにより、
ソート処理中に、ソート漢字層表をファイル(ソート漢
字層表ファイル)からロードする処理を省略することに
よる実行性能の向上およびシステム全体でのメモリ使用
量の削減という効果がある。
[Effects of the Invention] As explained above, the present invention stores a sorted kanji layer table used in sort processing using a kanji field as a sort key as shared software in a shared virtual storage area of the system, and allows multiple processes to access it in common. In the sort process using the kanji field as the sort key, the file storing the sorted kanji layer table (sorted kanji layer table file) and the memory area for loading the sorted kanji layer table from the sorted kanji layer table file are blocked. []By eliminating the need to allocate for each Durham,
By omitting the process of loading the sorted kanji layer table from a file (sorted kanji layer table file) during the sorting process, execution performance is improved and the memory usage of the entire system is reduced.

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

第1図は本発明の一実施例のソート処理方式のブロック
図、第2図はソートパラメータテーブル2の内容を示す
図、第3図はソート漢字層表6の内容を示す図、第4図
はソート漢字層表管理テーブル7の内容を示す図、第5
図はソート主処理51の処理を示す流れ図、第6図は漢
字付加フィールド生成処理52の処理を示す流れ図であ
る。 1・・・利用者プログラム、 2・・・ソートパラメータテーブル、 3・・・ソート作業領域、 4・・・共有ソフトウェア仮想記憶域、5・・・処理手
段、 51・・・ソート主処理、 52・・・漢字付加フィールド生成処理、6・・・ソー
ト漢字層表、 7・・・ソート漢字層表管理テーブル、21・・・ソー
トキーとして指定する漢字フィールドの個数、 221.231・・・フィールドの位置、222.23
2・・・文字数、 223.233・・・漢字順序要素、 311.321.331・・・漢字コード、312.3
22,332・・・漢字コードの照合順序値、 411.421.431・・・漢字順序要素、412.
422,432・・・漢字順序要素に対応するソート漢
字層表6の識別名、 501.502,503,504,505゜506.5
07.508・・・ソート主処理51の処理ステップ、 601.602,603,604,605゜606.6
07,608,609,610゜611.612・・・
漢字付加フィールド生成処理52の処理ステップ。 第 1図
FIG. 1 is a block diagram of a sorting method according to an embodiment of the present invention, FIG. 2 is a diagram showing the contents of the sorting parameter table 2, FIG. 3 is a diagram showing the contents of the sorting kanji layer table 6, and FIG. 4 is a diagram showing the contents of the sorting parameter table 2. Figure 5 shows the contents of the sorted kanji layer table management table 7.
This figure is a flowchart showing the processing of the main sorting process 51, and FIG. 6 is a flowchart showing the processing of the kanji additional field generation process 52. DESCRIPTION OF SYMBOLS 1... User program, 2... Sort parameter table, 3... Sort work area, 4... Shared software virtual storage area, 5... Processing means, 51... Sort main processing, 52 ... Kanji additional field generation process, 6... Sort Kanji layer table, 7... Sort Kanji layer table management table, 21... Number of Kanji fields specified as sort keys, 221.231... Number of fields Position, 222.23
2...Number of characters, 223.233...Kanji order element, 311.321.331...Kanji code, 312.3
22,332... Kanji code collation order value, 411.421.431... Kanji order element, 412.
422,432...Identification name of sorted Kanji layer table 6 corresponding to Kanji order element, 501.502,503,504,505゜506.5
07.508...Processing step of sort main processing 51, 601.602, 603, 604, 605°606.6
07,608,609,610゜611.612...
Processing steps of kanji additional field generation processing 52. Figure 1

Claims (1)

【特許請求の範囲】 1、漢字コードにより表現される漢字からなる漢字フィ
ールドをソートキーとするソート処理方式であって、 ソート実行を要求する利用者プログラムと、前記利用者
プログラムがソートパラメータを定義するためのソート
パラメータテーブルと、ソートを実行するためのワーク
エリアとして使用されるソート作業領域と、 共有ソフトウェア仮想記憶域内に共有ソフトウェアとし
て格納されており、ソート主処理、漢字付加フィールド
生成処理の2つの部分から構成され、漢字フィールドに
対する漢字順序要素を提供しているソート処理手段と、 漢字コードの大小関係を定義するための表で、前記共有
ソフトウェア仮想記憶域内に共有ソフトウェアとして格
納されており、漢字コードと、その漢字コードの漢字の
、対応する漢字順序要素に従った順序値を示す照合順序
値との組から構成されて一意な識別名を持つソート漢字
順表と、前記ソート処理手段が提供している漢字順序要
素とそれに対応する前記ソート漢字順表の識別名の組か
ら構成されるソート漢字順表管理テーブルとを備え、 前記利用者プログラムは、ソートキーとして定義される
漢字フィールドのレコード内位置と文字数、そのキーに
対する漢字順序要素、その他のソート実行に必要なパラ
メータを前記ソートパラメータテーブルに設定し、前記
共有ソフトウェア仮想記憶域内の前記ソート処理手段に
制御を渡し、前記ソート処理手段は、前記利用者プログ
ラムから制御を渡されると、前記ソート主処理を起動し
、前記ソート主処理は、前記ソート作業領域内にソート
するレコードを1件ずつ読み込み、レコードを1件読み
込むごとに、前記漢字付加フィールド生成処理を呼び出
し、前記ソート主処理へ制御が戻されると、前記漢字付
加フィールド生成処理によりレコードに付加された漢字
付加フィールドを比較することによりレコードの順序を
決定し、ソート処理を行っていき、 前記漢字付加フィールド生成処理は、前記ソートパラメ
ータテーブルに指定されているその漢字フィールドに対
する漢字順序要素を調べ、その漢字順序要素に対応する
前記ソート漢字順表の識別名を前記ソート漢字順表管理
テーブルから得て、その識別名を持つ、前記共有ソフト
ウェア仮想記憶域内に共有ソフトウェアとして実装され
ている前記ソート漢字順表を参照しながら、前記ソート
パラメータテーブルに指定されているその漢字フィール
ドの位置から始まり、前記ソートパラメータテーブルに
指定されているその漢字フィールドの文字数だけの範囲
の各漢字の漢字コードの照合順序値を、前記ソート作業
領域内に入力されたレコードの漢字付加フィールドとし
て付加していく、漢字フィールドをソートキーとするソ
ート処理方式。
[Claims] 1. A sort processing method using a Kanji field consisting of Kanji characters expressed by Kanji codes as a sort key, comprising a user program requesting sort execution, and the user program defining sort parameters. A sort parameter table for sorting, a sort work area used as a work area to execute sorting, and a shared software stored as shared software in the virtual storage area. A table for defining the magnitude relationship between Kanji codes, a sort processing means that provides Kanji order elements for Kanji fields, and a table that is stored as shared software in the shared software virtual storage area. A sorted kanji order table having a unique identifier, which is composed of a set of a code and a collation order value indicating the order value of the kanji of the kanji code according to the corresponding kanji order element, and the sorting processing means provides a sorted kanji order table management table consisting of a pair of kanji order elements and corresponding identifiers of the sorted kanji order table; The position and number of characters, the kanji order element for that key, and other parameters necessary for sorting are set in the sort parameter table, and control is passed to the sort processing means in the shared software virtual storage area, and the sort processing means: When control is passed from the user program, the sort main process is started, and the sort main process reads records to be sorted one by one into the sort work area, and each time a record is read, the kanji character is When the additional field generation process is called and control is returned to the sort main process, the order of the records is determined by comparing the kanji additional fields added to the records by the kanji additional field generation process, and the sort process is performed. In the kanji additional field generation process, the kanji order element for the kanji field specified in the sort parameter table is checked, and the identification name of the sorted kanji order table corresponding to the kanji order element is added to the sorted kanji order table. the position of the Kanji field specified in the sorting parameter table, with reference to the sorting Kanji order table implemented as shared software in the shared software virtual storage area, obtained from a management table and having its identification name; Starting from , the collation sequence value of the kanji code for each kanji in a range equal to the number of characters in that kanji field specified in the sort parameter table is added as a kanji additional field to the record input in the sort work area. A sorting method that uses the kanji field as the sort key.
JP7013390A 1990-03-19 1990-03-19 Sort processing system using kanji field as sort key Pending JPH03269619A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7013390A JPH03269619A (en) 1990-03-19 1990-03-19 Sort processing system using kanji field as sort key

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7013390A JPH03269619A (en) 1990-03-19 1990-03-19 Sort processing system using kanji field as sort key

Publications (1)

Publication Number Publication Date
JPH03269619A true JPH03269619A (en) 1991-12-02

Family

ID=13422764

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7013390A Pending JPH03269619A (en) 1990-03-19 1990-03-19 Sort processing system using kanji field as sort key

Country Status (1)

Country Link
JP (1) JPH03269619A (en)

Similar Documents

Publication Publication Date Title
US5307485A (en) Method and apparatus for merging sorted lists in a multiprocessor shared memory system
US5291601A (en) Shared libraries implemented with linking program loader
JPH113269A (en) System and method for assisting accurate garbage collection by separating stack contents into substacks
US5671405A (en) Apparatus and method for adaptive logical partitioning of workfile disks for multiple concurrent mergesorts
US7058656B2 (en) System and method of using extensions in a data structure without interfering with applications unaware of the extensions
US5519860A (en) Central processor index sort followed by direct record sort and write by an intelligent control unit
JP2586610B2 (en) File creation method
JP3780610B2 (en) Billing information output device
US20050108201A1 (en) Method to query an embedded database
US5642510A (en) Catalog management system using a catalog pool, pool management table and pool number data table
JPH07129408A (en) Language processing program execution method
JP2658097B2 (en) Secondary file creation method
JP3099429B2 (en) File data storage method in IPL processing
KR19990086969A (en) Memory allocation method
US6356895B1 (en) Method and computer program product for processing system files using a trigger program
JP2507399B2 (en) Database equipment
JP3090048B2 (en) Standard program function expansion method and method
JP2581145B2 (en) Security processing method
JPH09305449A (en) Database management system
JPH02116936A (en) Reorganizing system
JP3087274B2 (en) File exclusion control system
JPH0581033A (en) Common data management device between programs
JPH05224947A (en) Language processing program executing device
JPH0465714A (en) Load module control system for computer system
JPH1011291A (en) Object data structure and computer system using object data structure