Chapter 6: Table Lookup Techniques

Introduction

Task: Performing a one-way table lookup using a MERGE statement

Task: Performing a one-way table lookup using user-defined informats

Task: Creating an INFORMAT using a control data set

Task: Performing a one-way table lookup using a temporary array

Task: Performing a two-way table lookup using a temporary array

Conclusion

Introduction

Table lookup is the process where you use one or more key values, such as an item number, and associate it with another value, such as the item's price. SAS has a variety of ways of performing one-way or multi-way table lookup. One easy and straightforward way is to use a MERGE statement. Other, more efficient methods, such as temporary arrays, formats, or informats, ...

Get Cody's Collection of Popular SAS Programming Tasks and How to Tackle Them 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.