How would you code a merge that will keep only the
observations that have matches from both sets?

Answer Posted / vijay

Dear Guest,
Merge won't accept NODUPKEY option. it is for PROC SORT.
the following code will get only matched observations in
both datasets

data three;merge one (in=a) two (in=b);by **;if a and b;run;

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell e how how dealt with..

1859


What is the difference between class statement and by statement in proc means?

762


How to include or exclude specific variables in a data set?

764


what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming

657


How many data types are there in SAS?

727






what is the difference between nodup and nodupkey options? : Sas programming

735


what is program data vector? : Sas-administrator

709


describe the interaction table in sas di? : Sas-di

693


What is interleaving in SAS?

768


Differentiate between format and informat? : sas-grid-administration

676


i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm

2004


Hi, If anyone has base SAS certification dumps, please share.

1487


How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?

2048


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?

2470


What do you know about symput and symget?

836