COALESCEC Function


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

Category: Character

Syntax

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

Arguments

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.

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:

  • 'COALESCE Function' on page 441




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net