As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Beyond Table Look-up: The Versatile SAS Hash Object

From sasCommunity
Jump to: navigation, search


Soon after the advent of the SAS hash object in Version 9.0, its early adopters realized that its potential functionality is much broader than merely using its fast table look-up capability for file matching. This is because in reality, the hash object is a versatile data storage structure with a roster of standard table operations, such as create, drop, insert, delete, clear, search, retrieve, update, order, and enumerate. Since it is memory-resident and its key-access operations execute in O(1) time, it runs them as fast or faster than other canned SAS techniques, with the added bonus of not having to code around their inherent limitations. Another advantage of the hash object, compared to the methods that had existed before its implementation, is its dynamic, run-time nature and the ability to handle I/O all by itself, independently of the intrinsic statements of a DATA step or DS2 program calling its methods. The hash object operations, or their combination thereof, lend themselves to diverse SAS programming functionalities well beyond the original focus on data search and retrieval. In this paper, which may be thought of as a preview of a SAS book being written by the authors, we aim to present this logical connection using the power of example.

Online Materials

View the pdf for Beyond Table Look-up: The Versatile SAS Hash Object

You can also see the PowerPoint Presentation.

As well as download a a zip file with sample programs.

Please note that the HashOfHash example is not included in PDF for the paper, but is included in the PowerPoint. Likewise many of the examples in the PDF are not included in the PowerPoint.

Contact Info

Please check out Paul's user page as well as Don's user page. You can also email Paul or Don.