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 / tangyoulei

data new1 new2 new3;
merge old1 (in=one) old2 (in=two);
if one and two then output new1;
else if one and not two then output new2;
else output new3;
run;

Is This Answer Correct ?    16 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is sas olap server? : Sas-di

686


What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?

678


AE datasets names? how many types?

2072


Mention what is SAS data set?

669


Differences between where and if statement?

581






What are the different versions of sas that you have used until now? : sas-grid-administration

728


What is the use of PROC gplot?

634


what is operational data and operational system? : Sas-di

632


State the difference between INFORMAT and FORMAT ?

592


How can you create a macro variable with in data step? : sas-macro

572


What are the functions used for character handling?

637


What is data _null_?

691


which date function advances a date, time or datetime value by a given interval? : Sas programming

590


What are the features of base sas system?

609


How does proc sql work?

611