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:
        COUNTER +=1;
        ...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

Reply via email to