Working with Lookup Values Outside of SAS Data Sets
Overview
Remember that it is not necessary for your lookup table
to be a SAS data set. Suppose you want to combine the data from your
base table with lookup values that are not stored in a SAS data set.
You can use the following techniques to hardcode lookup values into
your program:
-
the IF-THEN/ELSE statement
-
SAS arrays
-
user-defined SAS formats
-
hash objects.
The IF-THEN/ELSE Statement
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 ...
Get SAS Certification Prep Guide, 4th Edition 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.