15 Sorting a catalogue

To sort a catalogue into ascending or descending order on some (numeric) column type:


Note that catsort generates a new sorted catalogue; it does not overwrite the existing catalogue. The amount of textual information written to the output catalogue is controlled using the command line mechanism described in Section 10.1. You then answer the series of prompts described below. In these descriptions the prompts are identified by the corresponding ADAM parameter name, which appears at the start of the prompt line.

Enter the name of the input catalogue.
Enter the name of the output catalogue.
Enter the name of the column on which the output catalogue is to be sorted. Catalogues can be sorted on columns of any of the numeric data types. They should not be sorted on columns of data type CHARACTER or LOGICAL.
(default = ‘ASCENDING’) Specify the order required for the output catalogue. The alternatives available are ‘ASCENDING’ or ‘DESCENDING’. Abbreviations down to and including ‘A’ or ‘D’ are permitted.

If a catalogue is sorted on a column which contains null values then the rows for which the column is null will appear after all the rows with a valid value. The order of such rows is unpredictable.