FastSort Manual
Sorting Interactively
FastSort Manual—429834-003
2-6
Sorting on Key Fields
Sorting on Key Fields
FastSort returns four types of output records:
The following examples show the contents of the input files PLANTS1 and PLANTS2
with column numbers added above the records. Note where the key fields begin and
end. In both files, the file contents begin with the line labeled 01.
PLANTS1 sample input file:
1111111111222222222233333333334444444444555555555
1234567890123456789012345678901234567890123456789012345678
01 Aluminum PILEA CADIEREI indoor 22
02 Weeping Fig FICUS BENJAMINA tree 15
03 Busy Lizzy IMPATIENS flower 30
04 Crocus CROCUS flower 53
05 Artillery PILEA MICROPHYLLA indoor 10
06 Touch-me-not IMPATIENS flower 45
07 Grape Ivy CISSUS RHOMBIFOLIA indoor 07
08 Rubber FICUS ELASTICA tree 04
09 Fiddleleaf Fig FICUS LYRATA tree 01
10 Parlor Palm CHAMAEDOREA ELEGANS indoor 03
11 Piggy-back TOLMIEA MENZIESII indoor 13
12 Daffodil NARCISSUS flower 60
13 Boston Fern NEPHROLEPIS EXALTATA indoor 18
PLANTS2 sample input file:
1111111111222222222233333333334444444444555555555
1234567890123456789012345678901234567890123456789012345678
01 Chinquapin Oak QUERCUS MUEHLENBERGII tree 33
02 Aluminum PILEA CADIEREI indoor 22
03 Slippery Elm ULMUS RUBRA tree 10
04 Ohio Buckeye AESCULUS GLABRA tree 02
05 Mesquite PROSOPIC JULIFLORA shrub 48
06 Red Juniper JUNIPERUS VIRGINIANA tree 14
07 American Plum PRUNUS AMERICANA shrub 37
08 California Oak QUERCUS AGRIFOLIA tree 65
09 Red Mulberry MORUS RUBRA shrub 24
10 Apple MALUS PUMILA fruit 35
Sort Operation Output Records
Record Sort The entire file of input records reordered according to the
values of one or more key fields
Key Sort The values of the concatenated key fields in sorted order
Permutation Sort The input record sequence numbers in the order the records
would be in if they were sorted according to the specified key
fields
Key and Permutation Sort A sequence number followed by the concatenated key-field
values for each record