楼主: jennifer502
3459 4

[求助] 问一SAS 考点(附题) [推广有奖]

  • 0关注
  • 0粉丝

学前班

50%

还不是VIP/贵宾

-

威望
0
论坛币
20 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
63 点
帖子
2
精华
0
在线时间
0 小时
注册时间
2007-3-8
最后登录
2007-3-8

楼主
jennifer502 发表于 2007-3-8 16:07:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

我都不清楚这两题想考的是什么? 类似但答案不同,请大家帮忙.....

1.The contents of 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;
infile '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)

The result is C.


2.The contents of 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;
infile 'employee';
input employee_name $1-4;
if employee_name ='Ruth' then input idnum 10-11;
else input age 7-8;
run;
Which one of the following values does the variable IDNUM contain when the name
of the employee is "Ruth"
A 11
B 22
C 32
D .(missing numeric value)

The result is B

二维码

扫码加我 拉你入群

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

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

关键词:following Employee Variable contents Contain 求助 SAS 考点

回帖推荐

nktiger1 发表于2楼  查看完整内容

First, the two programs test the same point. Second, the test point is below: The first input statment read one record. And the second input statement will read next record. If you want to read the same line, you should use trailing @, which will hold current record. e.g: input employee_name $1-4 @;

本帖被以下文库推荐

沙发
nktiger1 发表于 2007-3-8 16:33:00
First, the two programs test the same point.

Second, the test point is below:
The first input statment read one record.
And the second input statement will read next record.

If you want to read the same line, you should use trailing @, which will hold current record.
e.g: input employee_name $1-4 @;
已有 1 人评分经验 论坛币 收起 理由
bakoll + 2 + 10 热心帮助其他会员

总评分: 经验 + 2  论坛币 + 10   查看全部评分

藤椅
lqiantobe 发表于 2007-3-9 05:51:00

I am lost.

I know if no trailing @, will read next record :idnum or age, however,how to deal with next record :name? we can omit it ?

板凳
weihancool 发表于 2007-3-9 21:31:00

看明白了,呵呵,谢谢啊

国士无双

报纸
weihancool 发表于 2007-3-9 21:44:00
多亏这么前辈了
国士无双

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

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