HP3000-L Archives

August 2000, Week 3

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:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Wed, 16 Aug 2000 14:53:36 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (75 lines)
Re:

I just tried:

   DBFIND ("detail dataset", "KEY1", "@")

(KEY1 is the item that's the search key from the B-Tree master).
(The base has BTREEMODE1=ON)

The status shows a total of 7 entries (which is correct, the total # of
entries in the dataset)

Then, DBGET ("detail dataset", mode 6)
successfully returned the last record.

Repeated DBGET mode 6 calls returned successively earlier records from the
detail set, until I got to the earliest alphabetic record.  After that record,
the next DBGET mode 6 returned err 14 (beginning of chain), as expected.

> "Shouldn't I expect to get the last record when I do (BTREEMODE1=ON) DBFIND
> mode 1 arg @ vs indexed-master followed by DBGET mode 6?".

Yes...and I expected that...and got it.

> > >This seems to work, at least partially:  Using FLEET-MASTER
> > as an example,
> > >the DBFIND always works, and despite no record pointers it
> > reports all 10
> > >records on the dataset.  DBGET mode 5 yields the first

BTW, DBFIND mode 21 "@" is faster...because it doesn't determine
the number of matches.

> > >subsequent DBGET mode 5's yield increasing key values.  Once
> > I've done a
> > >DBGET mode 5, a subsequent DBGET mode 6 goes backward (how??
> >  backward read

I didn't try that just now, but it sounds reasonable.

How does backward work?  For DBGET mode 6, if we hit the end of the current
detail chain, we do:

   ffindbykey (current key value);

   fspace (-1);

   fread

This works because FSPACE works in key order, not chronological order.

(The B-Tree stuff (for DBGET on a detail) works by logically combining
one or more chains in the detail into a "superchain".  When a forward DBGET
hits the end of one detail chain, it internally does the equivalent of
a DBFIND on the next detail chain)

> > >in KSAMXL file???).  But DBGET mode 6 immediately after the
> > DBFIND just gets
> > >me status 14, beginning of chain.  Kind of makes sense, but

DBGET on the detail?

That's what I did, and it worked for me.

> > >Are there patches I've overlooked or something?

Ah...I have no idea :)

I was running C.08.00 on 6.5
Also, it worked for me on C.07.04 on 6.0


Stan Sieler                                           [log in to unmask]
www.allegro.com/sieler/wanted/index.html          www.allegro.com/sieler

ATOM RSS1 RSS2