|
楼主

楼主 |
发表于 2005-10-25 21:28:06
|
只看该作者
新手!sas programming by example 里面习题的问题?
Write a sas progeam to read data from noth files and create a sas data set:
File one
cody 100
pass 98
File two
Frank 90
Beans 98
我是这么写的:
data file1;
input name $ 1-10 score 11-13;
datalines;
cody 100
pass 98
;
data file2;
input name $ 1-10 score 11-13;
datalines;
frenks 90
beans 98
;
Now I have two seperate file, then:
data twofiles;
if not lastrec1 then infile 'file1' end=lastrec1;
else infile 'file2';
input name $1-10 score 11-13;
proc print;
run;
结果成了:
ERROR: Physical file does not exist, E:\WINNT\system32\file1.
ERROR: Physical file does not exist, E:\WINNT\system32\file2.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TWOFILES may be incomplete. When this step was stopped there were 0
observations and 2 variables.
WARNING: Data set WORK.TWOFILES was not replaced because this step was stopped.
可是我看答案&我写的没什么区别,问什么找不到文件呢,不都存在临时文件夹work里面的吗?
谢谢各位了! <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
|