Previous Page | Next Page

Statements

MISSING Statement



Assigns characters in your input data to represent special missing values for numeric data.
Valid: anywhere
Category: Information

Syntax
Arguments
Details
Comparisons
Examples
See Also

Syntax

MISSING character(s);


Arguments

character

is the value in your input data that represents a special missing value.

Range: Special missing values can be any of the 26 letters of the alphabet (uppercase or lowercase) or the underscore (_).
Tip: You can specify more than one character.

Details

The MISSING statement usually appears within a DATA step, but it is global in scope.


Comparisons

The MISSING= system option allows you to specify a character to be printed when numeric variables contain ordinary missing values (.). If your data contain characters that represent special missing values, such as a or z , do not use the MISSING= option to define them; simply define these values in a MISSING statement.


Examples

With survey data, you might want to identify certain types of missing data. For example, in the data, an A can mean that the respondent is not at home at the time of the survey; an R can mean that the respondent refused to answer. Use the MISSING statement to identify to SAS that the values A and R in the input data lines are to be considered special missing values rather than invalid numeric data values:

data survey;
   missing a r;
   input id answer;
   datalines;
001 2
002 R
003 1
004 A
005 2
;

The resulting data set SURVEY contains exactly the values that are coded in the input data.


See Also

Statement:

UPDATE Statement

System Option:

MISSING= System Option

Previous Page | Next Page | Top of Page