SAS Tutorial - [Filter a data with if-then logic]

This tutorial will discuss about the tools that allow programs to "make decisions" based on data values. For example, you may want to read a value of Age and create a variable that represents age groups. You may want to determine if values for a particular variable are within predefined limits. Programs that perform any of these operations require conditional processing—the ability to make logical decisions based on data values.

We are going to discuss the following topics:

  • Filter with if statement
  • Select Delete rows as per conditions
  • Boolean logic with if statement
  • In function
  • If, else statement
  • Length statement
  • Extra trick with else if
  • In, not in function