UUID

UUID returns a CHARACTER(36) string that is a universally unique identifier that is in version 5 format.

Read syntax diagramSkip visual syntax diagramUUID

The UUID generated by PL/I is a version 5 format UUID per RFC 4122.

The name-space information used to construct the UUID consists of:
  1. System information:
    • CPU count
    • MVS name
    • storage size
    • model and serial
  2. Runtime 64 bit TOD value.
  3. Job name or, if possible, the PID.

The UUID is a SHA1 hash of the above.

If the USAGE(UUID(LOWER)) compiler option is in effect, all alphabetic characters in the returned string will be in lowercase. If the USAGE(UUID(UPPER)) compiler option is in effect, all alphabetic characters in the returned string will be in uppercase.