Define sort orders.
The SORT command will sort a specified column without printing it. This is an alternate to the SORT qualifier in the PRINT command.
General format
sort field_name -
[,ASCENDING (D) or DESCENDING] -
[,BY_YEAR, BY_MONTH or BY_DAY] -
[,special_word]
Examples
sort
Qualifiers
ascending
The ASCENDING option will cause this field to be sorted in an increasing fashion.
by_day
The BY_DAY option will round off the field value to the nearest day. This is useful if the data is to be grouped by day. This can only be used with fields of type QD.
by_month
The BY_MONTH option will round off the field value to the nearest month. This is useful if the data is to be grouped by month. This can only be used with fields of type QD.
by_year
The BY_YEAR option will round off the field value to the nearest year. This is useful if the data is to be grouped by year. This can only be used with fields of type QD.
descending
The DESCENDING option will cause the field to be sorted in a decreasing fashion.
field_name
The field name must be the first word in the command. The field names are different for each database used in generating a report. Please refer to the Field Table for the particular database. This name can be prompted for.
special_word
Special options are available when extracting data from certain databases. Please refer to the description of the particular database.