Introduction

BTRV copyright (C) 1992 by Richard W. Hansen, all rights reserved.
Btrieve and Butil are a copyrighted by Novell, Inc.

BTRV is a utility program for maintaining and creating files using the
Btrieve record manager from Novell,Inc. BTRV was created primarily as an
aid for programmers developing Btrieve applications, but can be
invaluable to anyone who uses or maintains Btrieve files.

Some of BTRV's features are:

*   Easy file creation.
*   Supports all key and file types.
*   Supports variable length records.
*   Browse and edit files.
*   Clone files.
*   Recover damaged file.
*   Load and Save files in Butil format.
*   Calculate optimum page sizes.
*   Test record locking and transaction processing.
*   View file statistics.
*   Get record positon/Read record by position

Definition Of Shareware

Shareware distribution gives users a chance to try software before
buying it. If you try a Shareware program and continue using it, you are
expected to register. Individual programs differ on details -- some
request registration while others require it, some specify a maximum
trial period. With registration, you get anything from the simple right
to continue using the software to an updated program with printed
manual.

Copyright laws apply to both Shareware and commercial software, and the
copyright holder retains all rights, with a few specific exceptions as
stated below. Shareware authors are accomplished programmers, just like
commercial authors, and the programs are of comparable quality. (In both
cases, there are good programs and bad ones!) The main difference is in
the method of distribution. The author specifically grants the right to
copy and distribute the software, either to all and sundry or to a
specific group. For example, some authors require written permission
before a commercial disk vendor may copy their Shareware.

Shareware is a distribution method, not a type of software. You should
find software that suits your needs and pocketbook, whether it's
commercial or Shareware. The Shareware system makes fitting your needs
easier, because you can try before you buy. And because the overhead is
low, prices are low also. Shareware has the ultimate money-back
guarantee -- if you don't use the product, you don't pay for it.


Disclaimer

Users of BTRV must accept this disclaimer of warranty: "BTRV is supplied
as is. The author disclaims all warranties, expressed or implied,
including, without limitation, the warranties of merchantability and of
fitness for any purpose. The author assumes no liability for damages,
direct or consequential, which may result from the use of BTRV."


License Agreement

BTRV is a "Shareware program" and is provided at no charge to the user
for evaluation. Feel free to share, but please do not give it away
altered or as part of another system. If you find this program useful
and find that you are using BTRV and continue to use BTRV after a
reasonable trial period, you must make a registration payment of $50.00
to Richard Hansen. The $50.00 registration fee will license one copy for
use on any one computer at any one time, site licenses are available.
You must treat this software just like a book. Each licensed copy may be
used by only one person at a time, just as a book cannot be read by two
different persons at the same time.

Commercial users of BTRV must register and pay for their copies of BTRV
within 30 days of first use or their license is withdrawn. Site license
arrangements may be made by contacting Richard Hansen.

Anyone distributing BTRV for any kind of remuneration must first contact
Richard Hansen for authorization.


How to Register and Get Help

You may register by check, money order, credit card, or online on the
CompuServe information service. All registrations are $50.00 plus $5.00
shipping and handling.

Checks or money orders are prefered if possible. Please make all checks
payable in U.S. dollars, drawn on a U.S. bank. Orders paid by check drawn on
a non-U.S. bank will be returned. I apologize for any inconvenience but high
bank charges, roughly 50%, make this necessary.

You can also register online on CompuServe. Type GO SWREG, and follow the
prompts. The Registration Id for CompuServe is 1169. All Compuserve
registrations are $55.00, including shipping and handling.

You may place an order by Master Card, VISA, American Express, or Discover by
contacting Public Software Library at (800) 242-4PSL (from overseas
(713) 524-6394), by FAX at (713) 524-6398, or on CompuServe at 71355,470.
These numbers are for credit card orders only! Please, do not call these
numbers for any type of technical assistance. The Registration Id for PSL is
10906. All PSL registrations are $55.00, including shipping and handling.

Site licenses and multiple copy discounts are available.

Please contact me with any comments, suggestions, problems, bugs, or
questions.

Richard Hansen
PO Box 18571
Saint Paul, MN  55118-0571  USA

CompuServe : 70242,3367
InterNet   : 70242.3367@compuserve.com
FidoNet    : 1:282/115


