Db documentation
----------------

                                 DB directory
                          Copyright 1990 Ross Barnes

Version 1.1

Program size: 2776 bytes
Checksum: BC5Ch

OVERVIEW
--------

DB is a directory containing a database system for the HP48SX.  You can create
any number of databases with one to ? fields in each database.  Once a database
is created you can add and delete records to it.  You can also search for a
string in the database.  You can scroll through the records or jump to the
end or back to the beginning.  Records can be copied to the stack.

The programs in the directory are written to be used from PORT 0, PORT 1
or PORT 2 so it can be accessed from anywhere and doesn't show up in your
directories.  The databases must be in user memory.

PROCEDURE
---------

1.  The version I've put on the board assumes PORT 0 is where it will reside.
    If you want to use it with PORT 1 or 2 you must edit the programs in
    the directory changing the ":0:" to ":1:" or ":2".  Using a text editor
    on a PC to change the entire directory would be a fast way.

2.  Copy the directory DB onto your HP 48.

3.  Once the program is set up for the correct port RCL DB to the stack
    and store it under DB in PORT 0,1 or 2.
    e.g. 'DB' [RCL] :0:DB [STO].

4.  To start the program (assuming PORT 0) type :0:{DB XQDB} [EVAL].

5.  It prompts you for a database name:
    New database name?
    Include .DB in name

6.  Enter a name and end it with .DB, e.g. "TELE.DB" [ENTER].  You do not
    need to use quotes around name.

7.  It prompts you for the number of fields:
    Number of fields?

8.  Enter a number from 1 to ?.  I would suggest keeping the number of fields
    5 or less as that is the most that will display on the screen at one
    time.  If 3 was entered the display would now have:

    FLD1
    FLD2
    FLD3

    in the display.  The menu keys displayed are discussed below.

9.  At this time the menu keys are active.

-------------------------------------------------------------------------------
NOTE: The variable DBINFO is created if it does not already exist
in the current directory.  This variable contains a list consisting of the
current active database in the current directory, the current record number
and the last find string.  If the message "DBINFO is invalid" occurs when
running the program purge the DBINFO variable and rerun the program.  If a
GET error occurs when you try to run the program then check the DBINFO
variable and if invalid purge it and rerun the program.
-------------------------------------------------------------------------------

MENU KEYS
---------

{USE}   --Finds all the variables with .DB in the name, prompts for a new
          database to use.  The default input is the current database.

[left-shift]{USE} --Creates a new database, prompting for the name and the
                    number of fields in the new database.  This database
                    is now the current database.

{FIND}  --Prompts for a find string and searches sequentially from next
          record to the end of the database.  The last find string is
          remembered for the current database.  To search the entire database
          [right-shift][up-arrow] first to go to the top then FIND.  The
          search IS CASE SENSITIVE.  Using only uppercase letters in the
          database is probably a good idea.

{EDIT}  --Brings up the first field name prompt with a ? at the end.  The
          current value of the field is the default input.  Fields are prompted
          for one after the other.

{ADD}   --A new empty record is added to the database and the new record
          is edited as in {EDIT}.

{DEL}   --The delete is confirmed and the record is deleted.  You CANNOT
          undo the delete.

{EXIT}  --This exits the program.

[ENTER] --Copies the current record to the stack.

[up arrow]   --Move up one record in current database.

[down arrow] --Move down one record in current database.

[right-shift][up arrow]   --Moves to top of current database.

[right-shift][down arrow] --Moves to bottom of current database.

HELPFUL HINTS
-------------

By including the following in the CST variable in the HOME directory
{ "DB" << :0: { DB XQDB } >> } you can run the database program from anywhere
with only a couple of keystrokes.

Don't forget that the DB directory in PORT 0, 1, 2 is not backed up with
ARCHIVE.

Improvements I would like to make:

- Remove the case sensitivity from the FIND.  I wrote an upper case function
  but it slowed down the FIND too much.
- Use databases in independent memory (PORT 0,1 or 2).
- Speed up FIND.
- Improve display of records

Please let me know if any problems are found installing or using this system.
I also welcome questions, suggestions for improvements or just a comment to
tell me how much you dislike or like it.

Ross Barnes
8412 N. Boone #104
Kansas City, MO 64155

(816) 436-2605 evenings
(913) 967-2650 days
