|
|
6#

楼主 |
发表于 2009-10-27 20:53:49
|
只看该作者
Re: [求助]还是数据查找输出问题
谢谢楼上牛人,现在又出现个问题。
实际上我有15个variable,其中有character的也有numeric,按照楼上的code,运行之后出现:
74 data dif;
75 set samequoteid;
76 by ticker quoteid;
77 array var{*} var1-var15;
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
ERROR: All variables in array list must be the same type, i.e., all numeric or character.
78 array f_var{*} f_var1-f_var15;
79 array dif{*} dif1-dif15;
80 retain f_var1-f_va15;
ERROR: Alphabetic prefixes for enumerated variables (f_var1-f_va15) are different.
81 if first.quoteid then do;
82 do i=1 to 15;
83 f_var(i)=var(i);
WARNING: The array var has the same name as a SAS-supplied or user-defined function. Parenthesized
references involving this name have been treated as array references and not function
references.
84 dif(i)=0;/*??0?????*/
WARNING: The array dif has the same name as a SAS-supplied or user-defined function. Parenthesized
references involving this name have been treated as array references and not function
references.
85 end;
86 end;
87 else do;
88 do i=1 to 15;
89 if f_var(i)=. then dif(i)=0;
90 else dif(i)=var(i)-f_var(i);/*???????*/;
91 end;
92 end;
93 drop i f_:;
94 run;
NOTE: Character values have been converted to numeric values at the places given by:
(Line):(Column).
83:9 90:21
NOTE: The SAS System stopped processing this step because of errors.
请指教...... |
|