Example 4.3 Performing a Table Lookup in a Large, Non-Indexed Lookup Data Set


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.


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

Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.