The cl-db3 Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-db3 Reference Manual

This is the cl-db3 Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:14:14 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

DB3

A lib to read dbf files version 3.

Database file structure

The structure of a dBASE III database file is composed of a header and data records. The layout is given below.

dBASE III DATABASE FILE HEADER:

+---------+-------------------+---------------------------------+
|  BYTE   |     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) in binary format    |
+---------+-------------------+---------------------------------+
|  4-7    |  32 bit number    | number of records in data file  |
+---------+-------------------+---------------------------------+
|  8-9    |  16 bit number    | length of header structure      |
+---------+-------------------+---------------------------------+
|  10-11  |  16 bit number    | length of the record            |
+---------+-------------------+---------------------------------+
|  12-31  |  20 bytes         | reserved bytes (version 1.00)   |
+---------+-------------------+---------------------------------+
|  32-n   |  32 bytes each    | field descriptor array          |
|         |                   |  (see below)                    | --+
+---------+-------------------+---------------------------------+   |
|  n+1    |  1 byte           | 0DH as the field terminator     |   |
+---------+-------------------+---------------------------------+   |
                                                                    |
                                                                    |
A FIELD DESCRIPTOR:      <------------------------------------------+

+---------+-------------------+---------------------------------+
|  BYTE   |     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)     |
+---------+-------------------+---------------------------------+
|  16     |  1 byte           | field length in binary          |
+---------+-------------------+---------------------------------+
|  17     |  1 byte           | field decimal count in binary   |
+---------+-------------------+---------------------------------+
|  18-31  |  14 bytes         | reserved bytes (version 1.00)   |
+---------+-------------------+---------------------------------+

The data records are layed out as follows:

  1. Data records are preceeded by one byte that is a space (20H) if the record is not deleted and an asterisk (2AH) if it is deleted.

  2. Data fields are packed into records with no field separators or record terminators.

  3. Data types are stored in ASCII format as follows:

DATA TYPE DATA RECORD STORAGE


Character (ASCII characters) Numeric - . 0 1 2 3 4 5 6 7 8 9 Logical ? Y y N n T t F f (? when not initialized) Memo (10 digits representing a .DBT block number) Date (8 digits in YYYYMMDD format, such as 19840704 for July 4, 1984)


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 db3

Author

Xach

License

WTFPL

Description

DB3 file reader

Source

db3.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 db3.asd

Location

db3.asd

Systems

db3 (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 db3/package.lisp

Parent

db3 (system)

Location

package.lisp

Packages

db3


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 db3/db3.lisp

Dependencies
Parent

db3 (system)

Location

db3.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 db3

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *external-format*

External format of the DBF file Character data

Package

db3

Source

db3.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: dump-db3 INPUT OUTPUT
Package

db3

Source

db3.lisp (file)

Function: sample-db3 INPUT OSTREAM &key SAMPLE-SIZE
Package

db3

Source

db3.lisp (file)

Function: write-record RECORD STREAM
Package

db3

Source

db3.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: load-header DB3 STREAM
Package

db3

Methods
Method: load-header (DB3 db3) STREAM
Source

db3.lisp (file)

Generic Function: load-record DB3 STREAM
Package

db3

Methods
Method: load-record (DB3 db3) STREAM
Source

db3.lisp (file)

Generic Function: record-count OBJECT
Generic Function: (setf record-count) NEW-VALUE OBJECT
Package

db3

Methods
Method: record-count (DB3 db3)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf record-count) NEW-VALUE (DB3 db3)

automatically generated writer method

Source

db3.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Classes

Class: db3 ()
Package

db3

Source

db3.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: version-number
Readers

version-number (generic function)

Writers

(setf version-number) (generic function)

Slot: last-update
Readers

last-update (generic function)

Writers

(setf last-update) (generic function)

Slot: record-count
Readers

record-count (generic function)

Writers

(setf record-count) (generic function)

Slot: header-length
Readers

header-length (generic function)

Writers

(setf header-length) (generic function)

Slot: record-length
Readers

record-length (generic function)

Writers

(setf record-length) (generic function)

Slot: fields
Readers

fields (generic function)

Writers

(setf fields) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: ascii->string ARRAY
Package

db3

Source

db3.lisp (file)

Function: asciiz->string ARRAY
Package

db3

Source

db3.lisp (file)

Function: load-field-descriptor STREAM
Package

db3

Source

db3.lisp (file)

Function: read-uint16 STREAM
Package

db3

Source

db3.lisp (file)

Function: read-uint32 STREAM
Package

db3

Source

db3.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Generic functions

Generic Function: convert-field TYPE DATA
Package

db3

Methods
Method: convert-field (TYPE (eql c)) DATA
Source

db3.lisp (file)

Method: convert-field TYPE DATA
Source

db3.lisp (file)

Generic Function: data-address OBJECT
Generic Function: (setf data-address) NEW-VALUE OBJECT
Package

db3

Methods
Method: data-address (DB3-FIELD db3-field)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf data-address) NEW-VALUE (DB3-FIELD db3-field)

automatically generated writer method

Source

db3.lisp (file)

