Wondering if some can help, please?
I am trying to create a decoded variable for any list of variables with the code below.
The code below is creating the variables but also throwing some warnings in the log, would it be possible to remove these warnings.
For example, var1=agegrp and var1dc should be agegrpdc.
I have to keep %let statvar statement, as it will be one of the parameters for a macro variable where i add more variables.
%macro dothis;
%let statvr=agegrp gender ;
%do i = 1 %to %sysfunc(countw(&statvr));
%let seq&i. = %scan(&statvr,&i,%str( ));
%let a=dc;
%let s=%str();
%let seqdc&i.=%sysfunc(catx(&s,&seq&i,%nrstr(%superq(a))));
%let var1 = %scan(&statvr,&i,%str( ));
%end;
%mend;
%dothis;
WARNING: Apparent symbolic reference SEQ not resolved.
WARNING: Apparent symbolic reference SEQ not resolved.
WARNING: Apparent symbolic reference SEQ not resolved.
WARNING: Apparent symbolic reference SEQ not resolved.