MERGE.LIST |
![]() ![]() ![]() |
The MERGE.LIST command creates a new active select list by merging two other lists according to one of three relational operators.
Format
MERGE.LIST list1 rel.op list2 {TO tgt.list} {COUNT.SUP}
where
The MERGE.LIST command allows construction of one select list from two others. Use of MERGE.LIST can be significantly faster than a full select of the file to create the new list.
If either source list has already been partially processed before the MERGE.LIST command is executed, only the remaining unprocessed items are used. The resultant list will replace any already active tgt.list. The source lists are cleared after the new list has been set up. 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
GET.LIST FRANCE.CUSTOMERS TO 1 27 records selected. GET.LIST GERMANY.CUSTOMERS TO 2 31 records selected. MERGE.LIST 1 UNION 2 TO 3 58 records selected.
This example restores two saved select lists, one holding keys for customers in France, the other for customers in Germany and merges these to form select list 3 as a list of customers in either of these countries.
See also: |