Installation

The file "BTRV.EXE" is the only one you need. BTRV will create its
configuration file, "BTRV.CFG", in the same directory as the BTRV
program.


Requirements

BTRV requires DOS 3.0 or greater and a minimum of 256K bytes of memory
plus the memory your configuration of Btrieve needs. BTRV will run on
any monochrome or color monitor. Since BTRV uses a text based windowing
and pull down menu environment, use of a mouse is strongly recommended.

BTRV should work with any version of Novell's Btrieve, and supports most
functions through version 5.10. It supports all file, record, and key
types; including data only files and variable length records. You may
create files with up to 24 segments, and can view files by any defined
index path.


Getting Started

This documentation is not intended as a tutorial on Btrieve, that is a
subject of it's own. I hope that this documentation will serve as a
thorough instruction in BTRV and its uses.

To start the program, you must first load Btrieve. A batch file, that
loads the Btrieve Record manager and then BTRV, is the most convenient
method. To ensure that you can open any file, it is best to start
Btrieve with a page size of the maximum 4096 bytes.

If you want a file opened automatically, you can enter a path and
filename on the command line. If you don't load a file from the command
line, choose the Open option from the File menu. Type in a path and
filename or use the Tab key to move to the file list box and choose a
file. When you have typed in a filename or highlighted one in the list
box, press Enter or click on the Open button with the mouse.

Once you have opened a file, pull down the View menu. From the View menu
you can view various aspects of the current file. You may check the file
statistics, view the data in the file records, or view the key buffer
for the current record. In addition, you can browse through a window
that displays the key fields defined for each record in the file.


Basics for Using BTRV

When you start BTRV you will see a screen like the one below. At the top
is the menu bar. At the right end of the menu bar is a clock that
displays the current system time. To the left of the clock is a display
of the free bytes of system memory. At the bottom of the screen is a
status line that displays a few of the most commonly used hot key
combinations. Between the menu bar and the status line is the desktop.
The desktop is where all windows and dialog boxes will be opened and
displayed.

All program functions are accessed from the main program menu. In
addition, many functions have hot key combinations (see Appendix A) that
can be used to invoke them. If you have a mouse, there are several
functions available by clicking the mouse in the status line at the
bottom of the screen.

A mouse is the easiest way to operate the program. Any option or program
operation, except those that require character entry, such as file owner
name, can be executed with a mouse. If you are familiar with Microsoft
Windows, you should have no difficulty using BTRV with a mouse.

If you are using the keyboard, pressing F10 will move you to the menu
bar. You can also type Alt and the first letter of the desired menu bar
option, such as Alt-V for the View menu or Alt-F for the File menu. To
Exit the program you can press Alt-X, select Exit from the File menu, or
click the mouse on "Alt-X Exit" in the status line.

Ŀ
    File  Input  Output  View  Locks  Window  Misc          321232  09:18p
   Ŀ                                                    
    Open...  Ctrl-O                                                     
    Create...                                                           
    Clone...                                                            
    Recover...                                                          
    Load...                                                             
    Save...                                                             
    Close    Ctrl-C                                                     
   Ĵ                                                    
    Set Owner                                                           
    Clear Owner                                                         
   Ĵ                                                    
    Unload Btrieve                                                      
    Reset  Btrieve                                                      
    Exit      Alt-X                                                     
                                                       
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
Alt-X Exit  Ctrl-Home First  Ctrl-End Last  Ctrl-N Next  Ctrl-P Prev      

Figure 1 - BTRV opening screen

Dialog Boxes

BTRV receives user input in dialog boxes. Only one dialog box may be
open at a time. When you open a dialog box, one of the buttons will be
highlighted in some manner, depending on your color setup. This button
is the default and will be executed if you press Enter. Enter does not
move from field to field, use Tab and Shift-Tab or the mouse for that.

Every dialog box has an OK button (or some equivalent such as Open) and
a Cancel button. You can back out of any operation, from almost any
point, by pressing Escape or selecting the Cancel button. When you press
Enter, with the OK button as the default or highlighted button, whatever
data you have in the dialog box will be used.

Dialog boxes also have close or cancel icons embedded in the upper left
corner of the window frame. Clicking on the cancel icon with the left
mouse button, will close the window or dialog. If you are using the
keyboard you can press Escape to cancel a dialog box.

