作者MuteSun (啞巴羅傑)
看板Statistics
標題[問題] 請問SAS的大量資料垂直合併。
時間Tue Mar 17 14:38:52 2015
因為需要垂直合併大量資料,
請問各位先進以下語法是哪裡寫錯。
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
→ ASD332: 分號 03/17 17:51
推 tew: proc data??? 03/17 19:04
→ tew: you don't write your porcedure but sas suggest you import 03/17 19:06
→ tew: you can read your log 03/17 19:06
→ tew: and i believe you should use datafile= 03/17 19:07