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 / vipin choudhary
Assume the common variable in both of the old datasets
is "name".
Data One two three;
merge old(in = in1) old1(in = in2);
by name;
if in1 and in2 then output one;
if in1 then output two;
if in1 = 0 and in2 = 1 then output three;
run
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How would you determine the number of missing or nonmissing values in computations?
what is the purpose of _error_? : Sas programming
What are the default statistics that proc means produce?
Do you know the features of sas?
how would you determine the number of missing or nonmissing values in computations? : Sas programming
What are the data types in sas?
Name few SAS functions?
This entry was posted in General. Bookmark the permalink. Post a comment or leave
Describe what are the different levels of administrative users in sas? : sas-grid-administration
How do you delete duplicate observations in sas?
what can you learn from the sas log when debugging? : Sas programming
how to debug and test the sas program? : Sas-administrator
Differences between where and if statement?
explain the difference between proc means and proc summary?
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?