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
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:
-
Another English sentence. If the list consists of a set of item-ids, another English statement can be entered. For example, LIST or SORT.
-
List processing commands; for example, SAVE-LIST.
-
A Cataloged DataBasic program. The list is then available to the specified program via a READNEXT statement. For more information, refer to DataBasic Reference.
-
TCL-II commands such as EDIT or COPY.
-
A Proc command. If the SSELECT is processed within a Proc, the list can be assessed via Proc commands. For more information, return to Proc Reference.
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