Returns the first non-missing value from a list of character arguments.
Category: Character
COALESCEC ( argument-1 < ... , argument-n >)
argument
a character value. argument can be one of the following items:
a character value
a missing character value
the name of a character variable.
COALESCEC accepts one or more character arguments. The COALESCEC function checks the value of each argument in the order in which they are listed and returns the first non-missing value. If only one value is listed, then the COALESCEC function returns the value of that argument. If all the values of all arguments are missing, then the COALESCEC function returns a missing value.
The COALESCEC function searches character arguments, whereas the COALESCE function searches numeric arguments.
SAS Statements | Results |
---|---|
COALESCEC( ' ' , ' Hello ' ) | Hello |
COALESCEC ( ' ' , ' Goodbye ' , ' Hello ' ) | Goodbye |
Function:
'COALESCE Function' on page 441