regarding the following Q:
This project will use data set cert.input08a and cert.input08b. ... Both data sets contain a common numeric variable named ID. Write a program that will use a SAS DATA Step to:
◦ Combine data sets cert.input08a and cert.input08b by matching values of the ID variable.
the answer is given as:
proc sort data=cert.input08a out=work.input08a;
by ID;
run;
proc sort data=cert.input08b out=work.input08b;
by ID;
run;
data results.match08 results.nomatch08 (drop=ex: );
merge work.input08a (in=a) work.input08b (in=b);
by ID;
if a and b then output results.match08;
else output results.nomatch08;
run;
but this would lead to a note in the log: 'merge statement has more than one data set with repeats of BY variables'
for this reason i would use nodupkey on the sort and it feels to me that the Q is urging a mistake from the programmer - they should be very worried about this note and such a log would not be regarded as 'clean'. Am i right?