1398 3

input @ 语句出错为什么? [推广有奖]

  • 1关注
  • 8粉丝

已卖:2759份资源

博士生

37%

还不是VIP/贵宾

-

威望
0
论坛币
7576 个
通用积分
6.2859
学术水平
5 点
热心指数
6 点
信用等级
3 点
经验
8632 点
帖子
234
精华
0
在线时间
274 小时
注册时间
2009-12-10
最后登录
2025-8-23

楼主
奋斗者497911813 发表于 2015-5-16 12:25:20 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
做sas base题目时遇到这样一个问题,实在搞不清楚,请各位指点迷经。41.A raw data file is listed below.
1---+----10---+----20---+---
01/05/1989 Frank 11
12/25/1987 June 13
01/05/1991 Sally 9
The following SAS program is submitted using the raw data file as input:
data work.family;
infile 'file-specification';
input @1 date_of_birth mmddyy10.
@15 first_name $5.
@25 age 3;
run;
proc print data=work.family noobs;
run;
Which one of the following is the result?

Correct answer:
Values for the variable age are missing in the output because the informat for age is
coded incorrectly. Since age is standard numeric input, it should use the w.d informat to
specify a field width of 3 in the INPUT statement.

没搞明白什么意思,哪位高手给指点一下


二维码

扫码加我 拉你入群

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

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

关键词:Input put following correctly statement following Values result file

愤青

沙发
zxqfancy 学生认证  发表于 2015-5-16 12:35:52
age变量读入格式不对呀,后面没有点,应该是@25 age 3.;

藤椅
奋斗者497911813 发表于 2015-5-16 12:49:38
加上点用sas读了一下,根本读不出来age的值啊

板凳
zxqfancy 学生认证  发表于 2015-5-16 13:14:03
奋斗者497911813 发表于 2015-5-16 12:49
加上点用sas读了一下,根本读不出来age的值啊
按列读,要求数据是标准格式,你检验下数据长度,读入age时,是从25列开始,如果按照上面的25列是没有数据的

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-24 09:04