为了把4个dataset 合并我用了宏来append这4个dataset, 之前用了几次都行,今天头几次也行,但是后来就老出错
(同样的data,同样的syntax,什么都没变过)我不知道是哪里错了,难道是run了太多次?谁清楚原因,谢了~
错误显示为:
while r(eof)==0 { /* while you're not at the end of the file*/
program error: code follows on the same line as open brace
......
}
unrecognized command: } invalid command name
我的syntax:
cd G:\create
! dir *.dta /a-d /b >G:\SDSU\Semester3\Econ740\Paper\Data\create\filelist.txt
file open myfile using "G:\SDSU\Semester3\Econ740\Paper\Data\create\filelist.txt", read
file read myfile line
use `line'
save master_data, replace
file read myfile line
while r(eof)==0 { /* while you're not at the end of the file*/
append using `line'
save master_data, replace
file read myfile line
}
file close myfile
save G:\create1.dta