You can add a couple of put statements to see what is going on. You can take a look SAS documents about the SAS internal loop for deep understanding.
78 data a;
79 do i=1 to 3;
80 output;
81 end;
82 run;
NOTE: The data set WORK.A has 3 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
83
84 data b;
85 put 'before set=' _N_=;
86 set a ;
87 put 'after set=' _N_=;
88 run;
before set=_N_=1
after set=_N_=1
before set=_N_=2
after set=_N_=2
before set=_N_=3
after set=_N_=3
before set=_N_=4
NOTE: There were 3 observations read from the data set WORK.A.
NOTE: The data set WORK.B has 3 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
|