Generic Function: field-count OBJECT
Generic Function: (setf field-count) NEW-VALUE OBJECT
Package

db3

Methods
Method: field-count (DB3 db3)
Source

db3.lisp (file)

Method: field-count (DB3-FIELD db3-field)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf field-count) NEW-VALUE (DB3-FIELD db3-field)

automatically generated writer method

Source

db3.lisp (file)

Generic Function: field-length OBJECT
Generic Function: (setf field-length) NEW-VALUE OBJECT
Package

db3

Methods
Method: field-length (DB3-FIELD db3-field)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf field-length) NEW-VALUE (DB3-FIELD db3-field)

automatically generated writer method

Source

db3.lisp (file)

Generic Function: field-name OBJECT
Generic Function: (setf field-name) NEW-VALUE OBJECT
Package

db3

Methods
Method: field-name (DB3-FIELD db3-field)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf field-name) NEW-VALUE (DB3-FIELD db3-field)

automatically generated writer method

Source

db3.lisp (file)

Generic Function: field-type OBJECT
Generic Function: (setf field-type) NEW-VALUE OBJECT
Package

db3

Methods
Method: field-type (DB3-FIELD db3-field)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf field-type) NEW-VALUE (DB3-FIELD db3-field)

automatically generated writer method

Source

db3.lisp (file)

Generic Function: fields OBJECT
Generic Function: (setf fields) NEW-VALUE OBJECT
Package

db3

Methods
Method: fields (DB3 db3)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf fields) NEW-VALUE (DB3 db3)

automatically generated writer method

Source

db3.lisp (file)

Generic Function: header-length OBJECT
Generic Function: (setf header-length) NEW-VALUE OBJECT
Package

db3

Methods
Method: header-length (DB3 db3)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf header-length) NEW-VALUE (DB3 db3)

automatically generated writer method

Source

db3.lisp (file)

Generic Function: last-update OBJECT
Generic Function: (setf last-update) NEW-VALUE OBJECT
Package

db3

Methods
Method: last-update (DB3 db3)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf last-update) NEW-VALUE (DB3 db3)

automatically generated writer method

Source

db3.lisp (file)

Generic Function: load-field TYPE LENGTH STREAM
Package

db3

Methods
Method: load-field TYPE LENGTH STREAM
Source

db3.lisp (file)

Generic Function: record-length OBJECT
Generic Function: (setf record-length) NEW-VALUE OBJECT
Package

db3

Methods
Method: record-length (DB3 db3)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf record-length) NEW-VALUE (DB3 db3)

automatically generated writer method

Source

db3.lisp (file)

Generic Function: version-number OBJECT
Generic Function: (setf version-number) NEW-VALUE OBJECT
Package

db3

Methods
Method: version-number (DB3 db3)

automatically generated reader method

Source

db3.lisp (file)

Method: (setf version-number) NEW-VALUE (DB3 db3)

automatically generated writer method

Source

db3.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Classes

Class: db3-field ()
Package

db3

Source

db3.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: name
Readers

field-name (generic function)

Writers

(setf field-name) (generic function)

Slot: type
Readers

field-type (generic function)

Writers

(setf field-type) (generic function)

Slot: data-address
Readers

data-address (generic function)

Writers

(setf data-address) (generic function)

Slot: field-length
Readers

field-length (generic function)

Writers

(setf field-length) (generic function)

Slot: field-count
Readers

field-count (generic function)

Writers

(setf field-count) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   D   F   L  
Index Entry  Section

D
db3.asd: The db3<dot>asd file
db3/db3.lisp: The db3/db3<dot>lisp file
db3/package.lisp: The db3/package<dot>lisp file

F
File, Lisp, db3.asd: The db3<dot>asd file
File, Lisp, db3/db3.lisp: The db3/db3<dot>lisp file
File, Lisp, db3/package.lisp: The db3/package<dot>lisp file

L
Lisp File, db3.asd: The db3<dot>asd file
Lisp File, db3/db3.lisp: The db3/db3<dot>lisp file
Lisp File, db3/package.lisp: The db3/package<dot>lisp file

Jump to:   D   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   D   F   G   H   L   M   R   S   V   W  
Index Entry  Section

