UUIDGEN Function

Returns the short or binary form of a Universal Unique Identifier (UUID).

Category: Special


UUIDGEN(<max-warnings<,binary-result> > )

Required Argument


specifies an integer value that represents the maximum number of warnings that this function writes to the log.

Default 1

Optional Argument


specifies an integer value that indicates whether this function should return a binary result. Nonzero indicates a binary result should be returned. Zero indicates that a character result should be returned.

Default 0


Length of Returned Variable in a DATA Step

If the UUIDGEN function returns a value to a variable that has not previously been assigned a length, then that variable is given a length of 200 bytes.

The Basics

The UUIDGEN function returns a UUID (a unique value) for each call. The default result is 36 characters long and it looks like this:
A binary result is 16 bytes long.

See Also

Universal Unique Identifiers:
Universal Unique Identifiers in SAS Language Reference: Concepts