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.3 Performing a Table Lookup in a Large, Non-Indexed Lookup Data Set

Goal

Efficiently combine two data sets when one is relatively large and not indexed and whose retrieved values remain fairly constant.

Example Features

Featured StepPROC FORMAT and DATA step
Featured Step Options and StatementsPROC FORMAT CNTLIN= option DATA step: PUT function, END= data set option
Related TechniqueHash object in the DATA step
A Closer LookUsing Formats to Perform a Table Lookup Building a Format Dynamically with CNTLIN=

Input Data Sets

PROVIDERS contains information about providers in a healthcare system. The first 12 of 279 observations are presented.

                           PROVIDERS

     provider_  provider_                            provider_
 Obs    id        name     specialty                   type 1 0025 Davis, WU Family Medicine ...

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