UUIDGEN Function

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

Category: Special

Syntax

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

Required Argument

max-warnings

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

Default 1

Optional Argument

binary-result

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

Details

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:
5ab6fa40–426b-4375–bb22–2d0291f43319
A binary result is 16 bytes long.

See Also

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