由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - ask SAS question for advance certificate
相关主题
我是一菜鸟 质疑sas adv63题(12月)第41题的答案Please help with a SAS macro
killtest Q78 79 80请教一个SAS Macro问题。谢谢
问你们个 sas macro 的问题请教一个SAS ADV 的题目
Stupid SAS programming style is driving me crazy....请帮忙看3道SAS题。
SAS for the beginners - data stepA problem from SAS Adv test
Need advice on SAS macro debuggingIn SAS , How to call a macro thousands of times?
ask for help (urgent): A SAS questionSAS Macro question, thanks!
急问一个call symput问题(SAS)[合集] SAS 问题:如何在使用macro的时候保护data。
相关话题的讨论汇总
话题: newname话题: setname话题: macro话题: invocation话题: outside
进入Statistics版参与讨论
1 (共1页)
t*****w
发帖数: 254
1
I have not understood the following question meaning yet.
what does "inside" or "outside" in %put statement mean?
Item 62 of 63 Mark item for review
Given the following macro program
and invocation:
%macro MAKEPGM(NEWNAME, SETNAME);
data &NEWNAME;
set &SETNAME;
run;
%put ---> inside macro &NEWNAME &SETNAME;
%mend;
%MAKEPGM(WORK.NEW, SASHELP.CLASS)
%put ---> outside macro &NEWNAME &SETNAME;
Which of these choices shows the correct %PUT
statement output if the program is submitted at
the beginning of a new SAS session? Note that
other lines may be written to the SAS log by the
program but only the %PUT output is shown here.
A.
---> inside macro WORK.NEW SASHELP.CLASS
---> outside invocation WORK.NEW SASHELP.CLASS
B.
---> inside macro WORK.NEW SASHELP.CLASS
---> outside invocation &NEWNAME &SETNAME
C.
---> inside macro &NEWNAME &SETNAME
---> outside invocation WORK.NEW SASHELP.CLASS
D.
---> inside macro &NEWNAME &SETNAME
---> outside invocation &NEWNAME &SETNAME
s****u
发帖数: 1200
2
To retrieve the macro value within and outside the macro.

★ 发自iPhone App: ChineseWeb 7.8

【在 t*****w 的大作中提到】
: I have not understood the following question meaning yet.
: what does "inside" or "outside" in %put statement mean?
: Item 62 of 63 Mark item for review
: Given the following macro program
: and invocation:
: %macro MAKEPGM(NEWNAME, SETNAME);
: data &NEWNAME;
: set &SETNAME;
: run;
: %put ---> inside macro &NEWNAME &SETNAME;

t*****w
发帖数: 254
3
you mean that outside macro is to make the macro variable global?

【在 s****u 的大作中提到】
: To retrieve the macro value within and outside the macro.
:
: ★ 发自iPhone App: ChineseWeb 7.8

s*****d
发帖数: 267
4
To global a variable, you have to use %global to declare it.
Example:
%global var1;
%let var1=10;
%macro dummytest();
%put var1=&var1; /* should be 10 */
%let var1=11;
%mend;
%put var1=&var1; /* should be 11 now */
Hope this can help u.
请发包子

【在 t*****w 的大作中提到】
: you mean that outside macro is to make the macro variable global?
1 (共1页)
进入Statistics版参与讨论
相关主题
[合集] SAS 问题:如何在使用macro的时候保护data。SAS for the beginners - data step
请教一个SAS 数据分配问题Need advice on SAS macro debugging
请教个SAS macro 问题ask for help (urgent): A SAS question
问个SAS题目,急问一个call symput问题(SAS)
我是一菜鸟 质疑sas adv63题(12月)第41题的答案Please help with a SAS macro
killtest Q78 79 80请教一个SAS Macro问题。谢谢
问你们个 sas macro 的问题请教一个SAS ADV 的题目
Stupid SAS programming style is driving me crazy....请帮忙看3道SAS题。
相关话题的讨论汇总
话题: newname话题: setname话题: macro话题: invocation话题: outside