Dialog boxes will contain a variety of controls, from scrolling list
boxes to check boxes and radio buttons. Each control will have an
attached label that describes its purpose. Pressing the highlighted
letter in the label, or clicking on the label or control will move you
to that control. To jump to a new control from a text input line you
will must press Alt and the highlighted letter in the label.


Check Boxes and Radio Buttons

Check boxes are used to select one or more items from a list of items.
Radio buttons are used to select a single item from a list. In groups of
check boxes or radio buttons the arrow keys move you between the
different choices. In a check box group you may mark multiple items with
the space bar. In a group of radio buttons you can select only one of
the items, by moving through the group with the arrow keys.

Input Lines

Where keyboard data entry is required, a dialog box will contain a text
input line. When you first enter an input line all existing text will be
highlighted. Typing any alphanumeric character will delete the current
text and replace it with what was just typed. To edit existing input
press the left or right arrow key, Home, End or Insert first, or click
the mouse on the desired position in the text.

With a mouse, press and hold the left button while moving the mouse to
highlight text for deletion. Press the Delete key to remove the
highlighted text.

If the text you have typed is to long to display in the input line, the
text will scroll left and right in the input line. You will see left and
right arrow icons at the start or end of the input line. Press the left or
right arrow keys, or click the mouse on one of the icons, to scroll the text.

Many text input lines will have history lists attached to them. If an
input line has an icon next to it, you may press the down arrow key
or click on the icon to view the history list. Double click the mouse or
press Enter on the highlighted item to place it into the input line.

Windows

BTRV uses text windows to display data. You may have multiple data
windows open at the same time. When there are multiple windows open,
clicking on any part of a window will move it to the front. To close a
window click on the close icon in the upper left corner or press the F4
key.

You can resize a window by pressing and holding the left mouse button
down on the lower right corner of the window. With the mouse button held
down, drag the window corner until the window is the desired size.
Alternately, you can press Ctrl-F5 and use the arrows keys, while
holding down a shift key. Press Escape or Enter when done resizing a
window with the arrow keys.

To move a window, press and hold the left mouse button down on any part
of the top window frame and drag the window to a new position. From the
keyboard press Ctrl-F5 and use the arrow keys, press Escape or Enter
when done.

To zoom or unzoom a window, click the mouse cursor on the zoom icon
located in the upper right corner of the window frame. Double clicking
on the top of the window frame will also zoom or unzoom a window. From
the keyboard you should press the F5 key.


Scroll Bars

In list boxes, history lists, or text windows there may be horizontal
and vertical scroll bars. In this case you may use the arrow keys, Page
Up and Page Down to scroll the data. Home will move to the top of the
window, End to the bottom. Page Up and Page Down move by one page, while
Ctrl-Page Up and Ctrl-Page Down move to top and bottom of the list.
With a mouse, click on the Up or Down arrow icons to scroll the data one line
at a time. You may also click below or above the position indicator icon, in
the scroll bar, to scroll by one page. Optionally, you may hold down the
left mouse button on the position icon and drag the icon to reposition the
data.


File Menu Options

The File menu contains all the file related options in BTRV. You can
open, create, clone, recover, load, or save a file. In addition, you can
set or clear file owner names, unload and reset the Btrieve Record
Manager.

PLEASE NOTE: Early versions of Btrieve (prior to 5.0) have no protection
against overwriting existing files. Be careful not to enter the name of
an existing file when entering the new filename for the create, recover,
or clone operations.

Opening a File

You can have only one file open at a time, multiple files is a feature
for some future version. If you already have a file open, this option is
disabled until you close the current file. You open a file from the File
menu or by pressing Ctrl-O.

[*] Open File ͻ
  File                              Owner          
 [*.*                        ]     [        ]      
                                                   
  Directory                         Open Mode      
 [C:\TP\B\                   ]      (*) Normal     
                                    ( ) Accelerate 
  Files           Directories       ( ) Read Only  
