QSELECT creates a select-list from the data in the specified file rather than from the item-IDs.
Format
QSELECT [DICT] filename {item-list | *} [(attr)] |
Specify either an explicit item-list or all items in the file (with an asterisk). When specifying an item, the select-list will comprise all data in that item. Each line of data—that is, each attribute—of the item specified becomes a separate item-ID in the select-list. If specifying several items in the QSELECT statement, the select-list will comprise all of the data from all of the items specified, listed in the order of item-list.
The user may also specify that only data contained in a certain attribute be used in creating the select-list. attr is the number of the desired attribute (but cannot specify an attribute by its name).
The next example shows how a select-list may be used to reference a second file. Assume that Attribute 1 in the ORDERS file contains customer IDs. QSELECT creates a select-list of item-IDs from the data contained in Attribute 1. Then SORT-LABEL creates a mailing list from the CUSTOMERS file of these active customers to inform them of several new books that are available:
>QSELECT ORDERS * (1) 226 ITEMS SELECTED. >SORT-LABEL CUSTOMERS BY LAST-NAME FULL-NAME STREET CITY-ST ZIP ID-SUPP ?3,5,1,13,15,5,C ?NAME ?ST ?CITY ?ZIP . . . |
If SELECT had been used instead of QSELECT in the preceding example, the select-list would contain item-IDs from the ORDERS file, which could not be used to access the CUSTOMERS file.
See Also
Creating a Select-list (SELECT)
Selecting Items that Contain a String (FIND)