/*Make up some dummy data*/
data data;
do obs=1 to 20;
do varnum=1 to 10;
varname='NumVar'!!left(varnum);
value=round(ranuni(123)*10);
output;
end;
end;
run;
proc transpose data=data out=testdata(drop=obs _name_);
by obs;
var value;
id varname;
run;
data testdata;
set testdata;
length refused $ 200;
array numvar {10};
do index=1 to 10;
if numvar{index}=7 then refused=catx(' ',refused,vname(numvar{index}));
end;
run;
proc print data=testdata;
run;
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.