SSELECT

Generates an implicit list of item-ids based on the selection criteria specified. Unless sort criteria specify otherwise, it generates the list in item-id order.

Syntax

SSELECT file-specifier{item-list}{selection-criteria}{USING file-specifier}{sort-criteria}{macro-call}{(options}

Refer to Sentence Structure for descriptions of these parameters.

Special Options

C{n} Display running counters of the number of items selected and items processed. The counter display is refreshed after every n items processed (default 500) or after the total number of items if less than 500. For example, (C25) refreshes the display after every 25 items processed.

G{n} Completes once n items have been selected (default 500), or the end of the file is reached, whichever occurs first. Use this option to sample the contents of the file, without processing the entire file.

Note

If you specify both the C and the G option, the second value of n is ignored. For example, if you specify (C10G5, the value 10 is used.

Comments

If you do not need the items sorted by item-id, use SELECT.

After you press RETURN, English displays the number of elements selected and the prompt '>'. Any of the following can then be used to act on the list:

When using SSELECT with the BY-EXP or BY-EXP-DSND connective on a multivalued attribute, the list has the format:

item-id]multivalue#

where multivalue# is the position of the multivalue within the attribute specified by BY-EXP or BY-EXP-DSND. The multivalue# can be used by the READNEXT statement in a DataBasic program (see DataBasic Reference).

Example

In this example, the 'C' output option specifies that the counter be incremented for every 20 items and the implicit list is re-sorted by the sort criteria clause in the LIST sentence.

:SSELECT ROOMS WITH NO 'GUEST' (C20

29 ITEMS SELECTED        29 ITEMS PROCESSED
29 ITEMS SELECTED
>LIST ROOMS BY RATE RATE ROOM-TYPE (H

ROOMS Rate.... Room...........
               Type
119     64.00  Double Occ.
122     64.00  Single Occ.
194     64.00  Double Occ.
140     68.00  Single Occ.
 .      .      .
600    104.00  Suite
535    164.00  Penthouse