Unique number generator...
Johnson, Tracy
Tracy.Johnson@schaevitz.com
Wed, 15 Aug 2001 09:20:02 -0400
A Powerhouse application called "Visibility" used SYSDATETIME
to achieve unique time stamps on their G/L transactions. (Now
EVERYTHING in Visibility got stamped in the G/L... don't ask why.
This number was also a Key (...shudder.)
Anyway, not only was the number unique, but had the property
of sorting (quite accurately) in chronological order. It there
ever was a race to see whose Update entered the system first,
this was a means to find it.
If I recall correctly, it converted SYSDATETIME into a string.
SYSDATETIME reports up to tenths of a second.
Now I tested this by expanding it out to PIC "^^^^^^^^.^^^^^^^"
OUT SCA 8. This came out to YYYYMMDD.HHMMSSth. The last digit
was always a zero, so it only reported tenths not hundreths.
Now theoretically, as systems get faster and larger, this
method puts an application cap on Transactions Per Minute
benchmarking! Using this method (and language) will put a
600 TP/M limit on whatever you do.
Tracy Johnson
MSI Schaevitz Sensors
>-----Original Message-----
>From: Jeff Hoffman [mailto:wonicon@bigpond.net.au]
>Sent: Tuesday, August 14, 2001 5:49 PM
>To: powerh-l@lists.swau.edu
>Subject: Re: Unique number generator...
>
>
>Chris
>
>Each machine has a random number environment variable or at
>least a process
>ID,
>use getsystemvar to obtain one of these thne just string
>together the date
>time and value.
>
>Jeff
>
>At 01:27 PM 8/14/01 -0400, Chris Gassett wrote:
>>Anyone already have a unique number generater utilizing
>sysdate and systime?
>>
>>POWERHOUSE813D
>>
>>= = = = = = = = = = = = = = = = = = = = = = = = = = = =
>>Mailing list: powerh-l@lists.swau.edu
>>Subscribe: "subscribe" in message body to
>powerh-l-request@lists.swau.edu
>>Unsubscribe: "unsubscribe" in message body to
>powerh-l-request@lists.swau.edu
>>http://lists.swau.edu/mailman/listinfo/powerh-l
>>This list is closed, thus to post to the list you must be a
>subscriber.
>>
>+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>-+-+-+-+-+-+-+
>+ Jeff Hoffman + e-mail:
>wonicon@bigpond.net.au +
>+ Director +
> +
>+ WoniCon Pty Ltd (ABN 93 083 502 630)+
> ,-_|\ +
>+ 21 Prices Circuit + voice: +61 2 9542
>1527 / \ +
>+ Woronora NSW 2232 + fax: +61 2 9521
>3979 \_,-._* +
>+ AUSTRALIA + mobile: 040 790 3929
> v +
>+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>-+-+-+-+-+-+-
>+
>
>= = = = = = = = = = = = = = = = = = = = = = = = = = = =
>Mailing list: powerh-l@lists.swau.edu
>Subscribe: "subscribe" in message body to
>powerh-l-request@lists.swau.edu
>Unsubscribe: "unsubscribe" in message body to
>powerh-l-request@lists.swau.edu
>http://lists.swau.edu/mailman/listinfo/powerh-l
>This list is closed, thus to post to the list you must be a subscriber.
>