Example 4.5 Performing a Table Lookup When the Lookup Data Set Is Indexed
Combine two data sets by using a table lookup technique that directly accesses the lookup data set through an index on a key variable. This lookup technique is appropriate for a large lookup data set.
|Featured Step||DATA step|
|Featured Step Options and Statements||SET statement, KEY= option Automatic variable_IORC_Macro function %SYSRC|
|Related Technique||PROC SQL, INNER JOIN, ON clause, subqueries|
Input Data Sets
Data set INVOICES contains a list of invoices for five insurance policies. Data set POLICIES contains data for 12 policy holders.
INVOICES Obs id salesdate amount 1 JL80SHJ0981I 05/01/2009 $543.22 2 LZJ4NWZOPH1W 05/01/2009 $910.09 3 6VIKYDYXMC8I ...