全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1127 0
2014-12-16

1.Consider the following data step:


data WORK.NEW;


set WORK.OLD;


Count+1;


run;


The variable Count is created using a sum statement. Whichstatement regarding this variable is true?


A.It is assigned a value 0 when the data step begins execution.


B.It is assigned a value of missing when the data step begins execution.


C.It is assigned a value 0 at compile time.


D.It is assigned a value of missing at compile time.


(我选C)

29.The following SAS program issumbitted:

data WORK.INFO;

     infile 'DATAFILE.TXT';

     input @1 Company 20.@25State2. @;

     if State=' ' then input @30 Year;

     else input @30 City Year;

     input NumEmployees;

run;

How many raw data records areread during each iteration of the DATA step?

     A. 1

     B. 2

     C. 3

     D. 4

我选B

第一题 Count+1; 等价于 retain count 0,count+1;所以一开始count=0 所以选C
第二题由于input @1 Company 20.@25State2. @;
if State=' ' then input @30 Year;
else input @30 City Year; 没有@ 所以之后input读新的一行 (但是此处疑惑的是不过对于if ...then; else...中也有两个input statemens, 第一个被@ hold住了没有跳行那么第二个也可以被hold住吗,会不会选C?????
欢迎大家讨论



二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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