Peter,
Tamar has suggested that sys(2015) is not unique across sessions.
She is correct. *Definitely* there can be duplicates between simultaneous instances on a quick server.
You can get around it using Windows handles (that are unique across all sessions)
DECLARE INTEGER GetActiveWindow IN user32
? getactivewindow()
Truncating to 5 characters: integer is only 4 (!) , BINTOC() will return 4 chars but includes chr(0) and other characters not suitable for some uses. In the old days before integer dbf fields (remember those days?!) we used an AllowedCharacter algorithm to convert integer to 4 alphanumeric chars. Hex won't work- 5 characters not enough for Windows handle.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1