Wow - what kind of application needs THAT kind of accuracy?!?... <old man
voice> Why I remember when two items writing in the same SECOND was a feat!
</old man voice>
In this case, I don't know how you escape having to do a "READVU" on the
item, and only writing on the ELSE clause, and changing the key if a THEN or
LOCKED happens -- someone else showed using a READV, but you really have to
do a READVU to ensure the items are not hitting at EXACTLY the same time.
BASE.KEY = KEY
SEQCNT = 1
DO.WRITE = 0
LOOP UNTIL DO.WRITE
READVU TESTINGIT FROM FILENAME, KEY, 0 LOCKED
* No need to wait, Drop To Key Update
END THEN
* Need a new key, Drop to Key Update
END ELSE
* Go!
EXIT
END
* Once here, start adding sequence data...
KEY = BASE.KEY:"*":SEQCNT
SEQCNT += 1
REPEAT
WRITE REC ON FILENAME, KEY
D3 has a 'System-Wide' Unique ID generator in their SYSTEM() selectiosn...
U2 does not. Darn it.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Marco Manyevere
> Sent: Thursday, April 24, 2008 7:47 AM
> To: [email protected]
> Subject: Re: [U2] Guaranteed unique sequential keys
>
> David, Allen, Edward, thanks for the suggestions but I want
> to be able to sort theB records in the exact physical order
> in which they occured.B Using the port or pid numbers could
> potentially give me the wrong sequence should two events
> occur within the same millisecond (unless it is ruled out
> that this is not possible).
> Regards, Marco.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/