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
how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?
what is program data vector? : Sas-administrator
what is snowflake schema? : Sas-di
Describe the function and untility of the most difficult SAS macro that you have written.
Enlist the functions performed by sas.
Describe 5 ways to do a “table lookup” in SAS?
What is interleaving in SAS?
State the difference between INFORMAT and FORMAT ?
What is the function of Stop statement in a SAS Program?
How to create a permanent sas data set?
What does proc print, and proc contents are used for?
Explain how you can debug and test your SAS program?
What is the length assigned to the target variable by the scan function?
Describe a time when you were really stuck on a problem and how you solved it?
Name any two sas spawners? : sas-grid-administration