Example 3.4 Combining Observations by the Formatted Value of a Variable
Perform a fuzzy merge by merging observations from two data sets based on the formatted version of the matching variable rather than the stored value.
|Featured Step||DATA step|
|Featured Step Options and Statements||BY statement with GROUPFORMAT option|
|Related Technique||PROC SQL, left join, ON clause with functions|
Input Data Sets
Data set PRIZES contains a list of four prizes and the last day of the month in which they are awarded. Data set PARTICIPANTS contains a list of participants who will receive a prize dependent on a completion date.
PRIZES Obs completed prize 1 01/31/2009 Restaurant Certificate 2 02/28/2009 Audio Player 3 03/31/2009 Theater Tickets ...