HP3000-L Archives

March 2005, Week 2

HP3000-L@RAVEN.UTC.EDU

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

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

Print Reply
Subject:
From:
Jim Phillips <[log in to unmask]>
Reply To:
Jim Phillips <[log in to unmask]>
Date:
Fri, 11 Mar 2005 12:17:30 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (56 lines)
Okay, I've been poring over the docs at
http://docs.hp.com/en/30391-90010/ch11.html and I'm at
a loss as to how I can *easily* use BTrees.  I've been
using Superdex up till now, but when we moved to a new
machine the SIMAINT quit working, so I figured, "Well,
it's high time to move on to the BTrees anyway".  I
can't believe my situation is not exactly why BTrees
were implemented, and I don't see any easy way to make
them work.

My situation is that I have a DETAIL data set
(CUSTOMERS) with two keys that I'd like to index so I
can retrieve the records generically:  NUMBER and
NAME.  NUMBER is a 10-digit number and NAME is a
30-character alpha field, but these are both X fields.
 Using Superdex, I just implemented the "special"
DBFIND modes for TPI and processed against the detail
data set as usual (DBFIND, DBGET mode 4/5/6, etc).
Since both of these are tied to automatic masters, I
used DBUTIL to ADDINDEX them (the auto masters) in
prepartion for using native BTrees.

But the execution leaves something to be desired.

A DBFIND against the detail set using the NUMBER path
and a key of "00009500@" (all customers whose number
begins with "00009500") fails miserably.  A DBFIND
against the NUMBER automatic master works, but then I
have to DBGET the automatic master record and
DBFIND/DBGET to the CUSTOMER set (using the key just
retrieved from the master) in order to get the
record(s) I want.  Then when I've finished with number
"0000950000" (the first record returned), I have to
DBGET the next automatic master record and
DBFIND/DBGET to the CUSTOMER set to get the next
record.  It gets even trickier when using the NAME
path (because I know there is only one CUSTOMER record
for each NUMBER, but there may be multiple CUSTOMER
records for each NAME).

Is this the correct method for using BTrees or am I
still in a fog from all the drugs I got last week....

Foggily,
Jim Phillips



__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2