Example 4.2 Performing a Table Lookup in a Small Lookup Data Set
Goal
Perform a table lookup based on more than one key where the lookup data set is small and not indexed. Subset the observations from the primary data set into one of two output data sets based on specific criteria that are supplied by the lookup data set.
Example Features
Featured Step | DATA step |
Featured Step Options and Statements | SET statement, NOBS= option Two-dimensional arrays |
Related Technique | Hash object in the DATA step |
A Closer Look | Processing the Two-Dimensional Array WT Understanding Temporary Arrays |
Input Data Sets
Data set BTEAM contains data on team members' height, weight, and body type.
BTEAM Obs lname gender height weight type 1 Adams M 67 160 2 2 Alexander M 69 ...
Get Combining and Modifying SAS® Data Sets: Examples Second 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.