The statement
offset=i;
Is just an assignment statement. So it sets the value of OFFSET to the current value of I.
The purspose seems to store the index into the array of the first non-missing element in the array. So the offset from the begginnig of the list.
So if you array had the series of values :
. . . . 15 23 7 .
Then OFFSET would get set to 5 since the first non-missing value is the 15 in the fifth position.
The statement
I=26;
Is intended to cause the DO loop to end.
You could re-write it like this and it might be a little clearer.
offset=.;
do i=1 to dim(delq) while (offset=.);
if not missing(delq(i)) then offset=i;
end;
Also make sure the name you use in the ARRAY statement matches the name you are using in your array references. This loop is referencing the array named DELQ, but you did not include an ARRAY statement to define that array in the code you posted.
... View more