Ŀ    ( ) Verify     
 B.BAT        #  ..\          #    ( ) Exclusive  
 BAK.BAT        TEST\                           
 BT.BAT         A:\                             
 BTRIEVE.TPU    B:\                             
 BTRIEVE.TRN    C:\                [ Open ]    
 BTRV.ASC                               
 BTRV.CFG                                       
 BTRV.DOC                          [Cancel]    
 BTRV.EXE                               
 BTRV6.PAS                                      
                   
  B.BAT         46         02/28/1992  07:08pm     
ͼ
Figure 2 - Open File Dialog Box

To open a file you will be working in the Open File dialog box as seen
above. You may type in a full path and filename, a file mask with wild
card characters or use the file selection list. There is also a history
list attached to the filename input that can be used to retrieve
previously used filenames or masks.

The file you open can be on any drive or in any directory. Use the
directories list box to switch drives or directories. Highlight a drive
or directory. Next press Enter, double click on it with the mouse, or
press the Open button to switch to the directory or drive.

The files in the current directory will be displayed in the files list
box. Just highlight a file, then press Enter, double click on it with
the mouse, or press the Open button to open it.

Both the file and directory list boxes will do incremental searches.
When you are in one of the boxes, type as many letters as needed to
reach a desired file. Use the Backspace key to remove letters and backup
in your search.

If a file has been setup with an owner name, you will need to specify
that name to open the file. The owner name must exactly match the one
previously assigned to that file (please see your Btrieve manual for
more information).

There is also a set of radio buttons that can be used to set the open
mode. The standard Btrieve modes are summarized below, Normal is the
default mode.

Ŀ
 Mode        Description                                       
 Normal      The default mode, no special features.            
 Accelerate  Disables Btrieve's data recovery features.        
 Read Only   Allows access to a damaged file.                  
 Verify      Enables DOS verify option.                        
 Exclusive   Gives the workstation exclusive access to a file. 

Table 1 - Btrieve File Open Modes

Creating a File

The create file dialog allows you to specify all of a file's attributes.
You can specify any characteristics available for Btrieve files. Three
pieces of information must be entered, the filename, the record length,
and the file page size. In addition you may add an alternate collating
sequence, set any special file flags, set the number of data pages to
preallocate to the file, and the free space threshold the file should
maintain.

[*] Create File ͻ
 File Name and Path                           File Flags                  
[                                      ]      [ ] Variable Length Records 
                                              [ ] Blank Truncation        
 Alt Collating Sequence                       [ ] Data Compression        
[                                      ]      [ ] Key Only                
                                                                          
 Page Size         Record Size [0    ]        Free Space                  
 (*)  512 Bytes                               (*)  0 %                    
 ( ) 1024 Bytes    PreAllocate [0    ]        ( ) 10 %                    
 ( ) 1536 Bytes                               ( ) 20 %                    
 ( ) 2048 Bytes                               ( ) 30 %                    
 ( ) 2560 Bytes                                                           
 ( ) 3072 Bytes                                                           
 ( ) 3584 Bytes           [ Create ]    [ Cancel ]    [ Define Keys ]  
 ( ) 4096 Bytes                        
ͼ
Figure 3 - Create File Dialog Box

When you have defined the file's attributes, press the Define Keys
button. This will bring up a dialog box, as seen below, for defining the
first key in the file. In this dialog you will set the key type, key
attributes, key size, key position in the record and the key's null
value. You must set the key type, position and length, all other
information is optional.

[*] Key Segment #1 ͻ
   Key Type               Key Attributes               
   (*) String             [ ] Duplicate                
   ( ) Integer            [ ] Modifiable               
   ( ) Float              [ ] Null                     
   ( ) Date               [ ] Segmented                
   ( ) Time               [ ] Alt Collating Sequence   
   ( ) Decimal            [ ] Descending               
   ( ) Money              [ ] Manual                   
   ( ) Logical                                         
   ( ) Numeric            Position   [0    ]           
   ( ) BFloat                                          
   ( ) LString            Key Length [0  ]             
   ( ) ZString                                         
   ( ) Unsigned Binary    Null Value [0  ]             
   ( ) Auto Increment                                  
                                                       
  [ OK ]   [ Cancel ]   [ Next Key ]   [ Prev Key ]ܺ
               ߺ
ͼ
Figure 4 - Define Keys Dialog Box

You may define up to 24 keys or key segments. When you are done with a
key, press the Next Key button to define another key, or press the Prev
Key button to go back to the previous key definition. When all the keys
have been defined press the OK button to return to then main file create
dialog.

