由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 2 sas questions
相关主题
我是一菜鸟 质疑sas adv63题(12月)第41题的答案[合集] 一个sas问题
help. sas macro请教一个SAS Macro问题。谢谢
为什么这两个Macro给出结果不一样哪?请教macro的一个小程序,
Stupid SAS programming style is driving me crazy....How to the macro regression with if?
用尽心思做好了一个macro请教一个SAS ADV 的题目
Need advice on SAS macro debugginga sas adv question
SAS macro variable resolution question请教data mining 的问题,在线等,谢谢!
batch?请教用Macro creating dummy的问题
相关话题的讨论汇总
话题: listthem话题: macro话题: type话题: city10话题: city1
进入Statistics版参与讨论
1 (共1页)
f*****a
发帖数: 693
1
1. the macro variables CITY1 through CITY10 contain the respective values
Cary, New York, Chicago, Los Angeles, Austin, Boston, Orlando, Dallas,
Knoxville, and Asheville:
%macro listthem;
%do n=1 %to 10; &&city&n
%end;
%mend listthem;
%put %listthem;
Q: Why ";" is not needed after &&city&n ?
2. Sorry, no data for this one:
%macro sepfeature;
%do i=1 %to &n;
data &&type&i (drop=type);
set features;
***********************************
if type="&&type&i";
***********************************
r
a****3
发帖数: 11741
2
Q1, I have never seen such coding before. sorry, don't know.
for Q2: In Macro, you have to use " " to refer the parameter so that macro will
recognize the value of your parameter, then put into type. otherwise, it
will return &&type&i instead of the value that the parameter refers to.
b******e
发帖数: 539
3
For your first question:
if you put ';' there, in the intermediate step, your code resolves to
something like:
%put &&city1; &&city2; ...; &&city10;;
which is an invalid statement after the first ';'
f*****a
发帖数: 693
4
Thanks a lot.
1 (共1页)
进入Statistics版参与讨论
相关主题
请教用Macro creating dummy的问题用尽心思做好了一个macro
请帮忙看3道SAS题。Need advice on SAS macro debugging
A problem from SAS Adv testSAS macro variable resolution question
请教:sas 循环batch?
我是一菜鸟 质疑sas adv63题(12月)第41题的答案[合集] 一个sas问题
help. sas macro请教一个SAS Macro问题。谢谢
为什么这两个Macro给出结果不一样哪?请教macro的一个小程序,
Stupid SAS programming style is driving me crazy....How to the macro regression with if?
相关话题的讨论汇总
话题: listthem话题: macro话题: type话题: city10话题: city1