access.select Verb: Access/Access: Verbs

access.select

Command access.select Verb: Access/Access: Verbs
Applicable release versions: AP, R83
Category Access: Verbs (152)
Description retrieves all items from the specified file.reference that meet the optional selection criteria.

The items are selected in the order of their appearance in the file.reference. The selected item may be saved for future use or acted upon immediately.

When an "output" list appears in a select-class statement, the list is built from the contents of the specified attribute(s).

If an itemlist is specified, items are selected in the order of the item-ids in the itemlist.

If no itemlist is specified, all items in the file are considered. In this case they appear in order by the group into which they hash, and within groups, in the order they were added to the file.

If output specifications are included, the values of the specified attributes are used to form the list. If omitted, the list is formed from the item-ids.

The list is a temporary list that is used by the next verb as its implicit itemlist. The list can be permanently saved by using the "save-list" or "sl" verb. The list can also be passed to an OP command or to a Pick/BASIC program if the next TCL command executes that program.

The elements of the list may be used as item-ids to reference data in any file, not just the file referenced in the select command. For example, if a select on one file is followed by a list on a different file, the list of item-ids generated by the select are used as an itemlist in the list command.

The "outlist" parameter specifies the attribute-defining item{s} from which values are to be extracted for creation of the list. (See example 2.) This is somewhat similar to using "qselect", with the additional provision for being able to specifiy collation order and selection criteria.
Syntax select file.reference {itemlist} {sellist} {outlist} {modlist}
Options j Suppresses all messages.

s Activates a "secondary" list.

w Bypass index selection.
Example
select invoices with amount.due > "0"

This builds a list of the item-ids which match the given selection criteria.

select customers with last.order.amount > "1000" order.pointers

This creates a non-sorted list of the contents of the 
"order.pointers" attribute.

sselect invoices = 'd]' with invoice.date ge "1/1/94" by 
date

This creates a sorted list of all invoices whose item-id begins with the letter 
"d" and with an "invoice.date" on or after January 1, 1994.
Purpose
Related secondary.list
tcl.el
tcl.delete-list
active.list
secondary.list
access.selection.processor
tcl.wselect
tcl.sort-list
tcl.copy
tcl.qselect
tcl.edit-list
basic.readnext
tcl.get-list
runoff.readnext
access.nselect
tcl.copy-list
op.readnext
access.modifiers.modlist
access.sselect
access.sellist
access.selection.criteria
access.itemlist
tcl.save-list
tcl.end
tcl.compare-list
access.verbs
tcl.sel
basic.begin.work