Hello Enginemane44,
It looks like your input dataset should contain an additional variable, say ID, to distinguish two sets of data. Anyway, to solve the problem for the first set of questions you can use the following code:
data a;
input QNUM Rating;
datalines;
1 3.0
2 2.9
3 10.0
5 7.7
6 8.9
7 9.1
9 10.0
10 7.6
;
run;
data t;
do qnum=1 to 10;
output;
end;
run;
data r;
merge a(in=a) t(in=t);
if a and t then output;
if not a and t then output;
by qnum;
run;
Sincerely,