I am using the below code and somehow it creates UUSUBJID_USE which is not available and gets unintialised variable. Not sure from where it is creating. can any one help me to debug it. %macro inhc;
%let LstCols = %quote(USUBJID SEX AGE RACE WEIGHTBL);
%let totval=%eval(%sysfunc(countc(&LstCols,%str( )))+1);
%let LstCols_u=%sysfunc(tranwrd(&LstCols,SUBJID,USUBJID_USE));
%let LstCols_use=%sysfunc(tranwrd(&LstCols_u.,RACE,RACE_USE));
data inc;
set adam.adsl;
%do i=1 %to &totval;
%if %upcase(%scan(&LstCols_use,&i)) eq %upcase(actarm) %then %do;
patinf=catx("/",patinf,actarm);
if _n_=1 then patlbl=catx("/",patlbl,"treatment");
%end;
%else %do;
patinf=catx("/",patinf,(%scan(&LstCols_use,&i)));
if _n_=1 then patlbl=catx("/",patlbl,vlabel(%scan(&LstCols,&i)));
%end;
%end;
run;
%mend;
%inhc; attaching test data. Log: UUSUBJID_USE=. patlbl=. RACE_USE=. _ERROR_=1 _N_=19 NOTE: Over 100 NOTES, additional NOTES suppressed. NOTE: Invalid numeric data, './.' , at line 3 column 25. WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.
... View more