O'Reilly logo

Combining and Modifying SAS® Data Sets: Examples Second Edition by Michele M. Burlew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 StepDATA step
Featured Step Options and StatementsSET statement, NOBS= option Two-dimensional arrays
Related TechniqueHash object in the DATA step
A Closer LookProcessing 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required