全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1554 3
2016-02-17
The contents of the raw data file EMPLOYEE are listed below:
----|----10---|----20---|----30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
in file' employee';
input employee_ name $ 1-4;
if employee_ name = 'Sue' then input age 7-8;
else input idnum 10-11;
run;
Which one of the following values does the variable AGE contain when the name of
the employee is "Sue"?
A. 30
B. 33
C. 40
D. . (missing numeric value)
Answer: C

想了半天还是搞不懂为什么选C,求详细解答,谢谢

二维码

扫码加我 拉你入群

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

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

全部回复
2016-2-17 09:45:53
input employee_name $ 1-4;读完后跳行,在下一个数据行读取了age、idnum
二维码

扫码加我 拉你入群

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

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

2016-2-17 10:23:34
孤单的我们 发表于 2016-2-17 09:45
input employee_name $ 1-4;读完后跳行,在下一个数据行读取了age、idnum
谢谢回复,请问为什么在读完input employee——name$1-4后会跳入下一个数据行,而不是当前的数据行读取age,idnum啊
二维码

扫码加我 拉你入群

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

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

2016-2-17 10:33:17
亚甲绿 发表于 2016-2-17 10:23
谢谢回复,请问为什么在读完input employee——name$1-4后会跳入下一个数据行,而不是当前的数据行读取ag ...
input语句默认的,如果不希望跳行,可以用@@

input employee——name$1-4 @@

二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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