All, How about the following (86400 * DATE()) + TIME()):".":GETPID()?. You could use common to check that (86400 * DATE()) + TIME()) is unique within the process, and should probably check that the date has not changed between calling DATE and TIME.
This would be unique system wide I believe. Regards, Phil Walker +64 21 336294 [EMAIL PROTECTED] infocusp limited \\ PO Box 77032, Auckland New Zealand \ www.infocusp.co.nz DISCLAIMER: This electronic message together with any attachments is confidential. If you are not the intended recipient, do not copy, disclose or use the contents in any way. Please also advise us by return e-mail that you have received the message and then please destroy. infocusp limited is not responsible for any changes made to this message and / or any attachments after sending by infocusp limited. We use virus scanning software but exclude all liability for viruses or anything similar in this email or any attachment -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Robert Colquhoun Sent: Thursday, April 29, 2004 1:23 AM To: U2 Users Discussion List Subject: RE: Timestamp Hi Ken, At 07:56 PM 28/04/2004, Ken Wallis wrote: >Of course one could easily write a FUNCTION that concatenated DATE() and >TIME() and used named common to keep track of the last value it gave out to >decide if it needed to add an alpha character and if so, which one, but that What about SYSTEM(12) instead of TIME() ? >would only be unique inside the user's session, not system wide. If you >wanted something that was unique system wide, you might need to go slightly >further than one alpha character and you'd need to involve writing something >away to a file (or at least locking something) to get coordination between >sessions, and there'd be an overhead associated with that of course. Would be much better to have a record in a control file that is regularly incremented. ie in pseudo code: READU COUNTER FROM CONTROL, COUNTERNAME; COUNTER +=1; WRITE COUNTER TO CONTROL,COUNTERNAME ...use COUNTER as you unique id >It would also be quite trivial to knock up a CALLC function that obtained >the value returned by the time() C runtime function which gives the number >of seconds since somewhere in 1970. Computationally that would be the most >efficient, but again, it wouldn't be unique system wide. You should have "Use CALLC to solve your problem" in your sig to save typing it every day. ;-) - Robert -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users