由买买提看人间百态

topics

全部话题 - 话题: 12sep2008
(共0页)
s*********e
发帖数: 944
1
来自主题: Statistics版 - 请问SAS ADV 130中74 和80题
74. The following SAS program is submitted:
%macro one(input);
%two
%put the value is &date;
%mend;
%macro two;
data _null_;
call symput('date', '12SEP2008');
run;
%mend;
%let date = 31DEC2006;
%one(&date)
What is the result when the %PUT statement executes?
A.A macro variable DATE with the value 12SEP2008 is retrieved from the
global symbol table.
B.A macro variable DATE with the value 31DEC2006 is retrieved from the
global symbol table.
C.A macro variable DATE with the value 12SEP2008 is retri... 阅读全帖
s*******2
发帖数: 499
2
来自主题: Statistics版 - 请教SAS adv 题库一道macro题
The following SAS program is submitted: %macro one(input);
%two;
%put the value is &date; %mend;
%macro two; data _null_;
call symput('date','12SEP2008'); run;
%mend;
%let date=31DEC2006;
%one(&date)
What is the result when the %PUT statement executes.?
A. A macro variable DATE with the value 12SEP2008 is retrieved from the
local symbol table for the ONE macro
B. A macro variable DATE with the value 12SEP2008 is retrieved from the
local symbol table for the TWO macro
C. A macro variable... 阅读全帖
L******n
发帖数: 6
3
75. The following SAS program is submitted:
%macro one(input);
%two;
%mend;
%macro two;
data _null_;
call symputx ('date','12SEP2008','L');
run;
%put the value is &date;
%mend;
%let date=31DEC1006;
%one(&date)
What is the result when the %put statement executes?
答案是12SEP2008 retrieved from the local symbol table for the TWO macro.
为什么不是12SEP2008 retrieved from the local symbol table for the ONE macro
?我的理解macro two 并没有local symbol table啊。
谢谢。
y****1
发帖数: 400
4
来自主题: Statistics版 - 周五考Advance,问2道SAS题
1. The following SAS program is submitted:
%macro one(input);
%two;
%mend;
%macro two;
data _null_;
call symputx ('date','12SEP2008','L');
run;
%put the value is &date;
%mend;
%let date=31DEC1006;
%one(&date)
What is the result when the %put statement executes?
答案是12SEP2008 retrieved from the local symbol table for the TWO macro.
我在网上查了call symputx routine的用法,关于L的解释是:
L specifies that the macro variable is stored in the most local symbol
table that exists, which might be the global symbol table.
y***t
发帖数: 644
5
来自主题: Statistics版 - 周五考Advance,问2道SAS题
第一题date在macro two里的local value是12SEP2008。
第二题不知道
(共0页)