Hi!
I am trying to merge 3 datasets so I divided them into two separate merges.
usubjid column1 column2
1 9 5
2 1 6
3 2 7
3
3
4 5 6
4
4
I have tried without in= options as well. But its not giving the output I need. Below is the output I need duplicates to print.
usubjid column1 column2
1 9 5
2 1 6
3 2 7
3 2 7
3 2 7
4 5 6
4 5 6
4 5 6
I am not getting any errors, however its also not giving the output I need.
Thank you so much in advance for your help!
here is my code:
proc sort data=data1;
by usubjid;
run;
proc sort data=data2;
by usubjid;
run;
proc sort data=data3;
by usubjid;
run;
data MergeD1; (98=obs)
merge data1(in=a) data2;
by usubjid;
if a ;
run;
data MergeD2; (98 obs)
merge MergeD1(in=a) data3;
by usubjid;
if a;
run;
proc print data=MergeD2;
run;