Please write codes to merge two datasets and keep every
record in the first dataset.



Please write codes to merge two datasets and keep every record in the first dataset...

Answer / reshma

proc sort data=dataA;
by commonvar;
run;

proc sort data=dataB;
by commonvar;
run;

data new;
merge dataA (in=a) dataB (in=b);
if a ;
by commonvar;
run;

Is This Answer Correct ?    14 Yes 0 No

Post New Answer

More SAS Interview Questions

Under what circumstances would you code a SELECT construct instead of IF statements?

4 Answers  


Tell me about % include and % eval? : sas-macro

0 Answers  


How do you debug and test your SAS programs? What can you learn from the SAS log when debugging? How do you test for missing values? How would you create multiple observations from a single observation? What are some good SAS programming practices for processing very large data sets? Briefly describe 5 ways to do a "table lookup" in SAS. Why is SAS considered self-documenting? Are you sensitive to code walk-throughs, peer review, or QC review? What other SAS features do you use for error trapping and data validation? How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

2 Answers  


How would you remove a format that has been permanently associated with a variable? ________________

5 Answers   Quintiles, TCS,


How do you control the number of observations and/or variables read or written?

0 Answers  






How can you limit the variables written to output dataset in data step?

0 Answers  


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

0 Answers  


Explain data step in SAS

0 Answers  


how do u identify a macro variable

5 Answers  


How would you keep from overlaying the a SAS set with its sorted version?

4 Answers  


how do the in= variables improve the capability of a merge? : Sas programming

0 Answers  


Difference between informat and format?

0 Answers  


Categories