Chapter 7: Performing Conditional Processing

7.1  Introduction

7.2  The IF and ELSE IF Statements

7.3  The Subsetting IF Statement

7.4  The IN Operator

7.5  Using a SELECT Statement for Logical Tests

7.6  Using Boolean Logic (AND, OR, and NOT Operators)

7.7  A Caution When Using Multiple OR Operators

7.8  The WHERE Statement

7.9  Some Useful WHERE Operators

7.10  Problems

 

7.1  Introduction

This chapter describes 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 ...

Get Learning SAS by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.