Newsgroups: bit.listserv.dbase-l
Date:         Fri, 24 Jul 1992 18:30:23 EST
              dialects" <DBASE-L@NMSUVM1.BITNET>
From:         RBOYER2 <rboyer2@IUS.INDIANA.EDU>
Subject:      Re: Dbase 3 / 3+
X-To:         davei%COMP.LANCS.AC.UK@TECMTYVM.MTY.ITESM.MX

:Can someone tell me where I can find the file format description of a Dbase
:          3 / 3+ database file ?
:
:Thanks
:
:Davei (davei@lancaster.ac.uk)

          I've been meaning to look these things up for a long time
          now and just decided I would.  They are listed in the
          Appendix-D of my dBase III+ manual.  I'll copy them here for
          you poor souls without the manual handy.

          Structure of a Database File Header:

          Byte
          Offset   Contents           Meaning
          ==========================================================
          0        1 byte             dBase III version number
                                        (03H without a .dbt file)
                                        (83H with a .dbt file)

          1-3      3 bytes            date of last update
                                        (YY MM DD)

          4-7      32 bit number      number of records in data file

          8-9      16 bit number      number of bytes in the header

          10-11    16 bit number      number of bytes in the record

          12-14    3 bytes            reserved bytes

          15-27    13 bytes           reserved for multi-user

          28-31    20 bytes           reserved bytes

          32-n     32 bytes each      field descriptor array
                                        (see below)

          n+1      1 byte             0DH as the field terminator


          A Field Descriptor:

          Byte
          Offset   Contents           Meaning
          ==========================================================
          0-10     11 bytes           field name in ASCII zero-filled

          11       1 byte             field type in ASCII
                                        (C N L D or M)

          12-15    32 bit number      field data address
                                        (address is set in memory;
                                         not useful on disk)

          16       1 byte             field length in binary

          17       1 byte             field decimal count in binary

          18-19    2 bytes            reserved for multi-user

          20       1 byte             work area ID

          21-22    2 bytes            reserved for multi-user

          23       1 byte             SET FIELDS flag

          24-31    8 bytes            reserved bytes

          I am going on 5 hours sleep after 12 hours of madness today
          :-), so if this is a little off;  sorry!

    +---------------------------------------------------------------------+
    | Richard L. Boyer                                     (812) 941-2287 |
    | Operations Supervisor/Programmer & Associate Network Administrator  |
    | Indiana University Southeast | IUS LAN Mail: Rick                   |
    | Computer Services, CV-030    |  Bitnet Mail: Rboyer@Iubacs          |
    | 4201 Grant Line Road         |Internet Mail: Rboyer@Ucs.Indiana.Edu |
    | New Albany, IN  47150 USA    |                                      |
    +---------------------------------------------------------------------+
    |->  Two wrongs do not a right make, but three lefts do! - Wes Rose <-|
    +---------------------------------------------------------------------+