LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Marty Hoag <[log in to unmask]>
Fri, 7 Feb 1992 11:14:06 CST
text/plain (65 lines)
In a private note Hobart said:
>It looks like you have created some databases on your Listserv server
>which are searchable using Listserv's database capabilities, yet
>which are not actual discussion list archives...
He went on to mention that he had asked about it on LSTSRV-L...
 
   Now I'm feeling guilty...   I did see your note(s) to LSTSRV-L and
I have hacked some search routines.  I plead laziness or business for
not responding.  Sorry!
 
   There isn't any doc that I know of except for the REXX code.  Eric
offered me something in French but since I can't read French I passed
on that.  As I recall, I just read the REXX used now in the various db
search routines and hacked that for what I needed.
 
   Basically, each type of search needs a search routine specific for that
type of database.  The DATABASE FILE points to the routine for local
types.  For example, I have a line   HICNEWS LSVDBHN   for the HICNEWS
stuff.  I had meant to make that search finer but never got around to it.
 
   The scheme for databases is not too complex.  As I recall the main
driver for searches is  LSVDBASE EXEC and the various "specific drivers"
all are like  LSVDB* EXEC  (eg. LSVDBNB for notebooks).
 
   The specialized routine has to have several defined entry points for
various options like opening the database (build or update the DBINDEX and
DBNAMES files), refreshing it (actually just erasing the dbindex and
dbnames so on the next open they will be rebuilt), returning the standard
index format (INDEX:), etc.  I don't remember all the details.  I think
by looking at LSVDBASE and LSVDBNB and others you can figure it out...
 
   The key is the fn DBINDEX and fn DBNAMES files.  Basically the
DBNAMES lists each of the flat files to be included in the database.
DBINDEX lists the various fields to be indexed and points back to
DBNAMES to indicate the correct file, starting line in that file for
the entry, etc.  Some data bases may have only one entry in DBNAMES.
Others, like lists with separate notebooks, will have one for each "item".
 
   The thing to remember is that your LSVDB routine will be called by
LSVDBASE as a subroutine to customize the interface to your database.
 
   There are some interesting things you can do.  Recently we had a list
which was very active (for 10-15 year olds in schools) and some of the
recipients could not take the load.  So the owner started sending out
an "index" each day of the mail to the list (as you would get from
a   search * in kidcafe since yy/mm/dd 00:00 until yy/mm/dd 24:00 ).
Then folks could ask for the item they wanted.
 
   Well, we wrote a local command used in the form:
      /ship listname item1 item2 itemi-itemk  etc.
which allows a user to request items from the list using the Item# in the
index output with one command (no // cards needed).  They have seemed to
like that.  We just called LSVDBNB with the option to OPEN the list
database (so it was up to date) and then use the DBINDEX file to find the
entry for the item number (with a generic search like that the item# seems
to be just the record number in the DBINDEX file).  It seems to be working
and the users seem to like it.
 
   There is a lot of potential in the db facilities...  If I had a lot of
time it would be fun to create a more complete description...  But since
REXX is pretty readable there is an "ultimate source" right now (well -
the real ultimate source would be Eric but he is busy too!).
 
      Marty

ATOM RSS1 RSS2