Getting Started with the DATA Step Hash Object

A time consuming part of many SAS® programs is looking up a value from one data set in another data set. SAS 6 lookup methods, like SET with KEY= or a format, are good for many applications. However, in SAS 9, there is a better tool, the DATA Step hash object. The hash object provides a fast, easy way to perform lookups without sorting or indexing. This paper introduces the hash object, examines a few common hash object methods, compares SAS 6 techniques with the hash object, and builds rules of thumb for when to apply this new technology to your programs.