Previous Page | Next Page

Functions and CALL Routines

MISSING Function



Returns a numeric result that indicates whether the argument contains a missing value.
Category: Descriptive Statistics
Category: Character
Restriction: I18N Level 2

Syntax
Arguments
Details
Comparisons
Examples
See Also

Syntax

MISSING(numeric-expression | character-expression)


Arguments

numeric-expression

specifies a numeric constant, variable, or expression.

character-expression

specifies a character constant, variable, or expression.


Details


Comparisons

The MISSING function can have only one argument. The CMISS function can have multiple arguments and returns a count of the missing values. The NMISS function requires numeric arguments and returns the number of missing values in the list of arguments.


Examples

This example uses the MISSING function to check whether the input variables contain missing values.

data values;
   input @1 var1 3. @5 var2 3.;
   if missing(var1) then
      do;
         put 'Variable 1 is Missing.';
      end;
   else if missing(var2) then
      do;
         put 'Variable 2 is Missing.';
      end;
   datalines;
127
988 195
;

run;

SAS writes the following output to the log:

Variable 2 is Missing.


See Also

Functions and CALL Routines:

CMISS Function

NMISS Function

CALL MISSING Routine

Previous Page | Next Page | Top of Page