Coded Record Structures
Chris Sharman
Chris.Sharman@ccagroup.co.uk
Thu, 21 Jun 2001 09:11:17 +0100
>Also, I was wondering about the efficiency of this technique. When
>retrieving data, is it a sequential read using the code value? Since the
>coded item is common to each variant record in the file, couldn't
>(shouldn't) it be defined as an index for faster reads? Can this element
>be defined both as a "select value" AND as an index?
The sequential read technique is efficient for code values that appear in most
record buckets, and obviously inefficient for rare code values.
Conversely, indexed read is efficient for rare code values, but RMS will choke
somewhat if you run to thousands of duplicate keys. One way to alleviate that
is to use the RMS null value facility to eliminate the commonest key.
Eg: header record, data records (lots), trailer record: make the data record
value the null key, read them sequentially, the rest by key.
>Are select values REQUIRED for coded record structures or will Powerhouse
>(or RMS) allow the user to create a file with more than one variant record
>structure and NO coded values? Such that the programmer could control
>update and retrieval directly via the code.
You could construct your own in the dictionary using redefines and
substructures ( _ and . ).
It's a historical curiosity: I've struggled with it occasionally when required
to handle data someone else has organised in this way. It saves a few bytes at
the expense of extra complexity - that used to be worthwhile, but not for some
years now.
Chris
_______________________________________________________________________
Chris.Sharman@CCAgroup.co.uk http://www.ccagroup.co.uk/
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
-----------------------------------------------------------------------
Any views expressed in this message are those of the sender and not
necessarily those of CCA Group. The unauthorized use, disclosure,
copying or alteration of this message is forbidden. The contents of
this message may be confidential and/or privileged, copyright CCA Group
and are intended solely for the use of the individual or entity to whom
they are addressed. Whilst this message has been scanned, CCA Group
cannot guarantee that it is virus free or compatible with your systems
and accepts no responsibility for any loss or damage arising from its
use. The recipient is advised to run their own anti-virus software. If
you receive this message in error please contact
postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
from your computer systems.