O'Reilly logo

Step-by-Step Programming with Base SAS 9.4 by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Constructing Conditions

Understanding Construct Conditions

When you use an IF-THEN statement, you ask SAS to make a comparison. SAS must determine whether a value is equal to another value, greater than another value, and so on.
SAS has the following six main comparison operators:
Table 10.1 Comparison Operators
Symbol
Mnemonic Operator
Meaning
=
EQ
equal to
¬=, ^= , ~=
NE
not equal to (the ¬, ^, or ~ symbol, depending on your keyboard)
>
GT
greater than
<
LT
less than
>=
GE
greater than or equal to
<=
LE
less than or equal to
The symbols in the table are based on mathematical symbols. The letter abbreviations, known as mnemonic operators, have the same effect ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required