Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

I have a dataset concat having variable a b & c. How to rename a b to e & f?

1014


Difference between informat and format?

1090


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

1057


How do you delete duplicate observations in sas?

1069


Differentiate between ceil and floor functions.

1154


Give an example where SAS fails to convert character value to numeric value automatically?

1082


Difference between nodup and nodupkey options?

1187


What is the maximum length of the macro variable?

1177


What’s the difference between var b1 – b3 and var b1 — b3?

1358


In sas, what are the areas that you are most interested in? : sas-grid-administration

1068


how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?

2752


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??

2607


what is study design in while working with SAS? what are screening variables in SAS?

2239


Difference between sum function and using “+” operator?

1147


Explain the difference between informat and format with an example.

1162