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:
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 ...
Get Step-by-Step Programming with Base SAS 9.4 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.