SELECT
SEL
ECT DF_name [
D
YNAMIC] [
R
O] [
V
IA ISAM-key]
[
M
AP]
[
N
EWMAP]
[
RE
BUILD]
establishes the data file that is currently selected or available for processing. The records in the selected data file become the selected and working set of records.
arguments
DF_name is the name of an existing data file.
DYNAMIC (for ISAM datafiles only) causes the specified file to be selected, but with no records in the working set.
INFO selects records and builds a bitmap for the datafile only as you operate on individual records during subsequent active commands.
MAP (for ISAM datafiles only ) directs INFO to use the existing bitmap or, if no bitmap exists, to build a new one.
This is the default option if the specified datafile is ISAM.
NEWMAP (for ISAM datafiles only ) directs INFO to delete any existing bitmaps and build a new one.
REBUILD (INFO-Text only) this directs INFO-Text to rebuild the logical record number file for the specified extended datafile. The file will then need to be concorded.
RO indicates that you wish read-only access to the specified datafile once it is selected.
VIA (for ISAM datafiles only) establishes a secondary key as the primary key for accessing the datafile. The ISAM key must have a key level greater than or equal to zero
(0). INFO accesses the datafile in ascending sequence using the specified key. The specified ISAM-key remains in effect until changed by a LIMIT command or another
SELECT command.
INFO Reference Manual Commands 473
SELECT discussion
The SELECT command opens the data file that is to be used for subsequent commands. INFO deselects any data file named in a previous SELECT command and cancels all links to related data files.
If the data file is protected, INFO prompts ENTER
PASSWORD> and waits for you to enter a valid protection key for the file. To avoid this prompt, see the
PASSWORD command for information about entering a protection key before issuing the SELECT.
If you select an extended datafile, and no synonym file was associated with that datafile when it was defined,
INFO-Text immediately prompts SYNONYM FILENAME>.
You can supply the name of an existing synonym file that you want to use with the selected extended datafile for querying purposes. If you press <RETURN> instead, no synonym file is chosen and that datafile remains selected.
If you select an extended datafile with the RO option, you cannot update the records in the datafile. You cannot concord an extended datafile selected with the RO option.
The access that you have to the selected data file depends on the current value of the system item $AS and whether or not you include the SELECT command RO option. If you do not include the RO option and the value of $AS is
1, you have read and write access to the selected data file; if the value of $AS is 7, you have read-only access to the data file. If you include the RO option, INFO gives you read-only access to the file, regardless of the value of
$AS.
474 Commands INFO References Manual
see also
SELECT
At the end of SELECT processing, immediately before returning to the ENTER COMMAND > prompt, INFO displays the message:
# RECORD(S) SELECTED where # is the number of records selected by the SELECT command.
$AS
$AR
$NOREC
$NOSEL
ASELECT
DSEL
MODE SET HOF
NEWMAP
NSELECT
RESELECT
XSEL
INFO Reference Manual Commands 475