[Info-vax] Large mailboxes - RMS Indexed file internal design

Hein RMS van den Heuvel heinvandenheuvel at gmail.com
Sat Dec 5 13:08:22 EST 2020


On Saturday, December 5, 2020 at 12:45:00 PM UTC-5, Craig A. Berry wrote:
> On 12/5/20 11:02 AM, Hein RMS van den Heuvel wrote: 
> 
> > The record RFA ( = RRV ) can be consider that key to some degree. 
> > It is a GUID of sorts, just too bad they (understandably) picked 16 bits for the ID at the time.
> The BASIC manual claims that the RFA data type is 6 bytes: 
> 
> <http://h30266.www3.hpe.com/odl/vax/progtool/cpqbasic39/bas_ref_001.htm#334dts2_global> 
> 
> So is that the combination of VBN plus the 16-bit ID you are talking about?

Correct. 
Of course it is officially an opaque type one is not supposed to look into.
The structure is somewhat expose as rab$l_rfa0 + rab$w_rfa4 or rab$l_rfa0 variants for rab$w_rfa[3]
Interestingly (to some) it could readily grow to 4 bytes as there is an adjacent unnamed fill word to allow for aligned quad-word moves.

RFA's (Record File Address) For an indexed file is is VBN + ID.
The IDs are handed out sequentially, not in key order, with the bucket header holding the next-ID value.

The RRV's (Record Retrieval Vector) are the same but with a leading flag byte. 
They are the links in the alternate (aka as secondary) keys and not exposed directly.
Interestingly (to some :-), the RRV's can be just the 1 flag byte with no RFA for deleted records in order to keep track on 'read next'.

For a Sequential file the RFA is the VBN plus byte offset for the start of a record.

For Relative files I seem to recall - but not sure anymore - the RFA is just the record number which can be mapped directly to a VBN and offset in a bucket for the (fixed length) record cell flag byte.

Hein



More information about the Info-vax mailing list