

                           Fil2dbf, version 0.1
          DeskMate 3 database to dBASE III/IV conversion program
                         (c) 1997 Jeffrey L. Hayes


Contents
--------

Description
Installation
Usage
If Something Goes Wrong


Description
-----------

FIL2DBF.PDM is a program to convert DeskMate 3.0x databases (from Filer, 
Address Book, etc.) to dBASE format, for importing into other programs.

Also included in this archive is DBREPAIR.PDM, a program from Tandy 
Corporation used to fix corrupted DeskMate database files.  The program is 
distributed free, so I assume they would have no problem with my including 
it.  See file DBREPAIR.TXT in this archive for their notes on Dbrepair.

These programs require either DeskMate 3.0x, or a DeskMate 3.0x runtime 
available separately (see below).


Installation
------------

To install under DeskMate 3.0x, simply place FIL2DBF.PDM and DBREPAIR.PDM 
in your main DeskMate directory.

If you do not have DeskMate 3.0x, you will need the DeskMate runtime for 
Fil2dbf.  It should be in a separate archive on the same site where you got 
this.  If not, you can get it from me at:

    ftp://ftp.agate.net/users/01935/tandy1000/deskmate/f2ddos.zip

Create a directory for the runtime, place that directory in your PATH, and 
place both the runtime files and the files from this archive in that 
directory.

Do not install the runtime version if you have DeskMate 3.  Intermittent 
lockups can result as the runtime and DeskMate interact with each other.  
The runtime version is only for people who do not have DeskMate installed.


Usage
-----

Fil2dbf is a fairly straightforward program.  There is no online help or 
tutorial for it, but the messages displayed should guide you through quite 
nicely.

To run the program from DeskMate, select it from the Programs listbox in 
DeskTop, or select Run... from the F2 File menu.  If you like, you can also 
create a listbox for Fil2dbf.  In the listbox definition, set the startup 
directory to the place where you keep your DeskMate databases, and set the 
extension to "FIL" (you can still convert other file types).  With a 
listbox defined, you can convert any file displayed in the box by double- 
clicking on it.

If you run Fil2dbf from the Run... box, you can specify up to two filenames 
on the "Data File" line.  The first file is the name of the DeskMate 
database you wish to convert, the second is the name of the converted dBASE 
file.  Either can be a path.  If you do not specify both files, you will be 
prompted for one or both.

To run the program from DOS (using the runtime), simply type FIL2DBF at the 
DOS prompt.  Note that Fil2dbf will not run properly if it is not in the 
PATH.  You cannot enter filenames on the command line when running from 
DOS; instead, Fil2dbf will prompt you for them.

Under DOS only, Fil2dbf will ask if you want to run Setup to select a mouse 
driver.  You only need to do that once.  Note that if you already have a 
mouse driver loaded (MOUSE.COM or MOUSE.SYS), it may work out of the box 
(to use MOUSE.COM or MOUSE.SYS, select "Other mouse" in Setup, which may be 
the default).  If your mouse is already working, just hit <esc> or click on 
CANCEL.  Do not bother with the other stuff in Setup, unless you want to 
change the screen colors.

If you did not specify an input file (either by running from a listbox, or 
via the Run... box), you will be prompted for one.  You can either type a 
path in the editfield at the top, or select a file from the list displayed.  
By default, files with the extension "FIL" (Filer database files) are 
displayed.  To display other files, change the extension (change it to "*" 
to display all files).  To change directories or drives, select the drive 
or directory from the list, and a new list will be displayed.

If you are running from DOS and are unfamiliar with DeskMate, <tab> moves 
between items in a box, <space> presses a button when the focus is on it, 
<enter> presses "OK", and <esc> presses "CANCEL".  Use <up arrow>, <down 
arrow>, <page up>, and <page down> to select from a list.  In an editfield, 
you can use <backspace>, <delete>, <home>, and <end> to edit your 
selection.  It's really pretty much the same as Windows :-).

After you select an input file, just follow the prompts.  The default for 
the output file is the input filename, with a ".DBF" extension (the 
standard extension for a dBASE file), with the same drive and path as the 
input file.  Change the displayed path if you want the output file to go 
someplace else.

After you give the output filename, you will be asked which table in the 
input file to convert.  There will be at least two tables in the file.  
Normally, the table you want is DATA, but you can convert other tables if 
you want to see what's in them.  Not every database will have a DATA table.  
You are not allowed to convert DBCOLS, however; that is a special table for 
internal use of the DeskMate database manager.

