Example 7.2 Modifying a Non-Indexed Data Set in Place by Matching by a Common Variable
Goal
Modify a non-indexed master data set in place with transactions supplied in a second data set. Add and delete observations from the master data set. Match the two data sets by variables in common that uniquely identify the observations. The transaction data set can contain duplicate BY values of the variables in common while the master data set does not.
Example Features
Featured Step | DATA step |
Featured Step Options and Statements | MODIFY and BY statements
_IORC_ automatic variable Macro function %SYSRC |
A Closer Look | Controlling When the MODIFY Statement Outputs an Observation Handling Missing Values When Using the MODIFY and BY Statements |
Input Data Sets ...
Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.