AND-ITEMS
Returns a list comprising all attribute values contained in each of two or more items, or a specified number of times altogether; that is, the intersection of the values.
Syntax
AND-ITEMS {file-specifier} {item-list} {(options}
Syntax Elements
file-specifier As defined in General Conventions.
item-list A list of item-ids or an asterisk (*) for all items. Can be omitted there is an active list from a preceding list-generating command.
Options
n The number of times the attribute value must occur for inclusion in the list (the default is the number of items).
I Specifies that case should be ignored when comparing attribute values.
S Specifies that case is significant when comparing attribute values.
Comments
Uniqueness of values in an item can be guaranteed by sorting the list with the NEW-SORT-LIST command and specifying the U option.
Only the first field (value or subvalue) is processed, all the other fields being discarded. The merged list therefore contains 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 no list is generated.
Examples
:AND-ITEMS BOOKS BOYS PIRATES
42 Items selected.
>SAVE-LIST BPLIST
[241] 'BPLIST' Cataloged.
All values that were in both items BOYS and PIRATES in file BOOKS are now in list BPLIST.
:AND-ITEMS POISONS FATAL CHEMICAL AVAILABLE
7 Items selected.
>SAVE-LIST MSW
[241] 'MSW' Cataloged.
The list in MSW contains all values that were in each item FATAL, CHEMICAL, and AVAILABLE in file POISONS.