When the table has been selected, Fil2dbf will check the columns in the 
table.  Each column in the input table will be converted to a corresponding 
field in the output dBASE file.  For each column, you will be asked to give 
a name for the dBASE field.  Give names you will remember so the output 
database will make some sense.

In the case of numeric columns/fields, you will be asked for the number of 
decimal places.  You might think that you set that in Filer, but in fact 
the format specification in Filer can't really be reliably used (you can 
put any characters you want in a format).  The records in the DATA table of 
a Filer file only include numbers with no decimal points, so if you have 
some dollar values in your database (for example), you will want to set the 
decimal points for the output field to 2.

After that, the database will convert, and you will return to either 
DeskMate or the DOS prompt.


If Something Goes Wrong
-----------------------

If you are using the DOS runtime, and FIL2DBF.EXE fails to correctly detect 
your video, you can use DMVID.EXE to bypass the video detection.  See 
DMVID.DOC in the runtime archive for more information.

Under DOS, the setup information (mouse driver, screen colors, video mode) 
is stored in a file called DMCSR.CFG, which is saved in the root directory 
on drive C:.  If that is a problem (C: is a network drive and is not 
writeable, for example), you can use the DMCONFIG environment variable to 
cause it to be saved elsewhere.  For example, if you are on a network and 
are running Fil2dbf from a floppy, you could create a batch file F2D.BAT 
like this:

    SET DMCONFIG=A:\
    SET OLDPATH=%PATH%
    PATH %PATH%;A:\
    FIL2DBF
    PATH %OLDPATH%
    SET DMCONFIG=

Then you would run Fil2dbf by typing F2D at the DOS prompt.

Under DOS, you must either run Fil2dbf from the directory where you 
installed it, or that directory must be in the PATH.  Otherwise, 
FIL2DBF.EXE will search *every single directory* on *every single drive* 
for *every single driver file*.  Eventually, it will run, but on a system 
with a large hard drive, it may take a *very* long time.

In Fil2dbf itself, there are two ways something can go wrong.  First, an 
error can occur during the conversion process.  Second, the conversion can 
go through correctly, but the output file may not be useful.

Regarding the second problem, well, not every DeskMate database is a simple 
affair.  A program may keep its records in a special format that only it 
can read, or it may use multiple tables in inventive ways.  All Fil2dbf 
does is convert the basic database information from one table.  It seems to 
work well for Filer or Address Book databases, not so well for Calendar or 
Home Organizer recipes.  It may be possible to port something like the 
recipe database from Home Organizer to dBASE, but it would involve writing 
a dBASE application, something I leave as an exercise for the class :-).

For the first problem, if Fil2dbf can't convert the database for some 
reason, it will normally tell you the problem and suggest a remedy.  Do 
what it says, and you should be able to get things to go through.

One suggested remedy deserves special mention.  In the event that Fil2dbf 
encounters an error while processing the input file, it will suggest that 
you run Dbrepair to correct it.  If you press "OK", Dbrepair will run after 
Fil2dbf exits.  When the file has been repaired, run Fil2dbf again to 
convert it (under DOS, you will return to Fil2dbf automatically when 
Dbrepair exits).

When Dbrepair starts, press F2 to pull down the File menu, and select 
"Repair Database".  You will be prompted for an input file with a dialog 
box similar to the one in Fil2dbf.  Select the file you were trying to 
convert before, and Dbrepair will try to fix it.

NOTE:  Fil2dbf does not modify the input file, but Dbrepair DOES.  Dbrepair 
will save the original file with an ".OLD" extension, so you can recover if 
Dbrepair makes things worse.  Note, however, that if you run Dbrepair 
twice, the original .OLD file will be overwritten, and the original 
database will be lost.

Sometimes it is not necessary to run Dbrepair.  Sometimes, all you have to 
do to fix a database is run Filer and sort it.  Filer does not back up the 
original file, however.


About the Author
----------------

My name is Jeffrey L. Hayes.  You can contact me by email at:

    tvdog@tvdog.sdi.agate.net

My site is accessible via ftp or WWW:

    http://www.agate.net/~tvdog/
    ftp://ftp.agate.net/users/01935/

I have a bunch of Tandy 1000 stuff there.  Finally, my postal address is:

    Jeffrey L. Hayes
    130 Forest Ave., Lot 1
    Orono, Me. 04473

Special thanks to Chris Yoder, whose ungodly huge and partially corrupt 
Filer database provided the impetus for me to write this program. :-).
