由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - SAS MACRO和Procedure
相关主题
Re: SAS help : How to use Macro to select procedursR 语言有像SAS 一样的macro吗?
大家用什么来创建sas 新的procedure菜鸟问个EXCEL作图的问题。
sas catalog里的code被锁,如何看出里面的MACRO有哪些?Re: 请问SAS 和SPLUS/R 具体有什么区别呢?
SAS macro Debug[合集] SAS manual太厚了,大家怎么学的,欢迎探讨!!!
Stupid SAS programming style is driving me crazy....which procedure in SAS for neural network?
急问:SAS batch submission with macro variableSAS/Graph 通常指哪些procedure 有没有相关的资料可以自学?
一个有意思的问题,关于SAS的运算时间。哪位能推荐一本SPSS的书,面试要问到SPSS
Need advice on SAS macro debuggingHow to do "data quality check in a methodical manner" By SAS or Proc SQL ?
相关话题的讨论汇总
话题: macro话题: sas话题: procedure话题: so话题: ld
进入Statistics版参与讨论
1 (共1页)
b*f
发帖数: 3154
1
看那个little sas的书说,macro的好处就是可以reuse,那procedure难道不也是为了
reuse么?这两者的区别是什么?
初学者,请大拿指导。
b*f
发帖数: 3154
2
这个。。。大家都不愿意回答么...回答的发包子...
o*********h
发帖数: 6
3

procedure 现成的, macro 得自己写

【在 b*f 的大作中提到】
: 看那个little sas的书说,macro的好处就是可以reuse,那procedure难道不也是为了
: reuse么?这两者的区别是什么?
: 初学者,请大拿指导。

b*f
发帖数: 3154
4
procedure不能自己写么?
俺就是不知道有什么macro能做的procedure不能做

【在 o*********h 的大作中提到】
:
: procedure 现成的, macro 得自己写

l*********s
发帖数: 5409
5
bao zi plz
//
macro is built on the top of procedure;so if procedures cannot do it, macro
won't do it either.
Macro is to help you simplify tasks/minize keystrokes.

【在 b*f 的大作中提到】
: procedure不能自己写么?
: 俺就是不知道有什么macro能做的procedure不能做

b*f
发帖数: 3154
6
So what is the advantage of macros? Whatever macros can do, a procedure can
be written to do the same, correct? If the answer to this question is "YES",
then what is the point of having macros? I have difficulty explaining this
question to my LD who is learning SAS.
Baozi is sent, BTW.

macro

【在 l*********s 的大作中提到】
: bao zi plz
: //
: macro is built on the top of procedure;so if procedures cannot do it, macro
: won't do it either.
: Macro is to help you simplify tasks/minize keystrokes.

s*r
发帖数: 2757
7
100wb
b*f
发帖数: 3154
8
40

【在 s*r 的大作中提到】
: 100wb
D******n
发帖数: 2836
9
39.999

【在 b*f 的大作中提到】
: 40
s*r
发帖数: 2757
10
ok you take it

【在 D******n 的大作中提到】
: 39.999
相关主题
急问:SAS batch submission with macro variableR 语言有像SAS 一样的macro吗?
一个有意思的问题,关于SAS的运算时间。菜鸟问个EXCEL作图的问题。
Need advice on SAS macro debuggingRe: 请问SAS 和SPLUS/R 具体有什么区别呢?
进入Statistics版参与讨论
a*****3
发帖数: 601
11
20 伪币firm. 我问问题有人回答的,一律30伪币。
my answer is: "macro facility" generates sas language or build-in procs/data
step. there are several 'units' in the macro facility, like input stack,
scanner, tokenizer, catalogues, that understand only 'sas macro language'.
Anything other than macro is treated as 'text'in the facility. the output of
the facility is 'sas language'.

【在 b*f 的大作中提到】
: 40
l**********9
发帖数: 148
12
Of course you can do everything in SAS without using macro. It is just a
matter of efficiency. For instance, you wan to write a SAS code:
proc print data=whywemustusethegoddamnmacor.itisjustatest;
run;
If you want to print this data set many times, then every time you must
input so long a data name. However,if you use a macro like:
%macro printit
proc print data=whywemustusethegoddamnmacor.itisjustatest;
run;
%mend printit;
Then next time you want to print, just use %printit. It is much easier, isn'
t it?
D******n
发帖数: 2836
13
I think lz's question comes from the lack of understanding of programming.
l**********9
发帖数: 148
14

I think it comes from the lack of experience in programming, rather than the
understanding=v=

【在 D******n 的大作中提到】
: I think lz's question comes from the lack of understanding of programming.
R*********i
发帖数: 7643
15
Say if you want to perform the same analyses on 10 variables, instead of
copying and pasting the same SAS procedures for 9 times with modifications,
you can write a macro and call the macro 10 times. Later on in case you want
to modify your analyses you can update the macro, instead of changing your
procedure 10 times.
b*f
发帖数: 3154
16
In fact I just realized that, you can not write your own procedure (At least
not that easy). So if you want to implement any logic, you will have to use
macro. I came from other background so I thought SAS procedures are like
functions in other programming languages that you can write easily.
Am I understanding it correctly now?
a*****3
发帖数: 601
17
yes, you understand 80% correctly. 给个伪币吧。

