QSELECT

QSELECT

Top  Previous  Next

 

The QSELECT command constructs a select list from the content of selected records.

 

 

Format

 

QSELECT {DICT} file.name  {id... | * | FROM list}  {TO list}  {SAVING field}

 

where

 

id...is a list of records to be processed.

 

*specifies that all records are to be processed.

 

FROM listspecifies a select list of records to be processed.

 

TO listspecifies the list to be created. If omitted, the default list (list 0) is created.

 

SAVING fieldidentifies the field from which items are to be taken. If omitted, all fields in the record are processed. The field item may be a field number, a field name or a data collection element reference. This clause of the command is equivalent to (fieldno in the Pick version of this command.

 

 

The QSELECT command reads selected records from the given file and constructs a select list from the content of the named field or all fields. Multivalued fields are expanded to give a separate list entry for each value or subvalue.

 

If the default select list is active and there are no record ids or FROM clause on the command line, this list is used to control processing.

 

Both @SELECTED and @SYSTEM.RETURN.CODE will be set to the number of item selected.

 

See the SELECT command for a discussion of chained selection where a command can be executed automatically if the QSELECT is successful.