You already have the answer but just for fun SAS Packages approach with MacroArray package:
data have;
input Name_without_space $32.;
cards;
DWIEYUDOPRIHANTO
STANISURYANTO
SHERLYRITANANSY
HERERAFENAROSSA
;
run;
filename packages "/path/to/my/packages";
%include packages(SPFinit.sas);
%loadPackage(macroArray)
/*
%helpPackage(macroarray,'%array()')
*/
data have2;
set have;
length short_names $ 14;
short_names = 'cek_data_' !! Name_without_space;
run;
%array(ds = have2, vars = short_names|, macarray=Y)
/* %put %do_over(short_names) ; */
data want;
set %do_over(short_names) ;
run;
Bart
... View more