least: not that easy). So if you want to implement any logic, you will have
to use: macro. I came from other background so I thought SAS procedures
are like: functions in other programming languages that you can write easily
.: Am I understanding it correctly now?

【在 b*f 的大作中提到】
: In fact I just realized that, you can not write your own procedure (At least
: not that easy). So if you want to implement any logic, you will have to use
: macro. I came from other background so I thought SAS procedures are like
: functions in other programming languages that you can write easily.
: Am I understanding it correctly now?

l*********s
发帖数: 5409
18
co ask

have
easily

【在 a*****3 的大作中提到】
: yes, you understand 80% correctly. 给个伪币吧。
:
: least: not that easy). So if you want to implement any logic, you will have
: to use: macro. I came from other background so I thought SAS procedures
: are like: functions in other programming languages that you can write easily
: .: Am I understanding it correctly now?

a*****3
发帖数: 601
19
嘻嘻 楼主给了20刀。谢楼主。

【在 l*********s 的大作中提到】
: co ask
:
: have
: easily

s*r
发帖数: 2757
20
check the history of the macro %glmmix and proc glmmix
相关主题
[合集] SAS manual太厚了,大家怎么学的,欢迎探讨!!!哪位能推荐一本SPSS的书,面试要问到SPSS
which procedure in SAS for neural network?How to do "data quality check in a methodical manner" By SAS or Proc SQL ?
SAS/Graph 通常指哪些procedure 有没有相关的资料可以自学?Anyone has SAS programmer standard working procedure?
进入Statistics版参与讨论
n***p
发帖数: 508
21
ft,看你在这发帖,我还以为自己走错了版。
我的sas太滥了,回答不了你的吻体,只能帮你顶了。。

【在 b*f 的大作中提到】
: 看那个little sas的书说,macro的好处就是可以reuse,那procedure难道不也是为了
: reuse么?这两者的区别是什么?
: 初学者,请大拿指导。

b*f
发帖数: 3154
22
hehe

【在 n***p 的大作中提到】
: ft,看你在这发帖,我还以为自己走错了版。
: 我的sas太滥了,回答不了你的吻体,只能帮你顶了。。

D******n
发帖数: 2836
23
有前途,一直想搞,没搞成。
d******e
发帖数: 7844
24
这玩艺比bioinformatics多了哪些东西?

【在 D******n 的大作中提到】
: 有前途,一直想搞,没搞成。
D******n
发帖数: 2836
25
少了bio,没多多少。主要是图像分析和电子病历相关,对后者我得理解就是,
database+textmining,统计不多吧。
d*******1
发帖数: 854
26
大傻根好像总是回错帖啊。呵呵

【在 D******n 的大作中提到】
: 有前途,一直想搞,没搞成。
P****D
发帖数: 11146
27
You are right about that SAS procedure cannot be created by user. However, a
macro is just a bunch of procedures. It does not NECESSARILY help you
implement any logic.
I suggest you find a sample macro and a sample procedure and show them to
your LD. These two concepts are truly straightforward once you see examples,
but also impossible (I think) to explain just with words...

least
use

【在 b*f 的大作中提到】
: In fact I just realized that, you can not write your own procedure (At least
: not that easy). So if you want to implement any logic, you will have to use
: macro. I came from other background so I thought SAS procedures are like
: functions in other programming languages that you can write easily.
: Am I understanding it correctly now?

a*****3
发帖数: 601
28
if you have only one chance to 'show them to your LD', the last chance in
the world, what would you like to show?

your LD. These two concepts are truly straightforward once you see examples,

【在 P****D 的大作中提到】
: You are right about that SAS procedure cannot be created by user. However, a
: macro is just a bunch of procedures. It does not NECESSARILY help you
: implement any logic.
: I suggest you find a sample macro and a sample procedure and show them to
: your LD. These two concepts are truly straightforward once you see examples,
: but also impossible (I think) to explain just with words...
:
: least
: use

1 (共1页)
进入Statistics版参与讨论
相关主题
How to do "data quality check in a methodical manner" By SAS or Proc SQL ?Stupid SAS programming style is driving me crazy....
Anyone has SAS programmer standard working procedure?急问:SAS batch submission with macro variable
how to record how much time a PROC uses in SAS?一个有意思的问题,关于SAS的运算时间。
SAS求助,安装成功后怎么check updates呢?Need advice on SAS macro debugging
Re: SAS help : How to use Macro to select procedursR 语言有像SAS 一样的macro吗?
大家用什么来创建sas 新的procedure菜鸟问个EXCEL作图的问题。
sas catalog里的code被锁,如何看出里面的MACRO有哪些?Re: 请问SAS 和SPLUS/R 具体有什么区别呢?
SAS macro Debug[合集] SAS manual太厚了,大家怎么学的,欢迎探讨!!!
相关话题的讨论汇总
话题: macro话题: sas话题: procedure话题: so话题: ld