Select Registers (PQN)
The following material applies to PQN Procs only.
Select registers are used for processing lists of item-ids and other multivalued fields. TCL commands that produce item lists include AND-ITEMS, AND-LISTS, BSELECT, ESEARCH, FORM-LIST, GET-LIST, ISELECT, NEW-GET-LIST, NSELECT, OR-ITEMS, OR-LISTS, QSELECT, SEARCH, SELECT, SELECT-INDEX, SSEARCH, SSELECT, XOR-ITEMS, XOR-LISTS and XSELECT. The TCL commands PQ-SELECT and PQ-RESELECT are executed to load and reset select registers respectively.
Note
The IF S command checks for the presence or absence of an active list.
Forty seven select registers (from 1 to 47) are available in Proc. Each select register can contain only one list at a time. Select registers are referenced with an exclamation mark (!) followed by the register number.
Each time a select register is referenced, the next value is "popped" off the top of the stack for processing. If multivalued, each reference to the select register obtains the next multivalue. If you want to use a value more than once, you should move it to another buffer for temporary storage.
If any value is moved into the select register (for example, via the MV command), the entire contents of the select register is destroyed. Therefore, a single value in a select register cannot be replaced with another value.
For example, if the Select Register contains
BLUE]BROWN]GREEN]YELLOW
the first reference to the select register obtains the result BLUE, the second reference obtains the result BROWN, and the third reference obtains the result GREEN.