Browse Prior Art Database

# Sorting Non-Columnar Data

IP.com Disclosure Number: IPCOM000119313D
Original Publication Date: 1991-Jan-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 3 page(s) / 118K

IBM

## Related People

Heath, AW: AUTHOR

## Abstract

This invention relates to methods of sorting and describes a method which make sorting of typical office data easier. Typically, much office data is not neatly organized into columns and, as such, traditional sorting algorithms fail.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 44% of the total text.

Sorting Non-Columnar Data

This invention relates to methods of sorting and
describes a method which make sorting of typical office data easier.
Typically, much office data is not neatly organized into columns and,
as such, traditional sorting algorithms fail.

Traditional sorting methods assume the information to be sorted
is in some type of tabular arrangement (dating back to the old punch
cards where a card sorter ordered the punch card columns).  The
operation could specify which columns to sort on in either ascending
or descending order. This is pretty similar to the sort functions
available under XEDIT on VM for IBM mainframes, or the PC DOS
SORT.EXE filter for personal computers.  As a typical example of the
problem to be solved, let us assume a typical list:
Name                          Location
Paul Smith                    Watertown, NY
Rev. Andrew Walters           New York, NY
Janice Doe                    Austin, TX
Peter Pan                     Anaheim, CA
Mr. and Mrs. Walter Disney    Orlando, FL

When list list was originally entered, it was partially
columnarized into 2 basic columns, a name column and a location
column.  Let us assume the requirements have now changed such that it
is desirable to sort this list by alphabetical order of state
locations and within that order, sort by last names.  Clearly, a
columnar sort cannot handle such a requirement without forcing the
operator to convert the input into a columnar data.

A new sort algorithm is described to solve problems such as
those just illustrated.  This algorithm accepts rules defining how to
find the sort key.  In the example given above, a rule is defined to
the sort program such that it can find the state by looking for a
comma.  To sort by last name, the space just before the last name
could have entered as a required space and the rule would be to find
the required space. (Typically, word processors and desktop
publishing software packages allow special codes to be entered to
control the formatting of data.  A required space typically means a
space that is not treated as a word delimiter).  Thus, the sort
algorithm must be able to use both visible characters and control
codes to find the sort key.

There are many different rules that interact to help the
operator define how to find the sort key.  For example, the string
that delimits the sort key may occur more than once, thus the
algorithm needs to know how many times to find the string.  In the
simple example given above, the 1st occurrence was used.  Another
twist can come into play when counting the instances of the delimiter
string.  For example, space may be used as a common delimiter, but
the data may have a varying number o...