The data accompanying the two programs fix2ged.exe and ged2fix.exe are sample 
input files and their corresponding grammar files.  Also included is the
program documentation for the two programs.  The *.DOC files contains the 
documentation in wordperfect format and the *.TXT files are in ASCII text 
format.

FIX2GED COMMENTS:

The following is a scenario of what I went through to convert one individuals
Dbase file to GEDCOM.  
   Note: The current FIX2GED does not have all of the
   directives required to produce a lineage linked GEDCOM, but it does
   produce the definition of an individual GEDCOM structure.  This will 
   allow the user to load their unlinked individuals in to a GEDCOM 
   compatible package such as PAF and thus make the linkages using that 
   system.

FIX2GED only handles one field delimiter. The Dbase export contained 
fields within quotes (") and were then separated by commas (,).  Therefore
I had to use an editor to replace the (",") with a ("|"), and then I 
deleted all (").  This particular Dbase file used a numeric value to 
define the SEX, so I replaced, using an editor, the 1 in the sex field 
with an M and the 0 with an F.  

After these edits, (apparently all of the empty fields were initialized with
a 0) I changed all of the remaining (|0|) with (||) to indicate an empty field.  
The result is found in RICH.FIX.  

I then created a grammer file RICH.GRM which defines the input fixed fields
and the GEDCOM output format with the mapping from the fixed fields to the
GEDCOM output structure.

The input file name is handled by the 'file=' parameter in the define_record 
description.  

You can run the FIX2GED sample run by copying RICH.FIX, RICH.GRM, 
and FIX2GED.EXE to a directory.  Then from that directory type
           
           FIX2GED RICH1.GED RICH.GRM <enter>

You should notice in the RICH.GRM file that the file parameter  
is set to RICH.FIX as it should be, remember to change this parameter
when converting other fixed file inputs to GEDCOM. 

The command above produces the output RICH1.GED which should be the same as 
the RICH.GED file.


I am thinking about changing the fixed field parsing so that it can
handle the export formats which includes the data enclosed in quotes and 
then separated by commas.  For example, "BOB","JONES","M","Cove, Cache, UT".


GED2FIX COMMENTS:

I included three xxx.BAT files and test data which demonstrates a some of
the of uses of GEDCOM to fixed formats.

BIRTHDAY.BAT  
This procedure will select the name, the birth date, and the birth place 
from a GEDCOM file and prints it out on one line.  
  
The command in the batch file prints the data to screen.  You can redirect
the output to an output file by changing the command to read as the 
following: 

     GED2FIX my.ged birthv.map > birth.lst   
             This will write the results in a file birth.lst.

     GED2FIX my.ged birthv.map > LPT1: or PRN
             This will write the reults to the printer.

UDEPRINT.BAT
This procedure demonstrates some creative formatting of a GEDCOM file.  
The command can be modified to print to a file or the printer by using the
same redirection procedures as above:
    
    UDEPRINT udetest.ged ude.map > LPT1: or PRN
             This will write the results to the printer.


LINK.BAT
This procedure preserved the GEDCOM pointer so that they could be used as
record relationship pointer in loading the data to a relational database.

Two fixed format files are created as specified in the LINK.MAP file. 
These two files are INDI.FLT and FAM.FLT which can be changed by changing
the "FILE=" parameters in the LINK.MAP file.

The individual record (INDI.FLT) contains a unique record number obtained from the
GEDCOM cross reference ID value of the INDI records.  It also contains
the value corresponding to the family number, one where this individual
appears as a spouse and one where this individual appears as a child.

The family record (FAM.FLT) is a repeating group which contains the family
number, the role, and the unique record number for each individual
participating in the family.

IGI.BAT

This grammar was built to handle data currently extracted from the IGI file
into GEDCOM.  The SLGC DATES and TEMPLE info appears in two different areas.
Some are under the individual and others are under the CHILD tag in the FAM 
record.  This grammer assumes that there is only one CHILD per FAM record 
which is currently the case with the IGI file.

To handle more than one CHILD per family you can use the approach used in
the LINK.BAT approach, if information subordinate to the CHIL tag is not
needed.  If that data is needed then possibly this approach will work,
if you use the put_multi_field directive properly.  In this case the pointer
back to the child as an individual would still be enclosed with the @INDI:PTR@.
and more fields would have to be defined for the additional data.

***********
One should remember that the record numbers are only unique within the 
GEDCOM transmission file, therefore you need to consider how these numbers
need to be changed to make them compatiple with your own database.
************

These programs are from my programmers tool kit rather than a product. 
This means they are quite useful but not overly user friendly.
The error messages are not very specific.  I have found that errors usually 
can be corrected by reviewing the grammar file to find what may be wrong.


Looking forward to hearing your suggestions.
JED

