由买买提看人间百态

topics

全部话题 - 话题: hurth
(共0页)
w*z
发帖数: 71
1
来自主题: Statistics版 - SAS daily tips
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;
(共0页)