In the main dialog press the Create button to create your new file. Note
that the file is not open after it is created.

If you need more information on file attributes or defining keys please
refer to your Btrieve manual.

Cloning a File

Clone will create an empty copy of a file. The cloned file will have
attributes identical to the original file, but will be empty. First, you
must select the file to be cloned. This is done in the dialog box shown
below. You may type a full path name or select one from the list of
files. If the file has an owner, it must be specified in the Owner
field. Press the Open button when you have a file selected. A second
dialog box will open. Here you must type the name of the new file and
press the OK button to clone the file.

[*] File to Clone ͻ
  File                              Owner          
 [*.*                        ]     [        ]      
                                                   
  Directory                                        
 [C:\TP\B\                   ]                     
                                                   
  Files           Directories                      
Ŀ                   
 B.BAT        #  ..\          #                   
 BAK.BAT        TEST\                           
 BT.BAT         A:\                             
 BTRIEVE.TPU    B:\                             
 BTRIEVE.TRN    C:\                [ Open ]    
 BTRV.ASC                               
 BTRV.CFG                                       
 BTRV.DOC                          [Cancel]    
 BTRV.EXE                               
 BTRV.PAS                                       
                   
  B.BAT         46         02/28/1992  07:08pm     
ͼ
Figure 5 - Clone File Dialog Box

Recovering A File

This option will read all records from one Btrieve file and copy them to
a new Btrieve file. You can use it to recover records from damaged
files. Recover can also be used to compact a file, by creating a copy
with all deleted records removed.

First, you must select the file to be recovered. This is done in a
dialog box identical to the one for file cloning. In a second dialog box
you will enter the name for the new file.

Loading A File

Load will read a DOS file created by the Save operation described below,
or the Butil Save or Recover operations. Load inserts all records from a
DOS file into a Btrieve file. Load works identically to the Butil Load
operation.

First, you select the file that will have records loaded into it. This
is done in a dialog box identical to the one for file cloning. In a
second dialog box you select the DOS file to be loaded.

Saving A File

Use Save to create a file to for use with Load or Butil. First, you
select the file to be saved. This is done in a dialog box identical to
the one for file cloning. In a second dialog box you will enter the name
for the DOS file that records will be saved to.

Set Owner

This option is disabled unless you have a file open. Use it to add an
owner name to the file. An owner name can be up to eight characters in
length. Once you set an owner name, you will need to supply the exact
same name every time you open the file.

In addition, you can set the file access mode for use after the owner is
set. The possible access modes are summarized below, Owner Required is
the default mode.

Ŀ
 Mode                    Description                                  
 Owner Required          Requires owner name for any access.          
 Read Only without Owner Permits read-only access without owner name. 
 Owner Required/Encrypt  Requires owner name for any access, data is  
                         encrypted.                                   
 Read Only/Encrypt       Permits read-only access without owner name, 
                         data is encrypted.                           

Table 2 - File Access Modes with Owner

Clear Owner

This option is disabled unless you have a file open. Use this option to
remove a owner name from a file.

Unload Btrieve

This option executes a standard Btrieve stop or operation number 25.
Needless to say, you should not pick this unless you are done using the
program.

Reset Btrieve

The Reset option issues a operation number 28 to the record manager.
Reset will close any open files, release all locks, and abort any
transaction.


View Menu Options

The View menu gives you access to the various viewing options in BTRV.
These include viewing the key buffer, record buffer, file statistics,
and Btrieve version number.

View File Statistics

[*] File Statistics: CUSTOMER.DAT Ŀ
  Record Length   : 700              Record Count    : 537           #
  Page Size       : 3584             Unused Pages    : 0             
  Variable Length : No               Compressed      : No            
  Key Only        : No               Blank Truncation: No            
  Preallocation   : No               Free Threshold  :               
  Key Count       : 2                Longest Key     : 41            
  Total Segments  : 2                Current Index   : 0             
                                                                     
  Key    Pos   Size   Type     Dup Mod Man Alt Sup Nul       Total   
    
    0      1     10  LString   No  No  No  No  No      ^       537   
    1     11     31  LString   Yes Yes No  Yes No      ^       532   
                                                                     

Figure 6 - Viewing File Statistics

