楼主: waitalone11
2093 1

[原创博文] 如何存储宏? [推广有奖]

  • 0关注
  • 1粉丝

博士生

88%

还不是VIP/贵宾

-

威望
0
论坛币
150 个
通用积分
0.0034
学术水平
7 点
热心指数
9 点
信用等级
3 点
经验
21116 点
帖子
93
精华
0
在线时间
637 小时
注册时间
2008-12-14
最后登录
2022-4-13

楼主
waitalone11 发表于 2009-11-28 19:42:42 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
使用宏有这么几种方式:方法1:session-compiled macros  方法2:%INCLUDE statement    方法3:the autocall facility    方法4:stored compiled macros.
实际应用中哪种方法更好用?大家有什么意见或者建议吗?谢谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:statement Statemen Facility autocall COMPILE 实际应用 如何

沙发
bobguy 发表于 2009-11-29 02:47:02
waitalone11 发表于 2009-11-28 19:42
使用宏有这么几种方式:方法1:session-compiled macros  方法2:%INCLUDE statement    方法3:the autocall facility    方法4:stored compiled macros.
实际应用中哪种方法更好用?大家有什么意见或者建议吗?谢谢!
If I remember correct, when a macro is called, the '%' trigger SAS macro facilty and it first goes to the WORKING library to find the macro and excute it. If not it goes to the defined autocall facility library to find it, complie it and excute it. If the macro is already complied, then the compling process is skipped. That is all I see the difference. When I was a SAS developper, I stored all macros into the autocall library which was defined when a user launched his SAS session. Then all macros were available for everyone.

BTY %include is not part of SAS macro facility. Yes, it could do 'the same/sort of' macro functions if one writes the SAS codes dynamically and include them later on.  But one can use SAS call execute routine to do the same job now.

Before SAS macro was invented, %include was to the approach to do the dynamic programming in SAS.

HTH

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-26 00:53