CMISS Function

Counts the number of missing arguments.

Category:Descriptive Statistics
Restriction:This function is not valid on the CAS server.
Note:This function supports the VARCHAR type.

Syntax

CMISS(argument-1 <, argument-2, …>)

Required Argument

argument

specifies a constant, variable, or expression. Argument can be either a character value or a numeric value.

Details

A character expression is counted as missing if it evaluates to a string that contains all blanks or has a length of zero, except when you use the CMISS function in macro processing. A numeric expression is counted as missing if it evaluates to a numeric missing value: ., ._, .A, …, .Z.
When you use the CMISS function in macro processing, use a period (.) to represent both a character and a numeric missing value. If you use a blank or null value for a character argument, SAS returns an error. Here are three examples that result in an error:
%let macvar=%sysfunc(cmiss(A,%str( )));
%let macvar=%sysfunc(cmiss(A, ));
%let macvar=%sysfunc(cmiss(A,));
Here is the example to use to avoid the error condition:
%let macvar=%sysfunc(cmiss(A,.));

Comparisons

The CMISS function does not convert any argument. The NMISS function converts all arguments to numeric values.

See Also

Last updated: March 16, 2017