IS MISSING and IS NOT MISSING Operators in SAS Programming
-
IS MISSING Operator: Selecting Missing Values
Task 1: Suppose you want to select only those observations in which students did not fill their section information.
data readin;inputname$Section$ Score;cards;Raj A 80Atul . 77Priya B 45Sandeep A 95Rahul . 84Shreya . 44;run;data readin1;setreadin;whereSectionismissing;run;chevron_rightfilter_none
Where Section is missing => This would tell SAS to select missing values for variable SECTION.
-
IS NOT MISSING Operator: Selecting Non-Missing Values
Task 2: Suppose you want to select only those observations in which students filled their section information.
data readin;inputname$Section$ Score;cards;Raj A 80Atul . 77Priya B 45Sandeep A 95Rahul . 84Shreya C 44;run;data readin1;setreadin;whereSectionisnotmissing;run;chevron_rightfilter_noneWhere Section is not missing => This would tell SAS to select non-missing values.
The NOT operator can be used with WHERE statement in many other ways:
-
where the section is not missing and the score is missing;
-
where not (score in (34, 44, 84));
-
where not (Score between 50 and 90);
-
where NOT(Section EQ “A”);
-
Recommended Posts:
- Contains and Between-And operators in SAS Programming
- What is the difference between = (Assignment) and == (Equal to) operators
- Like Operator in SAS Programming
- If-Then-Else statement in SAS Programming
- Introduction to SAS programming
- Where Statement in SAS Programming
- Use of FLAG in programming
- Introduction to Swift Programming
- Introduction to Programming Languages
- Swift Programming Language
- Which Programming Language to Choose?
- Object-Oriented Programming in Ruby | Set 1
- How to Create or Modify a Variable in SAS Programming?
- How to drop variables from a dataset in SAS Programming?
- Object Oriented Programming in Ruby | Set-2
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.





