[程式] 請問SAS的大量資料垂直合併。
因為需要垂直合併大量資料,
請問各位先進以下語法是哪裡寫錯。
Libname DefDD "G:\Deficiency\ICD\DefDD";
%macro DefDD1klmn;
%do klmn=1996 %to 2011;
%do i= 1 %to 9
proc data=DefDD.defr0&i._dd&klmn.;
out = DefDD.DefDD1&klmn.;
replace;
quit;
proc append base=final data=DefDD.DefDD1&klmn.;
quit;
%end;
%end;
%mend;
%DefDD1klmn;
Log顯示出:
WARNING: Apparent symbolic reference I not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The
condition was: 9 proc import datafile=DefDD.defr0&i._dd&klmn.
ERROR: The %TO value of the %DO I loop is invalid.
ERROR: The macro DEFDD1KLMN will stop executing.
請問是哪裡寫錯??感恩。
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.35.218.5
※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1426574337.A.DB9.html
※ 編輯: MuteSun (114.35.218.5), 03/17/2015 15:07:41
→
03/17 17:51, , 1F
03/17 17:51, 1F
推
03/17 19:04, , 2F
03/17 19:04, 2F
→
03/17 19:06, , 3F
03/17 19:06, 3F
→
03/17 19:06, , 4F
03/17 19:06, 4F
→
03/17 19:07, , 5F
03/17 19:07, 5F