SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3

Returns the first non-missing value from a list of character arguments.

Category: Character

Syntax

COALESCEC ( argument-1 < ... , argument-n >)

Arguments

argument

Details

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.

Comparisons

The COALESCEC function searches character arguments, whereas the COALESCE function searches numeric arguments.

Examples

SAS Statements

Results

COALESCEC( ' ' , ' Hello ' )

Hello

COALESCEC ( ' ' , ' Goodbye ' , ' Hello ' )

Goodbye

See Also

Function:

Категории