IBM 1130 User Manual page 586

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

Section
Subsections
Page
75
10
I
00
01
SOME PRELIMINARY INFORMATION
It
may be useful to review the meaning of some
basic terms and concepts that are part of sorting
terminology. As already stated, sorting concerns
the arrangement of a file which is a collection of
related data records stored in a data storage
medium (cards or disk). The file size specifies
the total nurrber of records contained in the file.
The input file is the collection of data records
introduced as input to the sorting process, while
the output file represents the collection of records
properly sorted and stored.
To place a file into a specified sequence, each
of its records must somehow be uniquely identi-
fiable. The identification is made by means of the
control key, a group of characters arranged in a
certain way. The contiguous groups of characters
that are placed in order within the control key. are·
called control fields.
Each of the control fields
bears certain identifying information, such as pay-
roll number, name, organization code, address to
which checks are sent, etc. The data record con-
trol field that is most irEportant in sequencing the
records is called the major control field. When
two records contain identical data in their major
control field, they must be compared by the next
most significant, or
IT,
inor, control field in order
to be sorted into the proper sequence.
If
even the
minor control fields are equal, the next most
significant or minor control field must be consid-
ered, and so on. Thus, for the purpose of suc-
cessive comparison, all the control fields within
the control key are arranged in major-minor (that
is, decreasing) order of significance (see Figure
75.2) .
Since the control fields of a record may consist
of numbers, letters, or special characters ($, -,
+,
etc.), an order must be prescribed for the
characters of the control field to determine which
is greater and which is less. Such an order of
characters, upon which the sequencing of records
is based, is known as the collating sequence. In
the 1130, the collating sequence is A-Z, 0-9,
blank, and special characters, in ascending order
(see 70.40.20). The collating sequence determines
the proper order of the control keys.
Using these definitions, sorting may now be
defined more accurately as the process whereby
a file of records is placed in order by the collating
sequence of the control keys of the records.
A considerable body of specific sorting terms
has been generated over the years. To simplify
Disk or
card record:
Assembled into
control key
or tag
Salesman
JONES
SMITH
HILLIAMS
Figure 75. 2.
Control Field or Word
Major Control
Field
A
B
9
C
X
A
9
Amount
6.10
14.67
17.76
14.01
376.35
1.98
706.13
37.38
309.76
101.37
67.42
8.77
336.75
601.32
706.14
975.93
Second Minor
Customer
Name
Date
xxxx
xxxx
xxxx
xxxx
xxxx
xxxx
xxxx
xxxx
the ensuing discussion, some of the more commonly
used terms are explained here.
The object of a sort is (to restate it) to place a
file of records in a desired sequence. Any group
of data records in which the control keys are in the
desired collating sequence is called a "sequence"
-- or, sometimes, a "string". The length of each
sequence can be one or more data records. It has
been assumed till now that a sort must be in
ascending sequence; that is, the final sequence of
records is such that the control key of each suc-
cessive record collates (compares) equal to or
higher than that of the preceding record. This need

Advertisement

Table of Contents
loading

Table of Contents