How to create a GUID (global unique identifier)

psuter

New Member
Dear programmers

Is there a possibility to create a GUID (global unique identifier) using progess language?
For example, on a microsoft sql server platform these is done by using NewID().


Pascal
 

psuter

New Member
Hello Norman

It sounds stupid, but could you give me an example
of code how to use this bat-file from within progress in order to receive a new GUID number?

Thanks Pascal
 
Try this

DEF VAR cmess AS CHAR NO-UNDO.
DEF VAR cgenuuid AS CHAR NO-UNDO.
INPUT THROUGH genuuid.
IMPORT cmess.
IMPORT cgenuuid.
DISPLAY cgenuuid FORMAT "X(70)".
INPUT CLOSE.

or this from Windows

DEF VAR cFile AS CHAR NO-UNDO.
DEF VAR cCommand AS CHAR NO-UNDO.
DEF VAR cgenuuid AS CHAR NO-UNDO.
ASSIGN cFile = "C:\temp\genuuid.txt"
cCommand = "genuuid > "
+ cFile.
DOS SILENT VALUE(cCommand).
INPUT FROM VALUE(cFile).
IMPORT cgenuuid.
INPUT CLOSE.
MESSAGE cgenuuid VIEW-AS ALERT-BOX.
 
Top