Previous PageNext Page

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;

Datalines;
3 4 5 6 7 8
;
Proc Print data=Nogood;

Run;

Output:

Incorrect Program
Obs Subject score1 score2

1 . 3 4
2 . 5 6
3 . 7 8

What is going on here (play compiler!)?

Previous PageTable Of ContentsNext Page