由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 问个SAS题目,
相关主题
请问SAS ADV 130中74 和80题SAS help
求教2道sas advance题目,包子答谢。请问SAS advanced macro global 和local
请问一道SAS ADV中的题目SAS ADVANCED 一道题求助
请教SAS adv 题库一道macro题SAS call symput question
sas题目恳请前辈指点!!求助,SAS ADV 130 中94
[合集] 求教一道Advanced SAS在线等:急问大牛帮我看看SAS macro里的问题
sas 代码问题SAS里用macro的文件名里数字的问题
请帮忙看3道SAS题。【包子】求问个简单sas macro问题
相关话题的讨论汇总
话题: rc话题: let话题: execution话题: macro话题: totalobs
进入Statistics版参与讨论
1 (共1页)
w*******n
发帖数: 469
1
80. The following SAS program is submitted:
%let rc = Begin;
%macro test;
data out;
set sashelp.prdsale nobs = totalobs;
if totalobs > 10 then do;
%let rc = high; end; else do;
%let rc = low; end; run;
%mend;
%let rc = Before Execution;
%test
The data set SASHELP.PRDSALE has 50 observations. What is the value of the
variable RC when the macro finishes execution?
A.low
B.high
C.Begin
D.Before Execution
为什么不是B?
A*******s
发帖数: 3942
2
%let 和 call symput的差别

【在 w*******n 的大作中提到】
: 80. The following SAS program is submitted:
: %let rc = Begin;
: %macro test;
: data out;
: set sashelp.prdsale nobs = totalobs;
: if totalobs > 10 then do;
: %let rc = high; end; else do;
: %let rc = low; end; run;
: %mend;
: %let rc = Before Execution;

w*******n
发帖数: 469
3
不懂啊, 牛人再解释的详细点儿?
A*******s
发帖数: 3942
4
非牛人解释一下
%let statement is processed by the macro processor before data step is
executed.
macro processor first scans "%let rc = high" and assigns "high" to rc; Then
scans "%let rc = low" and assigns "low" to rc. No matter what data step does
later on, rc's value is fixed.
To change the value in a macro variable in data step, you need to use call
symput.

【在 w*******n 的大作中提到】
: 不懂啊, 牛人再解释的详细点儿?
1 (共1页)
进入Statistics版参与讨论
相关主题
【包子】求问个简单sas macro问题sas题目恳请前辈指点!!
[合集] sas advance question[合集] 求教一道Advanced SAS
why this error in %if statementsas 代码问题
[合集] 一道SAS Advanced 题目--关于call symput请帮忙看3道SAS题。
请问SAS ADV 130中74 和80题SAS help
求教2道sas advance题目,包子答谢。请问SAS advanced macro global 和local
请问一道SAS ADV中的题目SAS ADVANCED 一道题求助
请教SAS adv 题库一道macro题SAS call symput question
相关话题的讨论汇总
话题: rc话题: let话题: execution话题: macro话题: totalobs