LIST.DIFF

LIST.DIFF

Top  Previous  Next

 

The LIST.DIFF command creates a new named select list from the entries that appear in one named list but not in another named list.

 

 

Format

 

LIST.DIFF list1 {list2 {tgt.list}} {COUNT.SUP}

 

where

 

list1, list2identify the select lists to be merged. These must correspond to the names of records in the $SAVEDLISTS file. If list2 is omitted, a prompt is displayed for the name.

 

tgt.listis the name of the new list to be created in $SAVEDLISTS. It is valid for tgt.list to be the same as one of the source lists. if tgt.list is omitted, a prompt is displayed for this name.

 

COUNT.SUPindicates that display of the record count in the merged list is to be suppressed.

 

 

The LIST.DIFF command allows construction of one select list from two others. The resultant list will contain all of the items that are in list1 but not in list2.

 

The result list will replace any existing list with the name tgt.list. The ordering of tgt.list is undefined.

 

@SYSTEM.RETURN.CODE is set to the number of items in the new list or a negative error code.

 

 

Example

 

LIST.DIFF FRANCE.CUSTOMERS MAJOR.CUSTOMERS MERGED.CUSTOMERS

41 records selected.

 

This example merges two previously saved select lists, one holding keys for customers in France, the other for major customers to form a new list containing non-major French customers.

 

 

See also:

LIST.INTER, LIST.UNION, MERGE.LIST