Apparatus for sorting and merging data records

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C707S793000, C707S793000, C707S793000

Reexamination Certificate

active

06601067

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention generally relates to sort/merge processors. More particularly, the present invention relates to an apparatus which executes sorting and merging data records, satisfying both given record extraction criteria and specified record reformatting rules at the same time, as well as being applicable to a wide range of file handling programs including sort or merge operations.
2. Description of the Related Art
Today's computerized business activities, such as the operations of financial online systems, involve daily data collection and processing tasks. The collected data records are subjected to various processes, including filtering, sorting, and reformatting, under predetermined processing rules. Usually, those routine tasks are accomplished through the use of so-called sort/merge programs. Conventionally, this kind of sort/merge programs provide such functions as extraction and reformatting of records, besides supporting various file systems. The program processes each input file with some specific conditions suitable for that file.
FIG. 12
is a flowchart showing a process flow of conventional sort/merge programs. This process first chooses an appropriate file system that is suitable for input files to be processed (step S
1
). Then source data is read out of the input files through the selected file system (step S
2
). Relevant records are extracted according to some given record extraction criteria (step S
3
), and reformatted as specified in a predetermined record reformatting rule (step S
4
). This step S
4
may be skipped when no record reformatting rules are specified. The extracted and reformatted records are subjected to sort and merge processing (step S
5
). The above steps S
2
to S
5
are repeated until all input files are processed and the End of Data (EOD) is indicated. Lastly, the resultant records are written into an output file (step S
6
).
A more specific example process will now be explained below, assuming that two input files are to be sorted and merged on different file systems and record extraction criteria. FIGS.
13
(A) to
13
(C) show three processing stages of a conventional sort/merge process. Suppose here that the two input files
1
and
2
have the following requirements. The first input file
1
needs a file system that handles a standard file format, and sort/merge operations should be performed under a first record extraction criterion. The second input file
2
, on the other hand, requires another file system that can handle the Common Business Oriented Language (COBOL) index file format. Sort/merge operations should be performed under a second record extraction criterion. With those conditions and rules, the processor sorts and merges the two files in the following way.
Referring to FIG.
13
(A), the first stage is shown. As explained in the flowchart of
FIG. 12
, the processor reads the first input file
1
through the standard file system, extracts relevant records that meet the first record extraction criterion, sorts the extracted records, and saves them into a first intermediate file
3
. Referring next to FIG.
13
(B), the second stage proceeds similarly to the first stage. That is, the processor reads the second input file
2
through the COBOL index file system, extracts relevant records that meet the second record extraction criterion, sorts the extracted records, and saves them into a second intermediate file
4
. The above first and second intermediate files
3
and
4
are created in the standard file format. Referring to FIG.
13
(C), the third stage is shown. The processor reads out records from the first and second intermediate files
3
and
4
, sorts and merges all the records, and write them into an output file
5
.
As seen from the above, the conventional sort/merge processor has to process data files individually at separate job stages and then merge the results, because they require different file systems and different record extraction criteria. Such job stages are executed by giving appropriate commands to the sort/merge processor. For example, the command script used in the three stages shown in FIGS.
13
(A) to
13
(C) is as follows.
-------------------------------------------------------
;Stage 1
bsort -s infile1 -o intermediatefile1
-p 10.4asc.eq.‘test’ -z 100
;Stage 2
bsort -s infile2 -o intermediatefile2
-p 20.4asc.eq.‘test’ -z 100 -F dosfs, cobidx
;Stage 3
bsort -m intermediatefile1 intermediatefile2
-o outfile -z 100
-------------------------------------------------------
Here, “bsort” is a command to execute sort/merge processing, which is followed by some command options each beginning with a minus sign (“−”). The options include: “−s” (sort switch), “−m” (merge switch), “−o” (output file name), “−p” (record extraction switch), “−z” (record length), and “−F” (output file system and input file system).
More specifically, the above commands specify the following things. The first stage command requests the processor to read the first input file
1
(“infile
1
”) using the default file system, extract records, and sort them into a first intermediate file
3
(“intermediatefile
1
”). When extracting relevant records, the processor is to search for such records that contain a 4-byte ASCII character string “test” starting at the eleventh byte (i.e., byte #
10
). At the second stage, a different record extraction criterion is specified. In addition, the processor is requested to use the standard disk operating system (DOS) file system (“dosfs”) when writing an output file, and the COBOL index file system (“cobidx”) when reading input files. The third stage command requests the processor to read the two intermediate files
3
and
4
(“intermediatefile
1
,” “intermediatefile
2
”), merge them together, and write the result in to an output file
5
(“outfile”).
As seen from the above example command script, the conventional sort/merge processor requires the user to add a new job step each time he/she encounters a different kind of input files in terms of source file systems, record extraction criteria, and record reformatting rules. This means that the processor must execute sorting and merging as many times as the number of different conditions, causing a problem of low processing efficiency.
SUMMARY OF THE INVENTION
Taking the above into consideration, an object of the present invention is to provide a sort/merge processing apparatus which accepts at a time a variety of processing options for multiple input files, including different record extraction criteria, different record reformatting rules, and different file system designations.
To accomplish the above object, according to the present invention, there is provided an apparatus for sorting and merging records contained in a plurality of input files in accordance with predefined conditions. This apparatus comprises the following elements: a group profile identification unit which accepts a command containing group profile specifications, and identifies record extraction criteria for individual groups of input files by parsing the group profile specifications contained in the command; an extraction criteria setting unit which sets up one of the identified record extraction criteria that is required to process input files belonging to a specific group; a file reading unit which reads out records from the input files; a record extraction processor which extracts, out of the records read out from the input files, such records that are relevant to the record extraction criterion set up by the extraction criteria setting unit; a sort/merge execution unit which executes a sort/merge operation to the extracted records; and a file writing unit which writes the sorted and/or merged records to an output file.
The above and other objects, features and advantages of the present invention will become apparent from the following description when taken in conjunction with the accompanying drawings which illustrate preferred embodiments of the present inven

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Apparatus for sorting and merging data records does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Apparatus for sorting and merging data records, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Apparatus for sorting and merging data records will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3018559

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.