This is a convenient way to do a quick check on a file. It lists all the
information about a file that Btrieve returns. This includes the record
size, page size, record count, file flags, and key definitions for each
key segment defined in the file.

View Data Buffer

Select this option to look at the current record in a file's data
buffer. This option is only available if you have a file open. The
window displayed is very similar to those commonly used in disk file
editors. You get two views of the data, one in ASCII characters and one
in Hexadecimal notation.

[*] Data Buffer: CUSTOMER.DAT Ŀ
092020202020202020311E436173682053616C65        1 Cash Sale #
2020202020202020202020202020202020202020                    
201E202020202020202020202020202020202020 #                  
202020202020202020202020035A20201E202020            $Z      
2020202020202020202020202020202020202020                    
202020202020201E202020202020202020202020       %            
2020202020202020202020202020202020200F20                  ^ 
2020202020202020202020202020000000000000                    
0000000000000000152830303029203030302D30        (000) 000-0
303030202D20303030300F472020202020202020000 - 0000@G        
2020202020200F20202020202020202020202020      @             
2020000000000000000000000000000000000101                  @@
6D0701001E436173682053616C65202020202020m^ &Cash Sale      
2020202020202020202020202020200000000000                    
0000000000000000000000000000000000000000                    
 Pos : 1 
Figure 7 - Viewing the File Data Buffer

Use the Tab key to move back and forth between the two view modes (ASCII
or HEX). The relative position of the cursor is maintained when you move
between ASCII and HEX mode. Note the position indicator in the lower
left corner. This indicator shows the position starting from one (1),
just as keys must be defined when creating a file.

The data buffer is fully compatible with all Btrieve record types. You
can view fixed length as well as variable length records. When viewing
variable length records you may get a buffer length error. The default
buffer size is 16K bytes, and can be set up to 64K bytes. You may
decrease or increase the buffer size as desired, from the Options sub-
menu under Misc on the main menu bar.

Use the arrow keys, Page Up, Page Down, Ctrl-Page Up, Ctrl-Page Down to
move through the data. Page Up and Page Down move one page at time.
Ctrl-Page Up and Ctrl-Page Down move to the top and bottom of the buffer
respectively. In addition, the scroll bar and mouse can be used.

This window is used in conjunction with the file Input Options defined
below. Whenever you execute one of the input options, such as Get First
or Get Next, the contents of the data buffer window will be updated. If
you have not already read a record before opening the window, the data
buffer will be empty.

You may have multiple data windows open. This can be useful for looking
at different parts of large records. When you read a new record all open
data windows will be updated.

The contents of the buffer are fully editable. In the HEX view, you may
type the characters 0 through 9 and A through F. In the ASCII view,
anything you can type at the keyboard will be accepted. Any changes in
one view are reflected in the other, the changes are also updated in any
other open data buffer windows you may have open.

If you change any data you can save the record back to the file by
executing an Update operation, as described farther on in the file
Output Options. You can even create new records and use the Insert
operation to save them to disk.

View Key Buffer

View Key Buffer will give you a look at the current data in the key
buffer. The data is displayed for the current access path (index).

This window displays its data identically to the data buffer window
above. All the movement and editing, options apply to the key buffer
window as well. However, the Update and Insert operations have no
effect, they work on the data in the record data buffer only.

You may be wondering what good editing the key buffer can do. Well, if
you do edit it, you can use the get by key operations, such as Get
Equal, Get Greater, or Get Less. Admittedly, this is not the handiest
way read a record by key, but it can be useful.

Browse File Key Fields

Use Browse to view the key fields defined for each record in a file. A
scrolling window with one record per line will be displayed. The records
are displayed in the order of the current key path. Every key segment
can be viewed from left to right in the line. Each key segment will be
displayed in a format appropriate for its defined data type.

You may scroll the window, left, right, up, or down to view records or

parts of records that do not fit in the window. Page Up and Page Down
move by one window at a time. Ctrl-Page Up and Ctrl-Page Down move to
the first and last records in the file respectively.

On a large file all records can not be held in memory at one time. In
this case, the window will provide a sliding view of the records in the
file. When you reach the first or last record in memory more records
will be read in as needed.

