English Reference > List Processing Commands > NEW-SORT-LIST

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

NEW-SORT-LIST Command (English) (m618305+newsortlist.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

NEW-SORT-LIST

Sorts a list previously saved by NEW-SAVE-LIST.

Syntax

NEW-SORT-LIST file-specifier {item-list} {(options}

Syntax Elements

file-specifier Specifies a file as defined in Conventions.

item-list A list of one or more item-ids or an asterisk (*) for all items. Can be omitted if the list is provided by an active list from a preceding list-generating command.

Options

n See option M.

C Counts the number of identical attribute values, appending to the value the count, if greater than one, preceded by a subvalue mark. Only active with option U.

D Sort the list in descending order. If omitted, the list is sorted in ascending order.

E Specifies that complete attributes are to be processed and included in the sorted list.

If not specified, only the first field (value or subvalue) is processed, all the other fields being discarded.

I Specifies that case should be ignored when comparing item-ids.

M Discards unique entries in list. If n not specified, keeps one copy of entries contained more than once. If n is specified, keeps one copy of entries contained n or more times. Gives the intersection of merged lists.

N Inverts the M option so as to keep values that occur only once in a list. Relevant only with the M option. If the list was created by merging two or more lists, this option gives the symmetric difference.

R Sorts the list into right-aligned (numeric) order. The default, if not specified, is ASCII order.

S Specifies that case is significant when comparing item-ids.

U Removes multiple cases of a value. If the list was created by merging two or more lists, this option gives the union of the lists.

Operation

Unless the E option is specified, the sorted list will contain only the first field from each attribute.

Case Sensitivity

If neither I nor S is specified, the current data case setting (set with the DATA.CC environment option or the CASE TCL command) is used. See Case Sensitivity for more details.

If both I and S are specified an error message is displayed and the list is not sorted.

Example

:SELECT MD WITH 2 = "35"
29 Items selected.
>NEW-SAVE-LIST INFOFILE ENGLISH-VERBS
[241] 'INFOFILE ENGLISH-VERBS'  Cataloged.
:NEW-SORT-LIST INFOFILE ENGLISH-VERBS

RealityV15.0Comment on this topic