Enform Plus Reference Manual
Clauses
Enform Plus Reference Manual—422684-001
5-6
ASCD and DESC Clauses
ASCD and DESC Clauses
The ASCD and DESC clauses sort target-records, in ascending or descending order
respectively, according to the value of the specified field. The syntax of the ASCD and
DESC clauses is:
target-item
is the name of a field from an input record that serves as a sort key for the target
records.
The ASCD and DESC clauses do not group field values. If you want field values both
grouped and sorted, use the BY or BY DESC clauses; see BY and BY DESC Clauses
on
page 5-32.
When more than one ASCD, BY, BY DESC, or DESC clause is specified in a LIST or
FIND statement, Enform Plus uses a major-to-minor sorting precedence. Enform Plus
determines the sorting precedence by the order in which the ASCD or DESC clauses
appear in the LIST or FIND statement. The first sort clause has the highest priority, the
next one second priority, down to the last specified clause.
The following ASCD clause specifies that the target records are to be sorted on the value
of partnum:
ASCD partnum,
{ ASCD } target-item
{ DESC }