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 ()
AND-ITEMS Command (English) (m618305+anditems.htm)
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.
AND-ITEMS {file-specifier} {item-list} {(options}
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.
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.
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.
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.
: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.