
36 Handbook of SAS
®
DATA Step Programming
In Program 3.8, immediately after the SET statement, the TIME variable is set
to 1. Next, the value from S1 is assigned to the SCORE variable. Now all the
elements for the rst observation in the LONG data set are ready for output-
ting. Before outputting, check whether the SCORE value is missing ornot; if
it is not missing, use the explicit OUTPUT statement to create therst obser-
vation for the LONG data set. Next, assign value 2 to the TIME variable and
assign the value from S2 to SCORE and output the data set again. Similar
processes are repeated; assign 3 to TIME, assign S3 to SCORE, and then ou ...