# SORT-LIST

Updated: 10/19/2020, 10:24:56 AM
Created: 10/19/2020, 10:24:56 AM
Last Updated By: Daniel Klein
Read Time: 1 minute(s)

Tags: lists

# Description

Sorts a saved select list. It takes the general form:

SORT-LIST {list-name{account-name}} {(options}
1

where:

  • list-name specifies the name under which the list is to be stored.
  • account-name is the name of the account from which the list was saved. If you do not specify account-name, the system will use the current account name.
  • options can be
    • U - remove duplicate entries.

The SORT-LIST command will sort a list previously saved with the SAVE-LIST command. SORT-LIST is useful for sorting lists which have modified by EDIT-LIST, or for avoiding an extra SSELECT when working with a large file.

# Example

jsh ~ -->SELECT CUSTOMERS LAST.NAME
4380 records selected
>SAVE-LIST CUSTOMERNAMES
jsh ~ -->SORT-LIST CUSTOMERNAMES (U
List 'CUSTOMERNAMES' sorted with 3872 records
1
2
3
4
5

Generates a sorted list of unique customer names.

Back to List Processing