w*z 发帖数: 71 | 1 to input character variables with same prefix, one cannot use
data text;
input n1-n10 $;
datalinse;
smithers michaels gonzalez hurth frank bleigh
rounder joseph peters sam
;
run;
but you can use array do define them first:
data text;
array names{*} $ n1-n10;
array capitals{*} $ c1-c10;
input names{*};
do i=1 to 10;
capitals{i}=upcase(names{i});
end;
datalines;
smithers michaels gonzalez hurth frank bleigh
rounder joseph peters sam
;
run; |
|