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 / reddy
data both left_only right_only;
merge dataset1(in=a) dataset2(in=b);
by variable;
if a and b then output both;
if a and not b then output left_only;
if b and not a then output right_only;
run;
i think these is the easy way of writing the code,if any
one nows other please specify.thanks!
Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
what can you learn from the sas log when debugging? : Sas programming
what are 5 ways to perform a table lookup in sas? : Sas-administrator
what is the Population you used in your project, is it ITT or PP?
What is interleaving in SAS?
What Proc glm does?
How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?
What areas of SAS are you most interested in?
how can you put a "trace" in your program? : Sas programming
How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?
How do dates work in sas?
Mention the difference between ceil and floor functions in sas?
In SAS explain which statement does not perform automatic conversions in comparisons?
If money were no object, what would you like to do?
Give some ways by which you can define the variables to produce the summary report (using proc report)?
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?