Using VMSTIMPESTAMP as part of an index

Chris Sharman chris.sharman at ccagroup.co.uk
Wed Jun 8 03:04:41 CDT 2005


John Stires wrote:
> We need to have a highly accurate (high precision) date/time stamp 
> solely for the purpose of sequentially retrieving records in an RBD 
> database.  A value will never be used in this field to access any 
> given record(s) in this table.  As I say, the only reason for this field 
> is to force a unique key and to facilitate their sequential retrieval.

vmstimestamp counts 100 nano-second intervals, but in chunks of 100000, 
giving a 'real' granularity of centiseconds. This is the best obtainable 
  from the VMS system service routines, by Powerhouse or any other 
application.
It's typically not reliably unique on a busy system.
Solutions might be (1) incrementing the value so that it is unique (you 
wouldn't expect many hits in the same centisecond) or
(2) linking against the kernel to combine the vmstimestamp with one of 
the internal clock registers - although you'd still have to combine with 
(1) to guarantee uniqueness.

If you're willing to forgo uniqueness, vmstimestamp may be good enough, 
depending on whether records with the same key are reliably retrieved in 
chronological order (they are on RMS, but I don't know about Rdb).

Chris


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 at ccagroup.co.uk immediately, destroy any copies and delete it from your computer systems.



More information about the powerh-l mailing list