On the contrary, working across observations is complicated.
In this post we will put the basics of two statements that allow to communicate information across registers.
retain subject 0;
subject = subject + 1;
input score 1 score 2;
RETAIN presents some problems, specially when dealing with missing values. If a value is missing, RETAIN does not maintain the previous non-missing value.
if subj ne lag(subj) then old = new;
Here, old only changes when there is a new subject.