900-GET-UNIQUE-ID

A unique ID is returned to the program in a string representation following industry standards used by DCE and Microsoft’s implementation of GUID’s. Each sub-field is converted to zero-filled hexadecimal digits with the values 10 through 15 represented as lowercase 'a' through 'f' respectively. Hyphens are inserted after the current time in seconds, the lower 2 bytes of UserNbr, the 2 bytes of generation number, and the upper 2 bytes of an unsigned counter. The result is a 36-byte string field in the format of: 00000000-0000-0000-0000-000000000000.

Upon a successful call, the SYSCMD-ERROR will be zero and the SYSCMD-UNIQUE-ID will contain the unique ID. If the call fails, the SYSCMD-ERROR will be set to 1.

Library SYSCMDS
Input No input needed.
Output

SYSCMD-UNIQUE-ID

SYSCMD-ERROR

Programming Example

*       Get Unique ID.
        PERFORM 900-GET-UNIQUE-ID.