物理文件不存在

时间:2013-10-22 08:10:33

标签: sas

DATA hatco  ;
options ls=79;
options ps=60;

INFILE '~dscbms/class/dsc8450/files/hatco';
     INPUT X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14;
LABEL X1='DELIVERY SPEED'
       X2='PRICE LEVEL'
       X3='PRICE FLEXIBILITY'
       X4='MANUFACTURER IMAGE'
       X5='OVERALL SERVICE'
       X6='SALES FORCE IMAGE'
       X7='PRODUCT QUALITY'
       X8='SIZE OF FIRM'
       X9='USAGE LEVEL'
       X10='SATISFACTION LEVEL'
       X11='SPECIFICATION BUYING'
       X12='STRUCTURE OF PROCUREMENT'
       X13='TYPE OF INDUSTRY'
       X14='TYPE OF BUYING SITUATION';
Proc means;
        var x1-x14;
PROC UNIVARIATE PLOT NORMAL;
        var x1-x7 x9;

我试图在SAS中运行此程序,但我收到错误

ERROR: Physical file does not exist,
       D:\Backups\SAS\~dscbms\class\dsc8450\files\hatco.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HATCO may be incomplete.  When this step was
         stopped there were 0 observations and 14 variables.
WARNING: Data set WORK.HATCO was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

请提前帮助我

2 个答案:

答案 0 :(得分:2)

您的SAS安装是否在本地(Windows)计算机上运行? 你试图在Unix机器上访问文件吗? 使用适当的文件名。

答案 1 :(得分:1)

使用带有值的xyz.txt创建一个文件,然后在SAS内联代码中给出该文件的正确路径:您的sas代码将是这个

DATA hatco  ;
options ls=79;
options ps=60;

INFILE 'D:/test.txt';
     INPUT X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14;
LABEL X1='DELIVERY SPEED'
       X2='PRICE LEVEL'
       X3='PRICE FLEXIBILITY'
       X4='MANUFACTURER IMAGE'
       X5='OVERALL SERVICE'
       X6='SALES FORCE IMAGE'
       X7='PRODUCT QUALITY'
       X8='SIZE OF FIRM'
       X9='USAGE LEVEL'
       X10='SATISFACTION LEVEL'
       X11='SPECIFICATION BUYING'
       X12='STRUCTURE OF PROCUREMENT'
       X13='TYPE OF INDUSTRY'
       X14='TYPE OF BUYING SITUATION';
Proc means;
        var x1-x14;
PROC UNIVARIATE PLOT NORMAL;
        var x1-x7 x9;

和xyz.txt这样的文件

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14
1  2  3  4  5  6  7  8  9   10  11  12  13  14
1  2  3  4  5  6  7  8  9   10  11  12  13  14
1  2  3  4  5  6  7  8  9   10  11  12  13  14
1  2  3  4  5  6  7  8  9   10  11  12  13  14
1  2  3  4  5  6  7  8  9   10  11  12  13  14
1  2  3  4  5  6  7  8  9   10  11  12  13  14
1  2  3  4  5  6  7  8  9   10  11  12  13  14
1  2  3  4  5  6  7  8  9   10  11  12  13  14

您的文件路径中只有问题,您从中获取数据或设置。