Incomplete data step will not run, no DATA at the top
The _n_ variable indicates how many times the data step executes, i.e. hits the bottom of the code and starts over.
Where you are using _n_ is in a loop. So the value that it has at the start of the DO loop stays the same until the loop finishes and then hits the second end.
If I understand what you want try this:
data example;
do Group='Placebo', 'Active';
do Subj=1 to 5;
ID+1;
input Score @;
output;
end;
end;
datalines;
250 222 230 210 199
166 183 123 129 234
;
run;
The statement ID+1 implies the ID value is retained across iterations of the data step and each time the statement is encountered in the loop 1 is added.