BSELECT, BSSELECT

BSELECT retrieves selected items and generates a list comprising the attributes of those items as given by any explicit output-specification or by the default output specification. Each subvalue within these attributes becomes a separate entry within the list. The total number of entries within the list is displayed and the list is made available to the next command or DataBasic program executed as if it had been generated by a list generating command.

BSSELECT is similar, but its output is in item-id order unless sort criteria specify otherwise.

Syntax

BSELECT file-specifier {item-list} {selection-criteria} {USING file-specifier} {sort-criteria} {output-specification} {format-specification} {macro-call} {(options}

BSSELECT file-specifier {item-list} {selection-criteria} {USING file-specifier} {sort-criteria} {output-specification} {format-specification} {macro-call} {(options}

Refer to Sentence Structure for descriptions of these parameters.

Comments

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

Note that attributes that are empty are omitted from the list. If required, empty attributes can be included by setting the BSELECT.NULL environment option in your operating environment.

Examples

The following example uses the default output options in the dictionary to determine which attributes are to be captured in the list. There are two default attributes: guest name and leave date:

:BSELECT ROOMS WITH BED-CODE = "Q"
21 ITEMS SELECTED
>SAVE-LIST QBED
[241] 'QBED' CATALOGED
:EDIT-LIST QBED
TOP
.P
001  S
002  Single Occ.
003  Queen
004  68.00
005  Lynch
.
.
.
EOI  021
.EX
'ENGLISH-TUTORIAL*L*QBED' EXITED from file 'POINTER-FILE'.

The following example specifies that the explicit attribute LEAVE-DATE is to be captured in the list:

:BSELECT ROOMS WITH BED-CODE = "Q" LEAVE-DATE

3 ITEMS SELECTED
>SAVE-LIST QBED.AVAIL
[241] 'QBED.AVAIL' CATALOGED
:EDIT-LIST QBED.AVAIL
TOP
.P
001  09/05/93
002  09/14/93
003  09/11/93
EOF  003
.EX
'ENGLISH-TUTORIAL*L*QBED.AVAIL' EXITED from file 'POINTER-FILE'.