data one;
input val $9.;
cards;
102102111
108881111
;
data new;
set one;
temp=count(val,'1');
put temp=;
run;
RT