Hi,
I have a dataset with 288 variables whose name is col2 to col289. I want to replace all values with zeros and the code I used is as below.
data want;
set have;
array n{*} Col2-Col289;
do i=1 to dim(n);
if n{i}=1 then n{i}=0;
end;
run;
After I used this program, all values are replaced with zeros but there is one more variable called i. All the values in this column are 288. Can anyone tell me why this variable exists and how can I avoid it? Thanks.