全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2288 4
2011-09-20
hello everybody
when i am input data into sas, using infile, there is a problem always comes up.  i really  need you help. thanks a lot.
after i run this program.
DATA yahoo;
INFILE 'D:\AGE.XLS';
  INPUT OBS ID HEIGHT WEIGHT GENDER $ AGE;
RUN;

in the log book, a mistake is found like this
NOTE: The infile 'D:\AGE.XLS' is:
      File Name=D:\AGE.XLS,
      RECFM=V,LRECL=256

NOTE: Invalid data for OBS in line 1 1-6.(what's this meaning)
NOTE: LOST CARD.
OBS=. ID=. HEIGHT=. WEIGHT=. GENDER=  AGE=. _ERROR_=1 _N_=1
NOTE: 1 record was read from the infile 'D:\AGE.XLS'.
      The minimum record length was 6.
      The maximum record length was 6.
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.HSDOD has 0 observations and 6 variables.
NOTE: DATA statement used:
      real time           0.10 seconds
      cpu time            0.10 seconds
many thanks





二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-9-20 22:53:08
Maybe OBS cannot be a variable name.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-9-21 04:02:37
我觉得obs大概就是_n_,所以,大概不必作为一个输入变量。
另外,如果想将xls数据输入到sas内:可以用sas系统菜单内的file->import data直接按步输入就可以了。这样输入数据会很简单,也不会出错!

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-9-21 20:42:34
thanks everyone, I am in Australia right now, if you guys need any help, just let me know. cheers.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-9-21 21:45:38
正在看这部分,你应该把你要导入的源数据贴上来看看吧。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群