SAS中文论坛

标题: TXT文件 导入SAS中,最多可以导入多少个变量,可以允许4000个变量吗? [打印本页]

作者: shiyiming    时间: 2011-2-5 09:05
标题: TXT文件 导入SAS中,最多可以导入多少个变量,可以允许4000个变量吗?
我的TXT文件是在MATlab里生成的矩阵,有4000多列,用的菜单上的import data wizard 导入SAS里就会有4000多个变量,导了一下午数据都没有进去,请问大家是不是这样不可以,有什么好办法可以处理这个问题吗?
非常感谢
作者: shiyiming    时间: 2011-2-6 22:29
标题: Re: TXT文件 导入SAS中,最多可以导入多少个变量,可以允许4000个变量吗?
to happy6886
967  data _null_;
968          file "c:\test.txt";
969          array x{4000};
970          do i=1 to 4000;
971               do j=1 to 4000;
972                   x[j]=ranuni(0);
973               end;
974               put x1-x4000;
975          end;
976  run;

NOTE: The file "c:\test.txt" is:
      File Name=c:\test.txt,
      RECFM=V,LRECL=256

NOTE: 827899 records were written to the file "c:\test.txt".
      The minimum record length was 10.
      The maximum record length was 256.
NOTE: DATA statement used (Total process time):
      real time           15.51 seconds
      user cpu time       13.79 seconds
      system cpu time     0.85 seconds
      Memory                            866k


977
978  data matrix;
979          infile "c:\test.txt";
980          input x1-x4000;
981  run;

NOTE: The infile "c:\test.txt" is:
      File Name=c:\test.txt,
      RECFM=V,LRECL=256

NOTE: 827899 records were read from the infile "c:\test.txt".
      The minimum record length was 10.
      The maximum record length was 256.
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.MATRIX has 4000 observations and 4000 variables.
NOTE: DATA statement used (Total process time):
      real time           5.51 seconds
      user cpu time       4.45 seconds
      system cpu time     0.48 seconds
      Memory                            1237k
作者: shiyiming    时间: 2011-2-7 00:18
标题: Re: TXT文件 导入SAS中,最多可以导入多少个变量,可以允许4000个变量吗?
多谢版主的热心帮助。祝你新年快乐。 <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->




欢迎光临 SAS中文论坛 (https://mysas.net/forum/) Powered by Discuz! X3.2