>>>Hi,
>>>
>>>Who knows a shorter unique result than SYS(2015) delivers?
>>
>>Hi Peter
>>
>>could you explain what those uniqueness is good for?
>>SYS(2015) is not very good uniqe (for example for temp files on a multiuser scenario its not fast enough, I had crashes for non unique filles)
>>
>>This is by the way it is created.
>
>A colleague needs it to prevent that two users simultaneously create a temporary file. But more important is that he has only 5 positions to store the unique part.
>
>My guess is that he can use the right five positions of sys(2015) and delete the temporary file after a while.
>
>He wants to know the algorithm behind sys(2015).
Hi Peter,
I came to same conclusion as oothers. SYS(2015) is fine within the same thread. A parellel thread (same or other machine, even same user) may cause problems
My (for the moment working) solution is to create for every thread I open a new directory in the %temp% folder. I will take care that this will be unique with same TRY CATCH error checking. Any temp file I create will be redirected to this folder. On thread closing I remove the folder.
Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]