NOTES - miscellaneous details about BSORT.

Fields used for sorting may overlap one another if desired.

When extracting key information from a record, BSORT pays attention to parameters in the following order:

Before=
to determine the absolute possible end of the key;
FRom=
to determine the absolute possible beginning of the key;
Field=
to determine the field of the key -- this also involves jumping over an appropriate number of "stop" and "skip" characters;
Ignore=
to ignore unwanted characters at the beginning of the actual key;
Offset=
to determine an offset from the first un-ignorable character;
Length=
to obtain a key of the required length, once the various unwanted items at the beginning of the key have been passed over.

Records with duplicate keys will appear in the output in the same order that they were specified in the input.

B escape sequences (e.g. '*t' for an ASCII tab character) may be used when specifying strings for SKip, STop, and IgnoreLeading.

The BSORT Algorithm

The first pass of BSORT consists of a Tournament Sort. The tournament uses 4/5 of the workfile buffer, and grows this up to the specified Memorysize. The second pass of BSORT is a four-way merge. The four shortest strings from the tournament are merged first, then the next four shortest, and so on.

The algorithm of BSORT is designed for the usual time-sharing situation: a shared file system and synchronous I/O. BSORT may also be used under batch.

File format

BSORT only processes system standard format files. If you have a UFF format file it must be converted to system standard format first.

See Also

expl bsort
full description of BSORT
expl bsort batch
using BSORT in batch
expl bsort collate
collating orders
expl bsort errors
error handling
expl bsort examples
examples of BSORT operations
expl bsort keyopt
key options
expl bsort options
general command line options
expl bsort position
key position descriptors

Copyright © 1996, Thinkage Ltd.