Sorry about the code quality, I rarely create datasets from hard coded inputs and I've just been conditioned that a "data" step needs a "run". And yes, I guess my tables should be named dtx 😛 I wanted to merge datasets, then have the if statement apply to the post-merged datasets. SAS (as you point out) does not complete the merge until the 'run' line, and over writes the merged values affected by if for all subsequent rows until the merge value changes. But thank you for the example & explanation. I get how SAS got the result it got. Thanks again.
... View more