Understanding How Duplicate BY Variables Affect File Update
How the DATA Step Processes Duplicate BY Variables
When you use a BY statement
with MODIFY, both the master and the transaction data sets can have
observations with duplicate values of BY variables. Neither the master
nor the transaction data set needs to be sorted, because BY-group
processing uses dynamic WHERE processing to find an observation in
the master data set.
The DATA step processes
duplicate observations in the following ways:
-
If duplicate BY values exist in the master data set, then MODIFY applies the current transaction to the first occurrence in the master data set.
-
If duplicate BY values exist in the transaction data set, then the observations are applied one ...
Get Step-by-Step Programming with Base SAS 9.4 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.