全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1304 1
2016-03-23
data a;
do group=1 to 3;
input n@;
do i=1 to n;
input x@@;
output;
end;
end;
cards;
58 61 62 61 63 77
54 57 58
42 56 57 5
;
run;
谁能告诉我一下 上面的input n@是什么意思啊?
二维码

扫码加我 拉你入群

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

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

全部回复
2016-3-25 00:44:53
这里讲的是single trailing 和double trailing。
建议看一下 –《SAS Certification Prep Guide: Base Programming for SAS 9》的第20章- 也就是SAS官网上指定的SAS BASE的备考书-论坛里应该也可以找得到。
Chapter 20 Creating Multiple Observations from a Single Record (p.573-606)
•        SAS provides two line-hold specifiers.
o        The trailing at sign (@) holds the input record for the execution of the next INPUT statement.
o        The double trailing at sign (@@) holds the input record for the execution of the next INPUT statement, even across iterations of the DATA step.
•        The double trailing at sign (@@)
o         works like the trailing @ except it also holds the data line in the input buffer across multiple executions of the DATA step
o        typically is used to read multiple SAS observations from a single data line
o        should not be used with the @ pointer control, with column input, nor with the MISSOVER option.
•        It's easy to distinguish between the trailing @@ and the trailing @ by remembering that
o        the double trailing at sign (@@) holds a record across multiple iterations of the DATA step until the end of the record is reached.
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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