Since there is no way to quickly and reliably determine the number of
active records in a Btrieve file, the scroll bars attached to the window
are not accurate. They indicate the relative position in the list of
records in memory, not in the file. When you hit the top or bottom the
list, you will need to press the Up or Down arrow, or the Page Up or
Down key, to read more records.

If you have a data buffer window open, you can press the space bar to
display the highlighted record in the data buffer window. With a mouse
double click on a record to update the record displayed.

View Btrieve Version

Will display the Btrieve version number.

Input Menu Options

This menu controls all file input operations. From this menu you can
change the index being used, and execute various Btrieve read
operations.

Key Path

This submenu displays a list of all possible key paths for a file. It is
identical to the one in the Output menu. When a file is opened, the key
path defaults to key one. If a file has more than one key defined, you
can choose any key to use as the index for reading records.

If you change key paths while viewing records, on the next read
operation you will get a Btrieve error seven, "Different Key Number".
The simplest thing to do is just execute a Get First or Last operation,
to establish a valid key path. You could also open up a key buffer
window, enter a key value, and execute some get by key operation.

Read Operations

You can execute all the get and step operations from this menu. If you
have a data buffer window open, its contents will be updated to reflect
new records as they are read. The four operations, Get First, Get Last,
Get Previous, and Get Next are also available on the status line.

Get Position

Will display the offset of the current record and add it to the history
list of record offsets.

Get Direct

Use Get Direct to read a record by position. You may type the record offset in
the input line or press the history button to select from a list of saved
record offsets.

Output Menu Options

Key Path

This submenu displays a list of all possible key paths for a file. It is
identical to the one in the Input menu. When a file is opened, the key
path defaults to key one. If a file has more than one key defined, you
can choose any key to use as the index for reading records.

Insert

Use this option to add a new record to a file. Admittedly, creating new
records is not easy. Most likely, you will alter the keys and some data
in an existing record, in a data buffer window, and then save as a new
record.

Update

You can rewrite an existing record, using the same key values, with
Update. Use a data buffer window to edit a record. Be careful when
editing key fields, unless they were defined as modifiable you will get
errors.

Delete

Delete removes the current record, the one held in the file data buffer
(the same one as displayed in a data buffer window). If you have a key
browse window open and select Delete, whatever record happened to be
read last will be deleted. Be careful!

Transactions

If you have Btrieve configured correctly, you can play with transaction
processing. While transactions are active a window with the message
"TRANSACTIONS ON" will be visible.


Locks Menu Options

You can use the Locks menu to test Btrieve's record locking. The default
option is No Locks. Choosing Unlock All Records will release all locks,
including multiple record locks. Please refer to your Btrieve manual for
more information about the different types of record locks.


Window Menu Options

This menu provides keyboard access to the functions for resizing,
moving, zooming, and closing windows. All these functions are also
available using hot key combinations or a mouse.


Misc Menu Options

This menu contains the page size calculator and program setup options.

Page Size Calculator

Enter the number of bytes in the record and the number of duplicate
keys. A dialog box will display the utilization percentage rates for
each possible page size from 512 byte to 4096 bytes. The optimum page
size will be displayed at the bottom of the dialog box.

Colors

BTRV is compatible with any monitor, color, monochrome, or LCD.
Initially, BTRV  will configure itself based on the type of monitor
attached. If you have any problems try setting the color to one of the
default sets described below.

You may customize all color settings in BTRV. The colors are divided
into several areas, including Windows, Menus, Dialog Boxes. Within each
area the colors are further broken down into colors for the various
screen objects such as Buttons and Scroll Bars.

Default Colors

There are three default color sets available, Color, Black and White,
and Monochrome. You probably won't use this option unless you have some
problems with your display. BTRV configures itself based on the display
adapter found. If you have a portable or a black and white VGA, and the
colors are not right, try selecting the Black and White default color
set.

Toggle Video Mode

On computers equipped with EGA or VGA, you can use this to display more
data on the screen. EGA can be toggled to 43 line mode and VGA to 50
line mode.

Change Interrupt

In some instances (mainly to avoid hardware conflicts) it is necessary
to change the interrupt number that the Btrieve TSR is assigned. If you
are using a version of Btrieve with a non-standard interrupt, you can
configure BTRV for that new interrupt. The default interrupt is 123, the
interrupt may be changed to any number from 0 through 255.

