Your variable named CORRECT is not given a starting value, in other words, it is missing. So when you add 1 to missing, you get missing. You could re-write the code like this to eliminate the problem.
Data HW4set;
set mylib.HW4;
if 1 = p1p then correct = sum(correct,1);
If 1 = p2p then correct =sum(correct,1);
run;
OR
Data HW4set;
set mylib.HW4;
correct=0;
if 1 = p1p then correct = correct+1;
If 1 = p2p then correct = correct+1;
run;
--
Paige Miller