.BROWSE

Command: BROWSE [TABLE table-id] [RANGE start-finish]
Default: Current table; all records in the table

The BROWSE command allows one to browse through the given table. The table-id
can be either the table number or the table name. If no table identifier is
given, the current table (see TABLE) is browsed. The search begins at record
"start" and runs through record "finish" inclusive, the default is to start at
record 1 and proceed to the end of the table.

.CLOSE

Command: CLOSE [TABLE table-id]
Default: Current table

The CLOSE command closes the given table and frees all allocated memory
attached to the table. Closing a table does not affect the ordering of the
table identifiers for other open tables. For example,

    CLOSE TABLE 2

will free all resources for table 2 and delete it from the list. Subsequent
LIST commands would show that item 2 is no longer on the list of tables, but
tables 1, 3, 4, ..., are left intact with the same numbers.

.DISPLAY

Command: DISPLAY [TABLE table-id] [CLEAR] field-id ...
Default: None

The DISPLAY command allows the user to specify which fields are displayed by
BROWSE. The table-id can be either the table number or the table name. If no
table identifier is given, the field specifications apply to the current table.
The CLEAR option clears memory of all previous field specifications.

Field specifications may consist of the field number or name followed by a
separator character, and perhaps more information. A counter is maintained
which holds the next available screen column for a display. If a field will not
fit because some other field is in the way, it is moved to the right
automatically until a place is found for it, or until there is no more room.

Field separator characters can be one of the following:

   1. one or more blanks to indicate that a blank column should appear
      after the field

   2. a plus sign, "+", to indicate that the next field should be placed
      adjacent to this field

   3. a comma, ",", to indicate a range of fields to display, each separated
      by a single blank

   4. a slash, "/", followed by a column number to indicate that the field
      should be placed in that column.

In cases (1), (2), and (3) the display counter is incremented to point to the
next available display position. In case (4), the display counter is not
changed.

For example, if the display counter starts at 1, the left margin, the following
field specifications:

    DISPLAY RAH RAM DECSIGN+DECD DECM MAG/30

will result in field RAH displayed starting in column 1 and field RAM
following, separated by a blank column. DECSIGN and DECD will be displayed
together without any intervening blank column. DECM will be separated from DECD
by a blank column, and MAG will be displayed starting in column 30. The display
counter is set to point to the column following DECM.

If those same six fields are adjacent to each other in the table (which can be
verified with the LIST FIELDS command), then the following field specification:

    DISPLAY RAH,MAG

will display all six fields, each separated by a single blank.

.DOS

Command: DOS [DOS-command]
Default: Shell

The DOS command allows the user to execute any legal DOS command, program, or
batch file. The user should note that any command entered at the main FTB
prompt that is not recognized as a valid FTB command is automatically passed on
to DOS. The explicit DOS command is included to allow the user to execute a DOS
program whose name conflicts with a valid FTB command, for example LIST, and
also as a way to "shell" out to an active DOS command prompt. To reach a DOS
shell, simply enter "DOS" without any operands. To return to FTB, enter the DOS
command "EXIT".

.ECHO

Command: ECHO [ON | OFF]
Default: Print current ECHO setting

The ECHO command starts or stops command-line echo in FTB batch files. It has
no effect on commands entered interactively. When set (ECHO ON), every command
line read from a batch file is echoed to the screen before it is executed.
Command-line echo is useful for tracing the execution of an FTB batch file.

.EXECUTE

Command: EXECUTE [filename]
Default: Prompt for filename

The EXECUTE command opens a text file containing a series of FTB commands and
executes them one at a time (batch processing). This is a convenient way of
opening a table file and setting up the display for tables that are used often.

All valid FTB commands are accepted, including those commands that are passed
on to DOS. Comments can appear in the batch file using the REMARK command. Long
commands can be spread out over several lines by placing the continuation
character, "-", at the end of each line to be continued. No command line can
total more than 255 characters in length.

.EXIT

Command: EXIT
Default: None

The EXIT command terminates FTB, closing all open files and restoring the
original default drive and directory.

.EXTRACT

Command: EXTRACT [TABLE table-id] [RANGE start-finish] [filename]
Default: Current table; all records; prompt for filename

The EXTRACT command stores selected records (see SELECT) into the named text
file in the same format as would be displayed on the screen (see DISPLAY). The
search begins at record "start" and runs through record "finish" inclusive,
the default is to start at record 1 and proceed to the end of the table.

Example:

   extract table 2 range 200-550 savedata.txt

This will extract the records in table 2 into file SAVEDATA.TXT. The search
begins at record 200 and proceeds through record 550. The number of records
extracted depends on the criteria set by the SELECT command.

