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 do you specify the number of iterations and specific condition within a single do loop?
How will you use the WHO Drug Dictionary for Reporting Clinical Trials?
What do you code to create a macro? : sas-macro
If money were no object, what would you like to do?
Describe a time when you were really stuck on a problem and how you solved it?
what is snowflake schema? : Sas-di
Differentiate between format and informat? : sas-grid-administration
what is sas application server, database server, sas olap server and sas metadata server? : Sas-di
What are pdv and it functions?
Give some ways by which you can define the variables to produce the summary report (using proc report)?
what is proc Index? and what is proc document?
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
AE datasets names? how many types?
explain the difference between proc means and proc summary?
What is the use of function Proc summary?