现在想通过宏导入,每个TXT文件对应生成一个数据集。
初步设想:
1,在该文件目录下键入dir *.txt /b >ex.txt,将100个txt文件名导入文本文件all.txt中
2.编写宏及程序
%macro a(stockcode);
data a&stockcode;
infile "d:\Level-2 and Topview\0710\All_2007-10-08\Stock_details\&stockcode..txt" firstobs=2;
input code $ cjtime price vol amount;
informat cjtime time.;
format cjtime time.;
run;
%mend a;
%include "d:\Level-2 and Topview\0710\All_2007-10-08\Stock_details\all.txt";
run;
这是一个版友的程序,我编的的和他出不多,借他的来说明一下问题。
他是生成100个数据集,但我需要这一百个txt自己合成一个数据集~
我试过去掉data a&stockcode;中的&stockcode,但是这样只能生成第100个txt的数据集。
请牛人们给我出出主意~怎样才能自动生成一个数据集



雷达卡




京公网安备 11010802022788号







