How would you code a merge that will write the matches of
both to one data set, the non-matches from the left-most
data set to a second data set, and the non-matches of the
right-most data set to a third data set.
Answer Posted / lakshmi
data data1 data2 data3;
merge left(in-a) right(in=b);
by subjid;
if a and b then output data1;
if a and not b then output data2;
if b and not a then output data3;
run;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Difference between SAS STATA & SPSS?
In sas admin differentiate between roles and capabilities? : sas-grid-administration
Explain the use of proc gplot? : sas-grid-administration
what is proc Index? and what is proc document?
what is the use of proc sql? : Sas programming
List down the reasons for choosing sas over other data analytics tools.
What is a method to debug and test your SAS program?
name the scheduler for scheduling job and explain the scheduler? : Sas-di
for whom is sas data integration studio designed? : Sas-di
What is maximum number of rows and cols can be handled in SAS?
what is ae onset date n what is RDS
How to create an external dataset with sas code?
What is maximum storage capability of SAS?
What are the different types of sas functions?
How to create a permanent sas data set?