Change Buffer Size

When reading variable length records, the record size can (depending on
the Btrieve version) be up to 64K bytes in length. To conserve memory
BTRV uses a default size of 16384 bytes. If none of your variable length
records are this big, or if they are bigger, you can change the size of
the buffer. This will have no effect on memory use except for files with
variable length records.

Save and Load Setup

If you want to make any configuration changes permanent, just select
Save from the menu. BTRV will write out a file named "BTRV.CFG", in the
program directory, to store your new configuration. Use Load to manually
restore settings stored in the configuration file. Each time you run
BTRV the new configuration will be read from disk.


Appendix A - Hot Keys

Below is a list of all short cut keys that can be used in the program:

Menu Option         Keys        Function
Open                Ctrl-O      Open a file
Close               Ctrl-C      Close the current file
Exit                Alt-X       Exit the program
Get First           Ctrl-Home   Read first record in file
Get Last            Ctrl-End    Read last record in file
Get Previous        Ctrl-P      Read the previous record
Get Next            Ctrl-N      Read the next record
Get Equal           Ctrl-E      Read record with matching key
Get Greater Than    Ctrl-G      Read record with key greater than
Get Less Than       Ctrl-L      Read record with key less than
Step Previous       Alt-P       Step to the previous record
Step Next           Alt-N       Step to the next record
Insert              Ctrl-I      Insert a new record
Update              Ctrl-U      Update the current record
Delete              Ctrl-D      Delete the current record
Begin Transaction   Alt-B       Turn transaction processing ON
Abort Transaction   Alt-A       Abort transaction processing
End Transaction     Alt-E       Turn transaction processing OFF
Statistics          Alt-S       View file statistics
Data Buffer         Alt-D       View file data buffer
Key Buffer          Alt-K       View file key buffer
Btrieve Version     Ctrl-V      View the current Btrieve version
Resize/Move         Ctrl-F5     Resize or move current window
Zoom                F5          Zoom the current window
Next                F6          Move to next window
Prev                Shift-F6    Move to previous window
Close               F4          Close current window
Tile                F2          Tile all open windows
Cascade             F3          Cascade all open windows

Appendix B - Summary of Btrieve DOS Setup Options

BTRIEVE /M: memory size
        /P: page size
        /T: transaction filename
        /I: pre-image file drive
        /C
        /B: pre-image buffer size
        /F: open files
        /L: multiple locks
        /E
        /O
        /U: compression buffer size
        /N: number of files in transaction
        /A

MEMORY SIZE (/M)
  Defines total size of Btrieve's data area in K bytes. Default value
  is 32K, the range is 14K to 64K.

PAGE SIZE (/P)
  Specifies the maximum page size of any file to be accessed. Must be a
  multiple of 512 bytes in the range 512 to 4096.

TRANSACTION FILENAME (/T)
  Specifies the location for Btrieve to store the transaction control
  file.

PRE-IMAGE FILE DRIVE (/I)
  Directs the pre-image files to a drive other than the drive where the
  Btrieve files are located.

INDEX COMPACTION (/C)
  Tells Btrieve to perform index compaction on Update and Insert
  operations.

PRE-IMAGE BUFFER SIZE (/B)
  Specifies the total amount of memory Btrieve should use for preimaging
  buffers. The default value is 16K, the range is 1K to 64K.

OPEN FILES (/F)
  The maximum number of Btrieve files that can be open at one time.
  Default value is 20, the maximum value is 255.

MULTIPLE LOCKS (/L)
  Sets the maximum number of multiple record locks per workstation.

EXPANDED MEMORY (/E)
  With /E specified Btrieve will not use expanded memory.

OVERRIDE CRITICAL ERROR (/O)
  Controls how Btrieve responds to DOS critical errors. With /O,
  Btrieve will return a status code an application.

COMPRESSION BUFFER SIZE (/U)
  Allocates the length of the compression buffer. Range is 1K to 64K in
  one K byte increments.

FILES IN A TRANSACTION (/N)
  Sets the maximum number of files that can be accessed within a
  transaction. Default is 12, range is 1 to 18.

ACTIVATE LOGGING (/A)
  When specified, Btrieve will record every operation that changes a
  file. Used with the rollback option in version 5.10.
