You should be familiar with the syntax and use of the
IF-THEN/ELSE statement. Overall, this technique is easy to use and
easy to understand. Because of its simplicity and because you can
use other DATA step syntax with it, the IF-THEN/ELSE statement can
be quite versatile as a technique for performing lookup operations.
You can use this technique if your lookup values are not stored in
a data set, and you can use it to handle any of the possible relationships
between your base table and your lookup table. You can use it to retrieve
single or multiple values. For example, you can use DO groups to provide
multiple values based on a condition.
Keep
in mind that this technique requires maintenance. If you expect your
lookup values to change, or you have a large number of lookup values,
or if you use the lookup values in multiple programs, the resources
required for maintaining the IF-THEN/ELSE statements in your programs
might make this technique inappropriate. Also, this technique might
result in a prohibitively long program or even in a program that will
not execute because it times out.