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
I have a dataset concat having variable a b & c. How to rename a b to e & f?
Difference between informat and format?
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable? : sas-macro
How do you delete duplicate observations in sas?
Differentiate between ceil and floor functions.
Give an example where SAS fails to convert character value to numeric value automatically?
Difference between nodup and nodupkey options?
What is the maximum length of the macro variable?
What’s the difference between var b1 – b3 and var b1 — b3?
In sas, what are the areas that you are most interested in? : sas-grid-administration
how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
what is study design in while working with SAS? what are screening variables in SAS?
Difference between sum function and using “+” operator?
Explain the difference between informat and format with an example.