全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2063 1
2009-11-28
使用宏有这么几种方式:方法1:session-compiled macros  方法2:%INCLUDE statement    方法3:the autocall facility    方法4:stored compiled macros.
实际应用中哪种方法更好用?大家有什么意见或者建议吗?谢谢!
二维码

扫码加我 拉你入群

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

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

全部回复
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
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群