A Common Mistake
What if you place this assignment statement in your data step: Subject = Subject + 1; What will be the values of Subject in your program. This will not give you what you want.
Example 1 from C&P, page 148.
Data Nogood;
Subject = Subject + 1;
Input score1 score2 @@;
Datalines;
3 4 5 6 7 8
;
Proc Print data=Nogood;
Title "Incorrect Program";
Run;
Output:
Incorrect Program
Obs Subject score1 score2
1 . 3 4
2 . 5 6
3 . 7 8
What is going on here (play compiler!)?