I got a dataset with variables RESULTS00-RESULTS36, each with a label with something like 'Result blabla'. Now I want to remove the 'Result' from the label so it will be 'blabla' alone.
%MACRO rem_res(ds);
DATA data2;
SET &ds.;
%DO i=0 %TO 36;
res=TRANWRD(VLABEL(RESULTS0&i.),"Result","");
put res;
CALL SYMPUT('macr_res',res);
%PUT ¯_res.;
LABEL RESULTS0&i. = ¯_res.;
%END;
RUN;
%MEND;
However, using this code it does not recognize the macr_res anymore. Also, it puts just ¯_res., what's wrong?
%MACRO rem_res(ds);
DATA data2;
SET &ds.;
%DO i=0 %TO 36;
res=TRANWRD(VLABEL(RESULTS0&i.),"Result","");
put res;
CALL SYMPUT('macr_res',res);
%PUT ¯_res.;
LABEL RESULTS0&i. = ¯_res.;
%END;
RUN;
%MEND;
However, using this code it does not recognize the macr_res anymore. Also, it puts just ¯_res., what's wrong?