.HELP

Command: HELP [command]
Default: Command list

The HELP command presents informative text about the following FTB commands.

 BROWSE   Browse through table records on the computer screen
 CLOSE    Close a table and free its allocated resources
 DISPLAY  Define the fields to display with BROWSE and EXTRACT
 DOS      Execute a DOS command or shell to a DOS prompt
 ECHO     Start or stop command line echo in FTB batch files
 EXECUTE  Execute an FTB batch file, i.e., a set of FTB commands in a text file
 EXIT     Leave FTB
 EXTRACT  Write selected records to a text file
 HELP     Get help on FTB commands
 LIST     List information about tables, fields, and headers
 OPEN     Open a FITS file, which may contain more than one table
 QUIT     A synonym for EXIT
 REMARK   Ignore the remainder of the input line; used in FTB batch files
 SELECT   Place constraints on field values to limit searches
 TABLE    Set current table value

.LIST

Command: LIST [TABLE table-id] [ FIELDS | HEADER | INFO ]
         [SCREEN | PRINTER | FILE [filename]]
Default: List of tables; output to screen

By default, the LIST command lists the active tables by number and by name (if
available). It will also print a listing of the field information, the actual
FITS header for a specific table, or a more human-readable version of the table
header information.

Output can be directed to the screen, the printer, or a disk file. To send
output to a file, the FILE option should always appear last on the command
line. If no file name is given, the user is prompted for one.

Example:

   list table 2 header file tabinfo.hdr

This will generate a listing of the FITS header for table 2 in the text file
TABINFO.HDR in the current working directory.

.OPEN

Command: OPEN [filename]
Default: Prompt for filename

The OPEN command opens a FITS file, scans the file for standard ASCII tables
(XTENSION= 'TABLE '), and decodes the table headers to determine the
information needed to browse through the table.

The file must be accessible through the current working directory (given in the
main FTB command prompt), or by explicitly giving the absolute or relative
pathname.

.QUIT

Command: QUIT
Default: None

The QUIT command is a synonym for EXIT, which terminates FTB, closing all open
files and restoring the original default drive and directory.


.REMARK

Command: REMARK [comments in any format]
Default: None

The REMARK command is used to include comments in FTB batch files (see
EXECUTE). REMARK can be entered at the FTB command prompt, although it isn't
very useful to do so.

.SELECT

Command: SELECT [TABLE table-id] [ [CLEAR] | [ [CURRENT AND_OR] conditions ] ]
Default: List of current selections

The SELECT command specifies which records are displayed by placing constraints
on field values. Only those records meeting the criteria set down by the
conditions will be displayed by the BROWSE command or written to disk by the
EXTRACT command. The CLEAR option clears out all previously defined
conditions. The CURRENT option is used to add the specified conditions to any
that were defined previously.

The conditions are a series of relational expressions in the form:

   field-id relational-operator limiting-value

Relational operators are as follows:

    EQ equal to                    NE not equal to
    LT less than                   GT greater than
    LE less than or equal to       GE greater than or equal to
    SE strictly equal to           IN contains substring

The limiting value must be of the same type as the specified field, e.g., if
the field is an integer, the limiting value must be given as an integer.
Strings must be delimited by a character that is not contained within the
subject strings themselves, as in: 'string' or "quoted 'string'".

For strings, the operators EQ, NE, LT, GT, LE, and GE, ignore case and trailing
blanks. The operators SE and IN are only used for string comparisons. For
SE, strictly equal to, case and trailing blanks are significant, therefore the
comparison value must have the same length as the field value. IN, for testing
substrings, is case insensitive.

Up to ten (10) conditions can be specified, and each must be related through
the relational operators AND or OR. All conditions are evaluated from left to
right. If the expression is evaluated as FALSE, the record has failed the test
and will not be selected for display or extraction. If the expression is
evaluated as TRUE, then the record is selected. No grouping with parentheses is
allowed.

For example, to display only the records for objects in Table 1 appearing west
of 3 hours of right ascension, up to and including 6 hours of RA, and north of
15 degrees declination, enter:

   SELECT Table 1 RAH gt 3 and RAH le 6 and DecSign eq '+' and DecD lt 15

To add a condition to display all stars with visual magnitude brighter than 6,
regardless of position in the sky, enter:

   SELECT CURRENT or V lt 6

To eliminate the selection criteria and display all records, enter:

   SELECT CLEAR

.TABLE

Command: TABLE [table-id]
Default: List current table-id

The TABLE command sets the value of the current table identifier. If no new
value is given, the number and name of the current table is displayed on the
screen.

