用sas data step 读入,并转化成sas内部的data; 例如A600000.sas7data,存放在不是work的一个逻辑区下保存。在读入txt文件的时候用的是data step方法,并用macro,一个股票一个股票的读入。这个阶段还好,实际用一个 %do i = 1 to 2036 %end,很快就可以读好。这样每个data有约1500*8 个记录,同时有2036个这样的data。
对sasdata的存储大家能给点建议么?谢谢
<!-- m --><a class="postlink" href="http://bbs.pinggu.org/thread-1015417-1-1.html">http://bbs.pinggu.org/thread-1015417-1-1.html</a><!-- m -->作者: shiyiming 时间: 2012-1-17 23:05 标题: Re: [疑难解惑] 如何提高sas的data step的读取速度 try something like this:
1. read the first one;
2. define a view for the rest one by one, and then append to the first one;
use view but not dataset in the 2nd step could save one reading time for each share.
use append is the key point here.
%macro read;
data one;
* input the first share;
run;
%do i=2 to 2036;
data a_&i/view=a_&i;
*input the &i share here;
run;
proc appand base=one data=a_&i;
run;
%end;
%mend;
%read;作者: shiyiming 时间: 2012-1-22 01:58 标题: Re: [疑难解惑] 如何提高sas的data step的读取速度 Merge multi table in one step.
It should not exceed 1 minutes.
Good luck.