[程式] 這個SAS語法到底哪裡錯了呢?
[軟體程式類別]:
SAS
[程式問題]:
一開始要讀取記事本txt檔讀不到
[軟體熟悉度]:
新手(不到1個月)
[問題敘述]:
我把一個老師給的作業記事本檔(包含ID, sex, hours…etc.)file存在桌面的資料夾裡,試著要讀進SAS裡。但是,SAS一直說它讀不到
顯示error的文字如下:
52 data boys;
53 infile 'C:\Users\Sara\Desktop\SAShomework\tvhours.txt';
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.
ERROR 76-322: Syntax error, statement will be ignored.
54 input id sexf grade hourswatched;
55 run;
ERROR: No DATALINES or INFILE statement.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.BOYS may be incomplete. When this step was stopped there were 0 observations and 4 variables.
WARNING: Data set WORK.BOYS was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds
試了幾百次了還是不行!
請問到底是哪裡有問題呢?(哭)
我寫的語法如下
[程式範例]:
data boys;
infile ‘C:\C:\Users\Sara\Desktop\SAShomework\tvhours.txt’;
input id sexf grade hourswatched;
run;
-----------------------------------------------------------------------------
--
http://www.m-team.cc/forum/?fromuid=32314
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 168.122.6.84
→
09/29 01:05, , 1F
09/29 01:05, 1F
→
09/30 09:57, , 2F
09/30 09:57, 2F
→
09/30 09:58, , 3F
09/30 09:58, 3F