08-24-2012 02:42 AM
while performing the Merge with duplicate value of BY varibales we found that the values of a Column from one Dataset are assigned to all the records of second dataset. Is their any way that i can avoid this so that if the value are their they can be placed and if the record does not have the value/column it should contain blanks.
08-24-2012 03:11 AM
Please share your code, so that we can see which are the BY variables. And which column is that you are having problem with.
Looking at the sample data, I can't see where the value "JDCFC" for LOC should be coming from...?
08-24-2012 03:40 AM
When doing an 1 to many merge most people want the default behavior of SAS. This because they are usually doing a lookup of values.
To force SAS to clear the data vector you can use CALL MISSING statement.
Here is a trivial example.
input id one @@;
1 1 1 2 1 3 2 4 2 5 3 6 4 7
input id two @@;
1 11 2 12 3 13 4 14
merge one two;
call missing (of _all_);