Sort

On the File | File Editor tab, in the View group: Click Sort to sort records using one or more fields as the keys, and store the result in the same or a different file. You can sort records in ascending or descending order, based upon the values in the fields you specify.

This option is also available on the Lookup Table Editor tab for Lookup Tables.

Sort Fields

In the Simple Sort form, specify the fields in the file on which the sort will be based. All the records in the file will be sorted using the specified fields.

Double-click (or click on the Select icon) to select the Fields to be used as sort keys. You can also use an expression to select the relevant field for the sort.

More than one field can be used in a sort. In this case, the contents of the file are sorted on the first field, then on the subsequent fields in the order they are defined.

Sort Direction

For each field you have selected, choose either an ASCENDING or a DESCENDING sort order from the drop down.

OK

Finally, click OK to sort the file using the fields (and the sort orders) specified. The File Editor window will be refreshed and the sorted file will be displayed.

Note that:

  • Sorting the contents of a file, helps to speed up the processing of that file in other functions.
  • Alphanumeric strings are sorted from left to right.
  • Numeric values are placed before alphabetic strings.
  • Numbers are treated as a numeric value rather than a character string. In an ascending sort, 98AB will be placed before 213B.
  • Upper case characters are placed before lower case.
  • Blank spaces will be sorted to the beginning of the file if sorting by Ascending order. They will be placed at the end of the file if sorting by Descending order.