I am trying to rename the variables based on one array elements in the folloing way,
%let var= class name gender;
data want;
set have;
%global noof;
array point(*)$ %str(&var) ;
a=dim(point);
call symputx('noof',a);
array newvar(&noof);
do i=1 to &noof;
newvar(i)=translate(point(i),',','.');
end;
drop &var;
do i=1 to &noof;
rename newvar(i)=vname(point(i));
end;
run;
I want to rename the new variables to the first array elemets.
LOG:
rename newvar(i)=vname(point(i));
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: -, :, =.
ERROR 76-322: Syntax error, statement will be ignored.