(
(setf data-address): Internal generic functions
(setf data-address): Internal generic functions
(setf field-count): Internal generic functions
(setf field-count): Internal generic functions
(setf field-length): Internal generic functions
(setf field-length): Internal generic functions
(setf field-name): Internal generic functions
(setf field-name): Internal generic functions
(setf field-type): Internal generic functions
(setf field-type): Internal generic functions
(setf fields): Internal generic functions
(setf fields): Internal generic functions
(setf header-length): Internal generic functions
(setf header-length): Internal generic functions
(setf last-update): Internal generic functions
(setf last-update): Internal generic functions
(setf record-count): Exported generic functions
(setf record-count): Exported generic functions
(setf record-length): Internal generic functions
(setf record-length): Internal generic functions
(setf version-number): Internal generic functions
(setf version-number): Internal generic functions

A
ascii->string: Internal functions
asciiz->string: Internal functions

C
convert-field: Internal generic functions
convert-field: Internal generic functions
convert-field: Internal generic functions

D
data-address: Internal generic functions
data-address: Internal generic functions
dump-db3: Exported functions

F
field-count: Internal generic functions
field-count: Internal generic functions
field-count: Internal generic functions
field-length: Internal generic functions
field-length: Internal generic functions
field-name: Internal generic functions
field-name: Internal generic functions
field-type: Internal generic functions
field-type: Internal generic functions
fields: Internal generic functions
fields: Internal generic functions
Function, ascii->string: Internal functions
Function, asciiz->string: Internal functions
Function, dump-db3: Exported functions
Function, load-field-descriptor: Internal functions
Function, read-uint16: Internal functions
Function, read-uint32: Internal functions
Function, sample-db3: Exported functions
Function, write-record: Exported functions

G
Generic Function, (setf data-address): Internal generic functions
Generic Function, (setf field-count): Internal generic functions
Generic Function, (setf field-length): Internal generic functions
Generic Function, (setf field-name): Internal generic functions
Generic Function, (setf field-type): Internal generic functions
Generic Function, (setf fields): Internal generic functions
Generic Function, (setf header-length): Internal generic functions
Generic Function, (setf last-update): Internal generic functions
Generic Function, (setf record-count): Exported generic functions
Generic Function, (setf record-length): Internal generic functions
Generic Function, (setf version-number): Internal generic functions
Generic Function, convert-field: Internal generic functions
Generic Function, data-address: Internal generic functions
Generic Function, field-count: Internal generic functions
Generic Function, field-length: Internal generic functions
Generic Function, field-name: Internal generic functions
Generic Function, field-type: Internal generic functions
Generic Function, fields: Internal generic functions
Generic Function, header-length: Internal generic functions
Generic Function, last-update: Internal generic functions
Generic Function, load-field: Internal generic functions
Generic Function, load-header: Exported generic functions
Generic Function, load-record: Exported generic functions
Generic Function, record-count: Exported generic functions
Generic Function, record-length: Internal generic functions
Generic Function, version-number: Internal generic functions

H
header-length: Internal generic functions
header-length: Internal generic functions

L
last-update: Internal generic functions
last-update: Internal generic functions
load-field: Internal generic functions
load-field: Internal generic functions
load-field-descriptor: Internal functions
load-header: Exported generic functions
load-header: Exported generic functions
load-record: Exported generic functions
load-record: Exported generic functions

M
Method, (setf data-address): Internal generic functions
Method, (setf field-count): Internal generic functions
Method, (setf field-length): Internal generic functions
Method, (setf field-name): Internal generic functions
Method, (setf field-type): Internal generic functions
Method, (setf fields): Internal generic functions
Method, (setf header-length): Internal generic functions
Method, (setf last-update): Internal generic functions
Method, (setf record-count): Exported generic functions
Method, (setf record-length): Internal generic functions
Method, (setf version-number): Internal generic functions
Method, convert-field: Internal generic functions
Method, convert-field: Internal generic functions
Method, data-address: Internal generic functions
Method, field-count: Internal generic functions
Method, field-count: Internal generic functions
Method, field-length: Internal generic functions
Method, field-name: Internal generic functions
Method, field-type: Internal generic functions
Method, fields: Internal generic functions
Method, header-length: Internal generic functions
Method, last-update: Internal generic functions
Method, load-field: Internal generic functions
Method, load-header: Exported generic functions
Method, load-record: Exported generic functions
Method, record-count: Exported generic functions
Method, record-length: Internal generic functions
Method, version-number: Internal generic functions

R
read-uint16: Internal functions
read-uint32: Internal functions
record-count: Exported generic functions
record-count: Exported generic functions
record-length: Internal generic functions
record-length: Internal generic functions

S
sample-db3: Exported functions

V
version-number: Internal generic functions
version-number: Internal generic functions

W
write-record: Exported functions

Jump to:   (  
A   C   D   F   G   H   L   M   R   S   V   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
D   F   H   L   N   R   S   T   V  
Index Entry  Section

*
*external-format*: Exported special variables

D
data-address: Internal classes

F
field-count: Internal classes
field-length: Internal classes
fields: Exported classes

H
header-length: Exported classes

L
last-update: Exported classes

N
name: Internal classes

R
record-count: Exported classes
record-length: Exported classes

S
Slot, data-address: Internal classes
Slot, field-count: Internal classes
Slot, field-length: Internal classes
Slot, fields: Exported classes
Slot, header-length: Exported classes
Slot, last-update: Exported classes
Slot, name: Internal classes
Slot, record-count: Exported classes
Slot, record-length: Exported classes
Slot, type: Internal classes
Slot, version-number: Exported classes
Special Variable, *external-format*: Exported special variables

T
type: Internal classes

V
version-number: Exported classes

Jump to:   *  
D   F   H   L   N   R   S   T   V  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   D   P   S  
Index Entry  Section

C
Class, db3: Exported classes
Class, db3-field: Internal classes

D
db3: The db3 system
db3: The db3 package
db3: Exported classes
db3-field: Internal classes

P
Package, db3: The db3 package

S
System, db3: The db3 system

Jump to:   C   D   P   S