You are here: Field Modifiers > Descending

Descending

Descending is a field modifier that specifies the sort order for key fields, including computed fields and ad hoc expressions. Descending can be used only in the Gaps, Duplicates, Index, Sequence and Sort commands.

The default sort order is ascending. For more information, see Ascending.

Command Mode Syntax

Descending is abbreviated to “D”.

Selected_fields D

In the following example, the Sort command is executed on the Location, Product Class and Quantity on Hand fields. The output is sent to an output file, File2. The sort order of the output file is ascending for Location and Product Class and descending for Quantity on Hand.

SORT ON Loc ProdCls QtyOH D TO "File2"

Command Dialog Box

Click [Index On], [Sequence On] or [Sort On] and select fields. The [Sort Order] button is displayed with the field name in the Selected Fields list box. The sort order is set by default to ascending. Click the button to change the sort order.