msgbartop
List for SAS fans and programmer
msgbarbottom

18 4月 11 创建SAS宏变量的几类方法及举例

SAS里面除了变量,还有宏变量,其用途也非常广泛。创建宏变量的方法最早有shiyiming总结,翻了翻Rick Aster的Professional SAS Programming Shortcuts – Over 1,000 Ways To Improve Your SAS Programs,发现里面并没有总结这个问题,有点失望。

这里转载并补充姚志勇的SAS书里面的内容,使得更加完整和充实,便于大家以后方便选择使用,一共有四类方法:

(更多…)

16 4月 11 保险公司面经 oloolo 2010年3月

昨天的新浪微博上,peachcat提到了保险业的问题:

@sxlion 保险行业的欺诈防范是数据挖掘的重点。@吃桃的猫:保险业发达的美国,当前的保险犯罪仅次于毒品犯罪,1994 年医疗保险中的欺诈就导致美国人寿保险公司估计500 亿美元的损失。国内的保险业在快速成长的过程中也将面临越来越多的欺诈风险,及早防范是上策。”

正如peachcat所说,国内现在保险公司招SASor做欺诈防范的职位很少(但是银行信用卡中心会可以见到需要做欺诈防范的职位),不过按趋势以后会有很多。这里有一份2010年oloolo写的在美国东部一家保险公司面经(应该是亲身经历,哈哈)。最早发表于未名论坛,原文地址:http://www.mitbbs.com/article_t/Statistics/31216595.html

经oloolo同意,在这里转载,为国内以后的SASor面试保险公司类似的职位做个参考:

(更多…)

15 4月 11 SAS资讯 from 新浪微博-2011-04-15

下面是从2011年4月1日到4月15日的新浪微博信息,信息果然大,维数很多,需要大家慢慢品读。当然,我会继续努力,把微博信息整理得更加清晰有条理,便于大家阅读。这两个星期,大家的关注点在下面几个部分:

1,会议交流信息:SAS全球论坛会议、国内SASor聚会信息和其他的一些国内会议交流活动

2,数据挖掘实际应用和中文数据挖掘工具,以及对新兴社交媒体数据如BBS、博客、微博等新媒体信息如何分析的讨论;

3,数据可视化的一些应用;

4,其他一些SAS相关话题及产品信息。

详细如下:

(更多…)

03 4月 11 学习和提高SAS编程和应用的好出处——博客资源(2011年扩充版)

本博去年(2010年)9月6日收集了几个有关SAS编程和应用的博客,这里进行扩充,并且增加了微博这种新的博客形式。

博客和微博都是以一种个人发布的形式传播信息。博客传递非常快和信息大;微博则是短和更快。

传统书籍和网页都跟不上步伐,因此这里倾力收集了目前主要是中文或华人的SAS博客,以后会逐渐增加更多英文博客和更全面的相关博客,不断更新, 希望能够满足大家的需求。 (更多…)

31 3月 11 SAS资讯 from 新浪微博-2011-03-31

微博的信息量好大啊! 两个星期内有很多SAS相关信息,这些信息具有实时性,反应最新,最快的信息。

尽管如此,微博信息量巨大,并且杂而乱,因此这里将定时整理微博上的信息,使之更有条理和清晰,便于大家阅读。

当然,大家也可以加我的新浪微博

 

  1. //@SAS杨旭:回复 @康涅狄格州xieliang:应该是GRID,具体细节没有透露。 //@康涅狄格州xieliang:SAS GRID吧。我们公司正在考虑SAS GRID。如果用混合模型算一个全国市场的SPATIAL ANALYSIS,没GRID根本不行。//@SAS杨旭: 2000个变量,400G的数据,25秒计算完成,SAS进入高铁时代。 [03/31/2011 21:42:10]
  2.  

     

  3. //@ICTCLAS张华平博士:最近有家大的用户单位评测了几家比较火的聚类系统,聚类效果好的速度每秒大约3-5篇,每秒100篇左右的聚类结果没人看得懂;博主比较得意的是,我们的速度能达到1000篇/秒,效果还很好。具体算法有独到的地方,没有采用任何学术常用的方法,创新在于先快速计算出关键的主题词。//@ICTCLAS张华平博士: 下午访问北京市政府某机构,探讨信息公开的挖掘分析,可以用文本聚类的方法提取民众关注的热点。同时,也了解到经常引起误解的环节,比如一些单位的财务需要归并到上级单位公开,并非不公开;三公之类的开销并没有直接对应的财务支出项目。建议政府顺应纳税人的呼声,公开让老百姓能看懂的信息。 [03/30/2011 20:10:03]
  4.  

     

  5. 为什么SAS软件有很多功能没有公布在文档中,即所谓 “undocumented features”,这些features确实好用,很多SASor以熟知此为豪。比如http://sinaurl.cn/hBbGyS,你可以google http://sinaurl.cn/hBbGUL。为什么SAS公司不把它们纳入正式文档呢?点击这里:http://sinaurl.cn/hBbGyK, 看看SAS公司Chris Hemedinger为你解释这些“Undocumented features: there’s a reason they are not documented”。虽然他好像也没完全搞清楚,但是他的意见值得参考。 [03/30/2011 18:17:56]
  6.  

  7. Mark //@刘万祥ExcelPro:记下 //@数据挖掘与数据分析:原来在MR行业的时候记得一线城市一般是400或300,二线是200 //@张艳echozhang:昨天做的调研样本量稍少些,呵呵//@数据挖掘与数据分析: 1、最小的样本量为什么不能小于30?传说是这样的:当样本容量n较小时,t分布的方差大于1;当n增大到大于或等于30时,t分布的方差就趋近于1,t分布也就趋近于标准正态分布。2、为什么调研的样本量最小是384?在允许误差为5%、置信水平为95%的情况下,简单随机抽样需要的样本为384[围观][03/29/2011 23:31:17]
  8.  

  9. 全部都好用。 //@数学文化:回复@善衡科技:看来是统计圈的内行写的 //@善衡科技:除了与James Cooley合作的FFT算法,John W. Tukey还发明了很多著名的统计方法,如Tukey’s Test、Jackknife, Projection Pursuit(与Friedman合作), Explorative Data Analysis,我们现在常用的Box-plot也是Tukey提出的!//@数学文化: 约翰·图克(Tukey),著名统计学家,快速傅立叶变换发展者之一。软件(Software)、比特(bit)两个重要词汇的创造者。他30年代获布朗大学化学学士和硕士,后改读普林斯顿大学数学获博士。73年获得美国国家科学奖,贡献:在数学和统计学理论方面进行了深入的研究,并为统计学在多学科应用做出了突出贡献 [03/29/2011 09:09:51]
  10. 我们都爱傅立叶变换。//@数学文化: 世纪算法之8:快速傅立叶变换。这是我最推崇的算法了。65年,IBM的Cooley和贝尔实验室的Tukey推出了快速傅立叶变换。快速傅立叶算法是离散傅立叶算法(这可是数字信号处理的基石)的一种快速算法,其时间复杂度仅为O(Nlog(N));比时间效率更为重要的是,此快速算法非常容易用硬件实现,因此应用极广泛 [03/28/2011 11:50:16]
  11.  

  12. Assetlink是什么东东? SAS将与Assetlink的领先营销资源管理解决方案合而为一个整合的营销管理平台,使营销人员在计划、创建和优化营销项目时更加容易。SAS收购Assetlink助营销人员更高效开展营销。http://sinaurl.cn/h1uYSG [03/25/2011 19:53:54]
  13.  

  14. 分享自 @微盘 ( http://t.cn/h4wrjF )//@郑来轶: 通过@微盘 分享了一个文件, “SAS链接ORACLE数据库说明文档.PDF”, 欢迎大家下载分享!http://t.cn/h1QVuO [03/24/2011 21:16:55]
  15. //@康涅狄格州xieliang:对数据和业务都懂得才吃香。光懂数据的是一辈子工程师;光懂业务在数据说话的时代会发现越来越不懂业务//@时事周刊: 人民日报刊登重庆市委宣传部长何事忠的言论:重庆实行“唱读讲传”活动以来,干部群众信仰马克思主义的比例比上年提高了15.4个百分点,达到68.5%,比全国同期调查高出26.2个百分点。我用小学生的数学水平计算了一下100-(68.5-26.2),人民日报竟然告诉大家:全国不信仰马克思主义的是57.7%,真的吗? [03/22/2011 11:27:34]
  16.  

  17. //@张栋_机器学习:(3) 我认为社区最核心的不仅仅是 “Rank”, 不像搜索仅仅是在整理无序的海量互联网网页; 我认为社区的其中一个核心是 “传播”, 研究信息如何传播,信息如何更有效地传播 …//@张栋_机器学习: (1) 有人问我 Facebook 的 People Rank 和 Google 的 Page Rank:你可以想象互联网是一张图,每个节点是一个网页,网页和网页的链接是 HyperLink; PageRank 通过这个图 可以算出每个节点(网页)的重要性排序;你也可以想象 Facebook 也是一张图,每个节点是一个人, 人和人的关系是图的边。 [03/22/2011 09:34:35]
  18.  

  19. 标哥说过:“迭代就是力量。”//@数学文化: 有网友问:“现在计算机算矩阵已经实现自动化了,逆矩阵也可以计算机运算了,还有必要迭代吗?” 答案是:绝对要!实际应用中n*n矩阵的阶次n是成千上万的,甚至要几百万几千万;而计算速度和精度一直是工程师和数学家们追求的目标。目前再快的计算机直接算百万阶矩阵的逆无论从精度和速度上都不现实。 [03/22/2011 09:32:58]
  20.  

  21. 真的太老了,现在都是SNS,推特微博了。Ps:FACEBOOK的网络流量超google,里面的数据是个宝藏,但是墙内的人们来说是个遗憾。 //@aqua_tian:这本书讲的如何? 现在缺失新案例…[哈哈] //@SAS中文论坛:实在是土的要死的老掉牙故事,还是帮着转发一下吧。//@SEM在中国: 这是沃尔玛【数据挖掘与分析】经典案例:一般看来,啤酒和尿布是顾客群完全不同的商品。但是沃尔玛一年内数据挖掘的结果显示,在居民区中尿布卖得好的店面啤酒也卖得很好。原因其实很简单,一般太太让先生下楼买尿布的时候,先生们一般都会犒劳自己两听啤酒。因此啤酒和尿布一起购买的机会是最多的。[03/21/2011 23:00:59]
  22.  

  23. SAS是很好数据挖掘工具,哈哈 //@张栋_机器学习:金融就是数据! 互联网就是数据!机器学习就是数据挖掘机!//@i美股: 《创业家》:谁是金融数据王? http://sinaurl.cn/htYmL5 万得资讯作为金融信息产业链条上获得授权的信息服务商,如果想获取高昂利润,要做两件事:第一,尽可能降低信息获取成本;第二,尽可能通过各种手段将信息二次加工,更好地服务用户,甚至让用户离不开它,贩卖出高价。 [03/21/2011 20:45:07]
  24.  

  25. 这个函数很少有人能够想到,但是需要用的时候,感觉非常好。//@SAS中文论坛: 在SAS中用choosen()函数简化多条件if语句判断 if i=1 then j=2; else if i=2 then j=8; else if i=3 then j=13; ……. data ex; input i ; j=choosen(i,2,8,13,14,40,45,80,100,1); cards; 1 8 5 1 6 8 ; run; proc print;run; http://sinaurl.cn/hGMnoU [03/20/2011 21:24:23]
  26.  

  27. 中国的SASor也可以去美国参加SAS group全球论坛里,见胡江堂的博客记录:http://sinaurl.cn/IDXAV6,希望以后能继续看到他的美国之行的感想。他提交的paper见:Work Smarter Rather than Harder-Tools for Growing up A SAS® Programmerhttp://sinaurl.cn/ID66Cr,学习下,然后想想自己可以参加吗 ? [03/19/2011 23:13:10]
  28.  

  29. //@波波头一头:或许你刚关注过前段时间的推荐系统高峰论坛并且跃跃欲试,或许你每个周末都要收看非诚勿扰并且忍不住想去点个鸳鸯谱,也或许你已经对传说中的Netflix大奖欣羡多时可惜迟迟没有行动,不管怎样,现在可以把你的才华展示出来了,小小一些努力,真的可能改变世界。//@统计之都: #第一届大学生数据挖掘邀请赛#已经开放注册,竞赛主页已发布:http://sinaurl.cn/IDMiYN 请帮忙广而告之 [03/18/2011 20:28:35]
  30.  

  31. 很炫,精彩 ! BI展示的时尚感好强啊。//@张磊IDMer: //@张磊IDMer :SAS的Mobile BI,支持在iphone、ipad、Andriod、Blackberry等移动终端上使用各种商业智能和分析的成果。而根据Gartner的报告,到2013年,1/3的BI应用会在移动终端上使用。下面是SAS Mobile BI的一些界面展示:[原微博] [原文地址:http://sinaurl.cn/htoB70 ] [03/18/2011 14:06:15]
  32.  

  33. 做BI看仪表盘啊。 //@犇仔犇:ipad我能理解,可在iphone里面用SAS作甚啊?看个report还是做个挖掘?//@SAS中文论坛: //@sxlion :以后可以在iphone和ipad里面运行SAS了 [good] 据Infoworld报道,SAS表示,将联合移动BI供应商Mellmo公司把分析应用程序植入iPhone和iPad。该项合作将进一步促使苹果公司和企业软件供应商之间的合作,特别是BI供应商。。。http://sinaurl.cn/htBrfX [原文地址:http://sinaurl.cn/hGGGFv ] [03/18/2011 12:31:05]
  34.  

  35. //@小蚊子乐园:高级分析方法不一定是最好,能有效能够解决问题才是最好//@数据挖掘与数据分析: 1、许多分析方法对数据的要求很高,如样本分布不符合要求,样本量不足、数据格式等都会导致结果偏差甚至是完全错误;2、可使用不同的研究方法对同一问题进行解释,来互相验证结论;3、结果使用通俗易懂的语言或图表进行描述;4、高级分析方法不一定是最好,能有效能够解决问题才是最好;5、洞察力![03/17/2011 22:48:52]
  36. 感觉最近数据分析越来越火了,一些传统行业和新兴行业都开始招聘相关的人才了。//@aqua_tian:[哈哈] //这么快..//@SAS中文论坛: 扬讯科技专做第三方手机软件应用的一家公司,目前正在招一名数据分析与挖掘相关的牛人 www.me-tech.com.cn 主要是基于手机应用软件(目前好像是非智能机,逐步在做智能机的应用软件)的用户行为分析以及产品开拓推广方面的,有点像app store的性质 http://sinaurl.cn/htaYbI [03/17/2011 22:24:54]
  37.  

  38. 给力的招聘啊,哈哈 //@shiyiming:转//@SAS中文论坛: 招聘 Marketing Analysis Manager, Customer Lifecycle Value http://sinaurl.cn/htXOkb [03/17/2011 22:19:32]
  39.  

  40. //@小蚊子乐园:支持,好丰厚的奖励呀!//@统计之都: 首届全国大学生数据挖掘邀请赛 (http://sinaurl.cn/hcwSu9),一等奖10000奖金,挑战自我,实战应用;快来试试身手吧~ [03/17/2011 09:20:43]
  41.  

  42. //@沈浩老师:转发//@数学文化: 第一届诺贝尔经济奖奖给计量经济学(econometrics)的创始人弗里希和丁伯根.奖励他们“把经济学发展成为用数学来描述、用计量来决定的科学的先驱者.借助于成熟的理论和统计分析,创立了经济政策和计划的理论基础”。弗里希不仅提出计量经济学的概念,还创办了计量经济学会和《计量经济学》杂志。[03/16/2011 12:20:01]
  43.  

  44. 挺风趣好玩的,把BI的概念拍成这样,时尚易懂。 //@康涅狄格州xieliang:回复@车品觉: BI的任务就是大规模深入分析高维数据,建立起可解释,可执行的客户行为模型,再帮助业务伙伴有针对性地设计细化的营销策略和客服系统,为高层提供战略性的建议//@康涅狄格州xieliang:回复@车品觉: BI的任务就是大规模深入分析高维数据,建立起可解释,可执行的客户行为模型,再帮助业务伙伴有针对性地设计细化的营销策略和客服系统,为高层提供战略性的建议 //@车品觉:支付宝BI 欢迎各路数据爱好者加入, Join the Winning Team。有兴趣者私信我。//@支付宝: 【Q到爆[欢欢] 支付宝数据视频】不看后悔死你~~ 广告要都拍成这样,播30分钟都愿意看 支付宝数据视频 [03/16/2011 09:39:34]
  45.  

28 3月 11 SAS公司面经一个失败一个成功

“去年年底10月份,这里汇集了一份有关SAS工作的招聘列表,全部真实有效,其中有SAS公司招人。下面在是网上的一份面经和建议,与大家分享。……..”

不好意思,由于原作者要求低调处理,故暂时删掉原来那篇。不过这里奉送一份失败的SAS求职面经和一份成功的SAS实习面经。

(更多…)

14 3月 11 SAS资讯 from 新浪微博-2011-03-14

微博是最近流行的一种信息发布方式,具有实时性和多项性。大家可以在网上关注,也可以查看我的关注对象, 里面大部分都是与SAS相关的人或组织如有SAS中国公司,还有很多正在SAS公司工作的员工。通过关注新浪微博上的这些ID,就可以得到很多最新的SAS公司新闻和一些行业消息。因此本站不定期的收集一段时间内微博上的SAS资讯,整理后发布。
下面是从2011年初到2011年3月4日发布的信息,我从中挑选部分精华信息,供大家了解。
    (更多…)

05 1月 11 读者来信一 请教一些关于SAS学习及工作前景的一些问题

今天收到一个新鲜SASor的来信,我也做了一个回复,我觉得他是很有准备的一个人,对QA稍作修改,问和答见下面,希望给有同样问题的新手有个参考。

from: www.saslist.net
Q:
sxlion **:您好!冒昧来信,恳请见谅,个人现在处于SAS学习的初级阶段,关于SAS学习及行业应用有一些问题,想向前辈请教一下,十分感谢您能抽空阅读一下我邮件,谢谢!

首先,简单的介绍下我的相关信息 :-):
我叫***,现在就读于**大学,是统计系2008级的学生。2009年底接触SAS,2010后半年投入SAS的学习中,开始关注SAS方面的一些论坛、博客及工作信息。2010年10月至12月学习完成了SAS Base和Adv的考试,算是刚刚有一点入门吧。英语方面应该还算过得去吧,口语交流有待提高。计算机其他软件方面的能力比较欠缺,如C++等。

我近期初步的规划是:大四毕业的时候,能以SAS为工具技术,找到一份与统计相关的工作。

下面有几点希望前辈能给予一些指导与建议:

1.关于SAS工作及前景
个人之前关注过一些SAS相关的招聘信息,然而由于眼界有限,对从事SAS相关工作(尤其对本科毕业生来说)仍是不太明了,希望前辈能就您所了解的介绍下SAS在各个行业的应用情况。若希望将来有比较好的发展前途,有哪些方向?需要具备怎的素质?以及学位有怎样的重要性?(好像很多高级职位都需要硕士及以上学历)
2.关于SAS应用能力
从接触SAS到现在,总是感觉自己SAS知识掌握的不牢,面对一些实际问题时总是难以很好的解决,考完SAS初高级后,仍感觉自己SAS的编程及应用能力很欠缺。若是希望能全面(或者某一方面)提高自己的SAS应用能力,不知道前辈您有没有一些建议?另外也希望前辈能介绍下您SAS学习过程中的经验,以及重要的阶段和体会。
祝,新年快乐!工作顺利!

—————–  from: www.saslist.net     ————————
A:
hi, ***, 谢谢信任。 你是一个有准备的人,比我们这些老的好多了 – : )。

必须提前说明的是,我对这些情况了解有限,不过我仍然愿意倚老卖老的按你的问题做些回答。
你的目标是找一份与SAS相关的工作, 在我看来,SAS方面的工作前景不错,特别是对于本科生来说机会会更多。我觉得你的基础和专业也很好,不过为了得到更好的offer,提一些小小的建议把,其实这也是一些大公司的硬性要求。
  1. 英语口语要好。 我感觉90后的英语感觉都不错,不过还是建议花的钱去学点商业英语,然后把你自己统计专业英语词汇熟悉下,就差不多了。这个在中国很重要,因为给SAS工作机会多地方在上海,北京和广州,用你的公司多多少少和外国有点关系。
  2. SAS基本编程能力要好。 你有base和adv认证,一般HR会给你机会面试的。面试你的未来上司会考察SAS编程能力,这个对新手,会逃不到考察项目。 建议去论坛回答问题,留下自己的代码,就算写的不是很好。另外和别人的代码多比较下,会学到很多的。
  3. 专业。你应该属于很对口,基本上有关SAS的工作,HR会直接考虑你的,如果有一份很好的专业成绩表,HR会更喜欢。
  4. 业务上   你自己必须知道,光大学毕业是没有业务经验,毕业之前找个公司实习吧,这个更实在,你的上司对这个很看重。
如果你上面都顺利的话,也就是搞定了HR和你的未来上司,你这份工作就差不多了,也是你尽自己的能力做得非常好了。剩下的就看老大拍板了,上不上差不多和你关系不大了,这个运气成分很大。
哈哈,上面的问题很严肃,这个没办法,实际中就这样,下面调侃些轻松的吧。
  1. 提供SAS工作的公司挺多的,就业面挺广,目前需求也旺盛的。有钱有风险的行业,像金融、银行、证券、保险、投行之类的,要SASor的多;稳定工资不错的,像CRO,药厂等等也是招SASor的大户;另外国内现在很多外包型的公司,接大公司的业务,直接外派你去做项目,这样的公司还不少,大中小的公司都有,不少SASor都是从这样的公司入行的。
  2. SAS工作前景总体感觉不错,但是SAS学起来很枯燥,学习周期挺长的,也挺难学的,需要涉及的东西很多,编程能力,统计知识和业务敏感三个方面,能做到oloolo所说的三合一的业内顶尖统计人才不多。很多做SAS工作的人,只是个程序员(又称码农),而不是一个SAS程序员。当然如果规划好,加上几年的业务积累,速度成为顶级的业内高手也是可能的。
  3. 其他语言或工具软件,像C,C++,java之类的流行语言,刚开始不用学太好,基本了解就行了,实际工作中在根据需要用。倒是像如SAS同类型的软件,比如SPSS,R,matlab需要了解一点点,不过学好SAS的话,这几个难度不大。最近挖掘挺热的,SAS/em,还有IBM的clementine神马的,倒是需要练练手。
  4. 谈谈SAS认证,这个表示你不讨厌SAS,系统的学习过SAS编程的一些知识,离实际比较远,是个有胜于无的东西,受HR偏爱。实际能力还需多练手才能提高。【还有学位证什么的,只要人家不是招你去做研究的(这个非常之少的),学位真的是浮云。工作以后有钱有闲的,读个MBA会划算很多的。注:后面详谈,以保客观评价】
  5. 谈谈学位,学位一张纸,本身是浮云。你读了博士或硕士,表示你有时间和机会去接触前沿知识,这个很开阔眼界,至少不会陷入井底之见。如果不浪费时间,还会有项目积累和研究经验,会为简历添光不少。硕博学习经历和三年或以上的工作经验,两者怎么取? 就算是问过来人,你得到总是会得到两种或者三种看法,这个是社会问题,读者自清。老话重听不无道理:“师傅领进门,修行在各人”。顺便提一下,个别职位会严格要求学历的,不过大部分公司职位往往会前面提学历要求,后面会加上,“如果能力非常强的话,前面可以忽略”之类的。这里面有学习经历和经验之间的PK潜台词就是对学位问题最好的解答。
  6. 提高SAS应用能力的话,自学或者公司锻炼都可以,个人造化。现在网上资源非常多,前人给的建议也非常实在,提不提高看个人意愿了。

OK,差不多,你需要的我知道的都在上面。

最后给你来个私人建议吧,参杂大量我个人主观意愿。
  1. 尽可能回答mysas.net 或 sasor.feoh.net论坛上的所有问题。
  2. 开始写博客吧,把你写过的程序,稍微总结一下,并加以讨论。慢慢积累,以后招聘你的上司,一看你写的东西,就知道你的SAS水平了。
  3. 当你感觉你准备差不多的时候,要找实习或者工作了,去mysas圈子发短信给shiyiming。国内的一些公司时常会在mysas或者我的博客上有消息的。51或者招聘什么的网站,广告太多,圈子里面工作信息很多,感谢shiyiming吧。
by sxlion
ps:顺便广告下,想在SAS博客列表 http://saslist.com的开博客的TX,可以来邮件告之。
ps2:2010年1月7日 增加了对学位的看法,尽量保证客观公正的评价。

22 11月 10 最全的SAS9.2函数列表二

第二类 函数  windows环境下函数;

CALL SOUND Generates a sound with a specific frequency and duration.
MCIPISLP Causes SAS to wait for a piece of multimedia equipment to become active.
MCIPISTR Submits an MCI string command to a piece of multimedia equipment.
MODULE Calls a specific routine or module that resides in an external dynamic link library (DLL).
WAKEUP Specifies the time a SAS DATA step begins execution.

第三类,OpenVMS虚拟内存环境下函数;

ASCEBC Converts an input character string from ASCII to EBCDIC.
CALL FINDEND Releases resources that are associated with a directory search.
DELETE Deletes a file.
EBCASC Converts an input character string from EBCDIC to ASCII.
FILEATTR Returns the attribute information for a specified file.
FINDFILE Searches a directory for a file.
GETDVI Returns a specified item of information from a device.
GETJPI Retrieves job-process informations.
GETLOG Returns information about a DCL logical name.
GETMSG Translates an OpenVMS error code into text.
GETQUOTA Retrieves disk quota information.
GETSYM Returns the value of a DCL symbol.
GETTERM Returns the characteristics of your terminal device.
MODULE Calls a specific routine or module that resides in a sharable image.
NODENAME Returlns the name of the current node.
PUTLOG Creates an OpenVMS logical-name in your process-level logical name table.
PUTSYM Creates a DCL symbol in the parent SAS process.
SETTERM Modifies a characteristic of your terminal device.
TERMIN Allows simple input from SYS$INPUT.
TERMOUT Allows simple output to SYS$OUTPUT.
TTCLOSE Closes a channel that was previously assigned by TTOPEN.
TTCONTRL Modifies the characteristics of a channel that was previously assigned by TTOPEN.
TTOPEN Assigns an I/O channel to a terminal.
TTREAD Reads characters from the channel assigned by TTOPEN.
TTWRITE Writes characters to the channel assigned by TTOPEN.
VMS Spawns a subprocess and executes a DCL command.

第四类,z/OS操作环境下函数,

CALL TSO Issues a TSO command or invokes a CLIST or a REXX exec during a SAS session.
CALL WTO Sends a message to the system console.
TSO Issues a TSO command or invokes a CLIST or a REXX exec during a SAS session.
WTO Sends a message to the system console.

第五类,宏语言函数;

%BQUOTE, %NRBQUOTE Masks special characters and mnemonic operators in a resolved value at macro execution.
%EVAL Evaluates arithmetic and logical expressions using integer arithmetic.
%INDEX Returns the position of the first character of a string.
%LENGTH Returns the length of a string.
%QUOTE, %NRQUOTE Masks special characters and mnemonic operators in a resolved value at macro execution.
%SCAN, %QSCAN Searches for a word that is specified by its position in a string.
%STR, %NRSTR Masks special characters and mnemonic operators in constant text at macro compilation.
%SUBSTR, %QSUBSTR Produces a substring of a character string.
%SUPERQ Masks all special characters and mnemonic operators at macro execution but prevents further resolution of the value.
%SYMEXIST Returns an indication of the existence of a macro variable.
%SYMGLOBL Returns an indication as to whether a macro variable is global in scope.
%SYMLOCAL Returns an indication as to whether a macro variable is local in scope,
%SYSEVALF Evaluates arithmetic and logical expressions using floating-point arithmetic.
%SYSFUNC, %QSYSFUNC Executes SAS functions or user-written functions.
%SYSGET Returns the value of the specified operating environment variable.
%SYSPROD Reports whether a SAS software product is licenses at the site.
%UNQUOTE During macro execution, unmasks all special characters and mnemonic operators for a value.
%UPCASE, %QUPCASE Converts values to uppercase.

第六类,多国语言函数,

EUROCURR Converts one European currency to another.
GETPXLANGUAGE Returns the current two letter language code.
GETPXLOCALE Returns the POSIX locale value for a SAS locale.
GETPXREGION Returns the current two letter region code.
KCOMPARE Returns the result of a comparison of character expressions.
KCOMPRESS Removes specified characters from a character expression.
KCOUNT Returns the number of double-byte characters in an expression.
KCVT Converts data from one type of encoding data toanother encoding data.
KINDEX Searches a character expression for a string of characters.
KINDEXC Searches a character expression for specified characters.
KLEFT Left-aligns a character expression by removing unnecessary leading DBCS blanks and SO/SI.
KLENGTH Returns the length of an argument.
KLOWCASE Converts all letters in an argument to lowercase.
KREVERSE Reverses a character expression.
KRIGHT Right-aligns a character expression by trimming trailing DBCS blanks and SO/SI.
KSCAN Selects a specified word from a character expression.
KSTRCAT Concatenates two or more character expressions.
KSUBSTR Extracts a substring from an argument.
KSUBSTRB Extracts a substring from an argument according to the byte position of the substring in the argument.
KTRANSLATE Replaces specific characters in a character expression.
KTRIM Removes trailing DBCS blanks and SO/SI from character expressions.
KTRUNCATE Truncates a numeric value to a specified length.
KUPCASE Converts all single-byte letters in an argument to uppercase.
KUPDATE Inserts, deletes, and replaces character value contents.
KUPDATEB Inserts, deletes, and replaces the contents of the character value according to the byte position of the character value in the argument.
KVERIFY Returns the position of the first character that is unique to an expression.
NLDATE Converts the SAS date value to the date value of the specified locale by using the date format descriptors.
NLDATM Converts the SAS datetime value to the time value of the specified locale by using the datetime- format descriptors.
NLTIME Converts the SAS time or the datetime value to the time value of the specified locale by using the NLTIME descriptors.
SORTKEY Creates a linguistic sort key.
TRANTAB Transcodes data by using the specified translation table.
VARTRANSCODE Returns the transcode attribute of a SAS data set variable.
VTRANSCODE Returns a value that indicates whether transcoding is enabled for the specified character variable.
VTRANSCODEX Returns a value that indicates whether transcoding is enabled for the specified argument.
UNICODELEN Specifies the length of the character unit for the Unicode data.
UNICODEWIDTH Specifies the length of a display unit for the Unicode data.

第七类,其他函数  以下是其他函数的不完全情况:

1,有模块有自己的专用函数,如IML模块里面的函数。

2,现在模块中出现,如果用得很多的话,就变成了常规函数,如有些函数是从其他版本中其他模块转过来的,如SAS/ETS的INTCINDEX,INTCYCLE等等; SAS High-Performance Forecasting的HOLIDAY和NWKDOM函数等等就是这样。

3,还有一类函数是SAS文档中没有记录的,比如说PROC SQL语句中的 MONOTONIC( ) 函数,但是可以使用的,半官方的解释就是不成熟,处于试用中的函数,这种函数有些地方确实能起到惊艳的作用,但需要小心使用,多测试,防止意外发生。

4,有些函数文档里一些情况也没叙述完全,可能在调试中。比如说函数indexw(),具体见说明见mysas圈

5,也许还有其他的情况,待考。

另附SAS9.2中新增和变动的函数列表(中文):
以下为新增的函数和 CALL 例程:
ALLCOMB
以最小更改顺序一次从 n 个变量中任选 k 个值时生成的所有组合。
ALLPERM
以最小更改顺序生成若干变量的值的所有排列。
ARCOSH
返回反双曲余弦。
ARSINH
返回反双曲正弦。
ARTANH
返回反双曲正切。
CALL ALLCOMB
以最小更改顺序一次从 n 个变量中任选 k 个值时生成的所有组合。
CALL ALLCOMBI
以最小更改顺序一次从 n 个对象中任选 k 个指数时生成的所有组合。
CALL GRAYCODE
以最小更改顺序生成 n 个项的所有子集。
CALL ISO8601_CONVERT
将 ISO 8601 时间间隔转换为日期时间值和持续时间值,或将日期时间值和持续时间值转换为 ISO 8601 时间间隔。
CALL LEXCOMB
以字典顺序一次从 n 个变量中任选 k 个非缺失值时生成的所有非重复组合。
CALL LEXCOMBI
以字典顺序一次从 n 个对象中任选 k 个指数时生成的所有组合。
CALL LEXPERK
以字典顺序一次从 n 个变量中任选 k 个非缺失值时生成的所有非重复排列。
CALL LEXPERM
以字典顺序生成若干变量的非缺失值的所有非重复排列。
CALL SORTC
对字符参数的值进行排序。
CALL SORTN
对数值参数的值进行排序。
CATQ
使用分隔符分隔各个项,并将含该分隔符的字符串用引号引起来,以此连接字符或数值。
CHAR
从字符串的指定位置返回单个字符。
CMISS
统计缺失参数的数量。
COUNTW
统计字符表达式中的字词数。
DIVIDE
返回用于处理 ODS 输出的特殊缺失值的除法结果。
ENVLEN
返回环境变量的长度。
EUCLID
返回非缺失参数的欧氏范数。
FINANCE
执行财务计算,如折旧、到期时间、应计利息、净现值、定期储蓄和内部收益率。
FINDW
在字符串中搜索单词。
FIRST
返回字符串的第一个字符。
GCD
返回一个或多个整数的最大公约数。
GEODIST
返回两个纬度和经度坐标之间的大地距。
GRAYCODE
以最小更改顺序生成 n 个项的所有子集。
INTFIT
返回两个日期之间的时间间隔。
INTGET
返回基于三个日期值或日期时间值的时间间隔。
INTSHIFT
返回与基时间间隔相对应的移位时间间隔。
INTTEST
若时间间隔有效,返回 1;若时间间隔无效,则返回 0。
LCM
返回能被一组数中的每个数整除的最小倍数。
LCOMB
计算 COMB 函数的对数,即一次从 n 个对象中任选 r 个的组合数的对数。
LEXCOMB
以字典顺序一次从 n 个变量中任选 k 个非缺失值时生成的所有非重复组合。
LEXCOMBI
以字典顺序一次从 n 个对象中任选 k 个指数时生成的所有组合。
LEXPERK
以字典顺序一次从 n 个变量中任选 k 个非缺失值时生成的所有非重复排列。
LEXPERM
以字典顺序生成若干变量的非缺失值的所有非重复排列。
LFACT
计算 FACT(阶乘)函数的对数。
LOG1PX
返回 1 加该参数的对数。
LPERM
计算 PERM 函数的对数,即从 n 个对象中任选 r 个元素的排列数的对数。
LPNORM
返回第二个参数和随后的非缺失参数的 Lp 范数。
MD5
返回指定的字符串的消息摘要的结果。
MSPLINT
返回保单调插值样条的纵坐标。
RENAME
重命名 SAS 逻辑库的成员、外部文件或目录。
SUMABS
返回非缺失参数的绝对值的总和。
TRANSTRN
若一个字符串中的某个子串的值大于零,则在该字符串中替换找到的所有该子串。
WHICHC
搜索与第一个参数相等的字符值,并返回第一个匹配值的索引。
WHICHN
搜索与第一个参数相等的数值,并返回第一个匹配值的索引。
ZIPCITYDISTANCE
返回两个邮政编码位置之间的大地距。
改进了以下函数中的参数说明:
DOPEN
打开目录,并返回一个目录标识符值。
EXIST
验证 SAS 逻辑库成员是否存在。
FOPEN
打开外部文件并返回一个文件标识符值。
FEXIST
验证与文件引用名相关的外部文件是否存在。
FILENAME
为外部文件、目录或输出设备分配或取消分配文件引用名。
FILEREF
验证是否已将文件引用名分配给当前 SAS 会话。
LIBNAME
为 SAS 逻辑库分配或取消分配逻辑库引用名。
LIBREF
验证是否已分配逻辑库引用名。
MOPEN
根据目录 ID 和成员名称打开文件,并返回文件标识符或 0。
PATHNAME
返回 SAS 逻辑库或外部文件的物理名称,或返回一个空格。
以下函数以前包含在 Risk Dimensions 中,现已成为 Base SAS 的一部分:
BLACKCLPRC
根据 Black 模型计算欧式期货期权的买权价格。
BLACKPTPRC
根据 Black 模型计算欧式期货期权的卖权价格。
BLKSHCLPRT
根据 Black-Scholes 模型计算欧式期权的买权价格。
BLKSHPTPRT
根据 Black-Scholes 模型计算欧式期权的卖权价格。
GARKHCLPRC
根据 Garman-Kohlhagen 模型计算欧式股票期权的买权价格。
GARKHPTPRC
根据 Garman-Kohlhagen 模型计算欧式股票期权的卖权价格。
MARGRCLPRC
根据 Margrabe 模型计算欧式股票期权的买权价格。
MARGRPTPRC
根据 Margrabe 模型计算欧式股票期权的卖权价格。
以下函数以前包含在 SAS/ETS 中,现已成为 Base SAS 的一部分:
INTCINDEX
按给定日期、时间或日期时间值,返回周期指数。
INTCYCLE
按给定日期、时间或日期时间间隔,返回下一较高季节周期的日期、时间或日期时间间隔。
INTFMT
按给定日期、时间或日期时间间隔,返回推荐的格式。
INTINDEX
按给定日期、时间或日期时间间隔和值,返回季节指数。
INTSEAS
按给定日期、时间或日期时间间隔,返回季节周期的长度。
以下函数以前包含在 SAS High-Performance Forecasting 中,现已成为 Base SAS 的一部分:
HOLIDAY
返回指定年中指定假日的日期。
NWKDOM
返回指定年的指定月中某个星期几第 n 次出现时的日期。
以下函数已由 SAS 语言参考:字典转移到 SAS/IML 文档:
MODULEIC
调用外部例程,并返回一个字符值(仅在 IML 环境下)。
MODULEIN
调用外部例程,并返回一个数值(仅在 IML 环境下)。
CALL MODULEI
调用外部例程,但不返回任何代码(仅在 IML 环境下)。
以下函数和 CALL 例程已增强:
CALL POKE
现在可以直接将浮点数写入基于 32 位平台的内存。
CALL POKELONG
现在可以直接将浮点数写入基于 32 位平台和 64 位平台的内存。
CALL SCAN
返回字符表达式中给定单词的位置和长度。
DATDIF
已将“ACT/360”和“ACT/365”这两个值添加到 basis 参数,并在美国证券业协会出版的文档中添加了一条参考信息。
FSEP
为十六进制字符分隔符添加了一个可选参数。
INDEX
添加了说明如何处理开头空格和结尾空格的示例。
LAG
添加了关于 LAG 函数内存限制的信息。
SCAN
返回字符表达式中的第 n 个单词。
ZIPSTATE
在文档中添加了关于美国陆军邮局 (Army Post Office, APO) 和美国海军邮局 (Fleet Post Office, FPO) 的信息。
RX 函数集和 CALL 例程已从文档中删除,取而代之的是一组 PRX 函数和 CALL 例程。这些 PRX 函数和 CALL 例程在 SAS 以前的版本中已可以使用,可以提供强大的功能。
以下为已删除的 RX 函数和 CALL 例程:
RXMATCH 函数
RXPARSE 函数
RXCHANGE CALL 例程
RXFREE CALL 例程
RXSUBSTR CALL 例程
SCANQ 函数和 CALL SCANQ 例程已从文档中删除,由功能强大的 SCAN 函数和 CALL SCAN 例程取代。

以上参考文献来源主要为: SAS9.2随机帮助  美国SAS研究所  2009

22 11月 10 最全的SAS9.2函数列表一

SAS提供了大量的内置函数,并且在数量和内容上不断的发展改进,从版本9.2开始还提供了自定义函数功能。使用合适的函数,将会使你的工作效率加倍。2008年我在SASor论坛上贴了一个SAS9.2新增函数的列表,具体见论坛帖子;2009年我曾经在技术博客上对SAS函数做了比较深入的讨论,对SAS函数从版本6到版本9.2进行了细致的综述,详见SAS函数&CALL例程介绍与实例精选,并在SAS爱好者上海聚会分享了这一内容,当时的PPT见“SAS函数和CALL 例程的发展”。

当时所关注的函数其实仅仅集中于SAS常规函数,尽管如此,SAS9.2 的常规函数已达到499个。庞大的函数库确实给SASor们带来了非常多的方便,但是仓库式的SAS builted in帮助太杂乱,常常让人有一种“不识庐山真面目,只缘身在此山中”的感觉。有时,需要的函数找不到,找到的函数又不合适。其实SAS很体贴地不断增加高效的函数来精简你的代码和提高编程速度,可惜很多函数,SASor们并不知晓,常常看到别人使用的时候,才惊叹“原来SAS已经提供了这样的函数,我编了半天小算法”,或者“白费这么大劲,编了个宏”等等。这里按类列出SAS9.2版本的函数,供大家参考。

按不同的使用环境,SAS一共有七大类函数:

一,常规函数 ;二,windows环境下函数;三,OpenVMS虚拟内存环境下函数;四,z/OS操作环境下函数,五,宏语言函数;六,多国语言函数,七,其他函数

第一类函数常规函数最常用,数量也最多,这里依次列出所有的常规函数。

Character 字符函数


函数名称 功能
ANYALNUM Function Searches a character string for an alphanumeric character, and returns the first position at which the character is found.
ANYALPHA Function Searches a character string for an alphabetic character, and returns the first position at which the character is found.
ANYCNTRL Function Searches a character string for a control character, and returns the first position at which that character is found.
ANYDIGIT Function Searches a character string for a digit, and returns the first position at which the digit is found.
ANYFIRST Function Searches a character string for a character that is valid as the first character in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
ANYGRAPH Function Searches a character string for a graphical character, and returns the first position at which that character is found.
ANYLOWER Function Searches a character string for a lowercase letter, and returns the first position at which the letter is found.
ANYNAME Function Searches a character string for a character that is valid in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
ANYPRINT Function Searches a character string for a printable character, and returns the first position at which that character is found.
ANYPUNCT Function Searches a character string for a punctuation character, and returns the first position at which that character is found.
ANYSPACE Function Searches a character string for a white-space character (blank, horizontal and vertical tab, carriage return, line feed, and form feed), and returns the first position at which that character is found.
ANYUPPER Function Searches a character string for an uppercase letter, and returns the first position at which the letter is found.
ANYXDIGIT Function Searches a character string for a hexadecimal character that represents a digit, and returns the first position at which that character is found.
BYTE Function Returns one character in the ASCII or the EBCDIC collating sequence.
CALL CATS Routine Removes leading and trailing blanks, and returns a concatenated character string.
CALL CATT Routine Removes trailing blanks, and returns a concatenated character string.
CALL CATX Routine Removes leading and trailing blanks, inserts delimiters, and returns a concatenated character string.
CALL COMPCOST Routine Sets the costs of operations for later use by the COMPGED function
CALL MISSING Routine Assigns missing values to the specified character or numeric variables.
CALL SCAN Routine Returns the position and length of the nth word from a character string.
CAT Function Does not remove leading or trailing blanks, and returns a concatenated character string.
CATQ Function Concatenates character or numeric values by using a delimiter to separate items and by adding quotation marks to strings that contain the delimiter.
CATS Function Removes leading and trailing blanks, and returns a concatenated character string.
CATT Function Removes trailing blanks, and returns a concatenated character string.
CATX Function Removes leading and trailing blanks, inserts delimiters, and returns a character string.
CHAR Function Returns a single character from a specified position in a character string.
CHOOSEC Function Returns a character value that represents the results of choosing from a list of arguments.
CHOOSEN Function Returns a numeric value that represents the results of choosing from a list of arguments.
COALESCEC Function Returns the first non-missing value from a list of character arguments.
COLLATE Function Returns a character string in ASCII or EBCDIC collating sequence.
COMPARE Function Returns the position of the leftmost character by which two strings differ, or returns 0 if there is no difference.
COMPBL Function Removes multiple blanks from a character string.
COMPGED Function Returns the generalized edit distance between two strings.
COMPLEV Function Returns the Levenshtein edit distance between two strings.
COMPRESS Function Returns a character string with specified characters removed from the original string.
COUNT Function Counts the number of times that a specified substring appears within a character string.
COUNTC Function Counts the number of characters in a string that appear or do not appear in a list of characters.
COUNTW Function Counts the number of words in a character string.
DEQUOTE Function Removes matching quotation marks from a character string that begins with a quotation mark, and deletes all characters to the right of the closing quotation mark.
FIND Function Searches for a specific substring of characters within a character string.
FINDC Function Searches a string for any character in a list of characters.
FINDW Function Returns the character position of a word in a string, or returns the number of the word in a string.
FIRST Function Returns the first character in a character string.
IFC Function Returns a character value based on whether an expression is true, false, or missing.
INDEX Function Searches a character expression for a string of characters, and returns the position of the string’s first character for the first occurrence of the string.
INDEXC Function Searches a character expression for any of the specified characters, and returns the position of that character.
INDEXW Function Searches a character expression for a string that is specified as a word, and returns the position of the first character in the word.
LEFT Function Left-aligns a character string.
LENGTH Function Returns the length of a non-blank character string, excluding trailing blanks, and returns 1 for a blank character string.
LENGTHC Function Returns the length of a character string, including trailing blanks.
LENGTHM Function Returns the amount of memory (in bytes) that is allocated for a character string.
LENGTHN Function Returns the length of a character string, excluding trailing blanks.
LOWCASE Function Converts all letters in an argument to lowercase.
MD5 Function Returns the result of the message digest of a specified string.
MISSING Function Returns a numeric result that indicates whether the argument contains a missing value.
NLITERAL Function Converts a character string that you specify to a SAS name literal.
NOTALNUM Function Searches a character string for a non-alphanumeric character, and returns the first position at which the character is found.
NOTALPHA Function Searches a character string for a nonalphabetic character, and returns the first position at which the character is found.
NOTCNTRL Function Searches a character string for a character that is not a control character, and returns the first position at which that character is found.
NOTDIGIT Function Searches a character string for any character that is not a digit, and returns the first position at which that character is found.
NOTFIRST Function Searches a character string for an invalid first character in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
NOTGRAPH Function Searches a character string for a non-graphical character, and returns the first position at which that character is found.
NOTLOWER Function Searches a character string for a character that is not a lowercase letter, and returns the first position at which that character is found.
NOTNAME Function Searches a character string for an invalid character in a SAS variable name under VALIDVARNAME=V7, and returns the first position at which that character is found.
NOTPRINT Function Searches a character string for a nonprintable character, and returns the first position at which that character is found.
NOTPUNCT Function Searches a character string for a character that is not a punctuation character, and returns the first position at which that character is found.
NOTSPACE Function Searches a character string for a character that is not a white-space character (blank, horizontal and vertical tab, carriage return, line feed, and form feed), and returns the first position at which that character is found.
NOTUPPER Function Searches a character string for a character that is not an uppercase letter, and returns the first position at which that character is found.
NOTXDIGIT Function Searches a character string for a character that is not a hexadecimal character, and returns the first position at which that character is found.
NVALID Function Checks the validity of a character string for use as a SAS variable name.
PROPCASE Function Converts all words in an argument to proper case.
QUOTE Function Adds double quotation marks to a character value.
RANK Function Returns the position of a character in the ASCII or EBCDIC collating sequence.
REPEAT Function Returns a character value that consists of the first argument repeated n+1 times.
REVERSE Function Reverses a character string.
RIGHT Function Right aligns a character expression.
SCAN Function Returns the nth word from a character string.
SOUNDEX Function Encodes a string to facilitate searching.
SPEDIS Function Determines the likelihood of two words matching, expressed as the asymmetric spelling distance between the two words.
STRIP Function Returns a character string with all leading and trailing blanks removed.
SUBPAD Function Returns a substring that has a length you specify, using blank padding if necessary.
SUBSTR (left of =) Function Replaces character value contents.
SUBSTR (right of =) Function Extracts a substring from an argument.
SUBSTRN Function Returns a substring, allowing a result with a length of zero.
TRANSLATE Function Replaces specific characters in a character string.
TRANSTRN Function Replaces all occurrences of a substring found in a character string, allowing a zero-length replacement string.
TRANWRD Function Replaces or removes all occurrences of a substring in a character string.
TRIM Function Removes trailing blanks from a character string, and returns one blank if the string is missing.
TRIMN Function Removes trailing blanks from character expressions, and returns a string with a length of zero if the expression is missing.
UPCASE Function Converts all letters in an argument to uppercase.
VERIFY Function Returns the position of the first character in a string that is not in any of several other strings.

日期和时间函数  Date and Time

CALL IS8601_CONVERT Routine Converts an ISO 8601 interval to datetime and duration values, or converts datetime and duration values to an ISO 8601 interval.
DATDIF Function Returns the number of days between two dates.
DATE Function Returns the current date as a SAS date value.
DATEJUL Function Converts a Julian date to a SAS date value.
DATEPART Function Extracts the date from a SAS datetime value.
DATETIME Function Returns the current date and time of day as a SAS datetime value.
DAY Function Returns the day of the month from a SAS date value.
DHMS Function Returns a SAS datetime value from date, hour, minute, and second values.
HMS Function Returns a SAS time value from hour, minute, and second values.
HOLIDAY Function Returns a SAS date value of a specified holiday for a specified year.
HOUR Function Returns the hour from a SAS time or datetime value.
INTCINDEX Function Returns the cycle index when a date, time, or datetime interval and value are specified.
INTCK Function Returns the count of the number of interval boundaries between two dates, two times, or two datetime values.
INTCYCLE Function Returns the date, time, or datetime interval at the next higher seasonal cycle when a date, time, or datetime interval is specified.
INTFIT Function Returns a time interval that is aligned between two dates.
INTFMT Function Returns a recommended SAS format when a date, time, or datetime interval is specified.
INTGET Function Returns a time interval based on three date or datetime values.
INTINDEX Function Returns the seasonal index when a date, time, or datetime interval and value are specified.
INTNX Function Increments a date, time, or datetime value by a given time interval, and returns a date, time, or datetime value.
INTSEAS Function Returns the length of the seasonal cycle when a date, time, or datetime interval is specified.
INTSHIFT Function Returns the shift interval that corresponds to the base interval.
INTTEST Function Returns 1 if a time interval is valid, and returns 0 if a time interval is invalid.
JULDATE Function Returns the Julian date from a SAS date value.
JULDATE7 Function Returns a seven-digit Julian date from a SAS date value.
MDY Function Returns a SAS date value from month, day, and year values.
MINUTE Function Returns the minute from a SAS time or datetime value.
MONTH Function Returns the month from a SAS date value.
NWKDOM Function Returns the date for the nth occurrence of a weekday for the specified month and year.
QTR Function Returns the quarter of the year from a SAS date value.
SECOND Function Returns the second from a SAS time or datetime value.
TIME Function Returns the current time of day as a numeric SAS time value.
TIMEPART Function Extracts a time value from a SAS datetime value.
TODAY Function Returns the current date as a numeric SAS date value.
WEEK Function Returns the week-number value.
WEEKDAY Function From a SAS date value, returns an integer that corresponds to the day of the week.
YEAR Function Returns the year from a SAS date value.
YRDIF Function Returns the difference in years between two dates.
YYQ Function Returns a SAS date value from year and quarter year values.

描述统计函数 Descriptive Statistics

CMISS Function Counts the number of missing arguments.
CSS Function Returns the corrected sum of squares.
CV Function Returns the coefficient of variation.
EUCLID Function Returns the Euclidean norm of the non-missing arguments.
GEOMEAN Function Returns the geometric mean.
GEOMEANZ Function Returns the geometric mean, using zero fuzzing.
HARMEAN Function Returns the harmonic mean.
HARMEANZ Function Returns the harmonic mean, using zero fuzzing.
IQR Function Returns the interquartile range.
KURTOSIS Function Returns the kurtosis.
LARGEST Function Returns the kth largest non-missing value.
LPNORM Function Returns the Lp norm of the second argument and subsequent non-missing arguments.
MAD Function Returns the median absolute deviation from the median.
MAX Function Returns the largest value.
MEAN Function Returns the arithmetic mean (average).
MEDIAN Function Returns the median value.
MIN Function Returns the smallest value.
MISSING Function Returns a numeric result that indicates whether the argument contains a missing value.
N Function Returns the number of non-missing numeric values.
NMISS Function Returns the number of missing numeric values.
ORDINAL Function Returns the kth smallest of the missing and nonmissing values.
PCTL Function Returns the percentile that corresponds to the percentage.
RANGE Function Returns the range of the nonmissing values.
RMS Function Returns the root mean square of the nonmissing arguments.
SKEWNESS Function Returns the skewness of the nonmissing arguments.
SMALLEST Function Returns the kth smallest nonmissing value.
STD Function Returns the standard deviation of the nonmissing arguments.
STDERR Function Returns the standard error of the mean of the nonmissing arguments.
SUM Function Returns the sum of the nonmissing arguments.
SUMABS Function Returns the sum of the absolute values of the non-missing arguments.
USS Function Returns the uncorrected sum of squares of the nonmissing arguments.
VAR Function Returns the variance of the nonmissing arguments.

数学函数 Mathematical

ABS Function Returns the absolute value.
AIRY Function Returns the value of the Airy function.
BETA Function Returns the value of the beta function.
CALL LOGISTIC Routine Applies the logistic function to each argument.
CALL SOFTMAX Routine Returns the softmax value.
CALL STDIZE Routine Standardizes the values of one or more variables.
CALL TANH Routine Returns the hyperbolic tangent.
CNONCT Function Returns the noncentrality parameter from a chi-square distribution.
COALESCE Function Returns the first non-missing value from a list of numeric arguments.
CONSTANT Function Computes machine and mathematical constants.
DAIRY Function Returns the derivative of the AIRY function.
DEVIANCE Function Returns the deviance based on a probability distribution.
DIGAMMA Function Returns the value of the digamma function.
ERF Function Returns the value of the (normal) error function.
ERFC Function Returns the value of the complementary (normal) error function.
EXP Function Returns the value of the exponential function.
FACT Function Computes a factorial.
FNONCT Function Returns the value of the noncentrality parameter of an F distribution.
GAMMA Function Returns the value of the gamma function.
GCD Function Returns the greatest common divisor for one or more integers.
IBESSEL Function Returns the value of the modified Bessel function.
JBESSEL Function Returns the value of the Bessel function.
LCM Function Returns the least common multiple.
LGAMMA Function Returns the natural logarithm of the Gamma function.
LOG Function Returns the natural (base e) logarithm.
LOG1PX Function Returns the log of 1 plus the argument.
LOG10 Function Returns the logarithm to the base 10.
LOG2 Function Returns the logarithm to the base 2.
LOGBETA Function Returns the logarithm of the beta function.
MOD Function Returns the remainder from the division of the first argument by the second argument, fuzzed to avoid most unexpected floating-point results.
MODZ Function Returns the remainder from the division of the first argument by the second argument, using zero fuzzing.
MSPLINT Function Returns the ordinate of a monotonicity-preserving interpolating spline.
SIGN Function Returns the sign of a value.
SQRT Function Returns the square root of a value.
TNONCT Function Returns the value of the noncentrality parameter from the Student’s t distribution.
TRIGAMMA Function Returns the value of the trigamma function.

分布密度函数、分布函数 Probability

CDF Function Returns a value from a cumulative probability distribution.
LOGCDF Function Returns the logarithm of a left cumulative distribution function.
LOGPDF Function Returns the logarithm of a probability density (mass) function.
LOGSDF Function Returns the logarithm of a survival function.
PDF Function Returns a value from a probability density (mass) distribution.
POISSON Function Returns the probability from a Poisson distribution.
PROBBETA Function Returns the probability from a beta distribution.
PROBBNML Function Returns the probability from a binomial distribution.
PROBBNRM Function Returns a probability from a bivariate normal distribution.
PROBCHI Function Returns the probability from a chi-square distribution.
PROBF Function Returns the probability from an F distribution.
PROBGAM Function Returns the probability from a gamma distribution.
PROBHYPR Function Returns the probability from a hypergeometric distribution.
PROBMC Function Returns a probability or a quantile from various distributions for multiple comparisons of means.
PROBNEGB Function Returns the probability from a negative binomial distribution.
PROBNORM Function Returns the probability from the standard normal distribution.
PROBT Function Returns the probability from a t distribution.
SDF Function Returns a survival function.

二进制逻辑操作符 Bitwise Logical Operations

BAND Function Returns the bitwise logical AND of two arguments.
BLSHIFT Function Returns the bitwise logical left shift of two arguments.
BNOT Function Returns the bitwise logical NOT of an argument.
BOR Function Returns the bitwise logical OR of two arguments.
BRSHIFT Function Returns the bitwise logical right shift of two arguments.
BXOR Function Returns the bitwise logical EXCLUSIVE OR of two arguments.

数组函数  Array

DIM Function Returns the number of elements in an array.
HBOUND Function Returns the upper bound of an array.
LBOUND Function Returns the lower bound of an array.

字符串配对函数 Character String Matching

CALL PRXCHANGE Routine Performs a pattern-matching replacement.
CALL PRXDEBUG Routine Enables Perl regular expressions in a DATA step to send debugging output to the SAS log.
CALL PRXFREE Routine Frees memory that was allocated for a Perl regular expression.
CALL PRXNEXT Routine Returns the position and length of a substring that matches a pattern, and iterates over multiple matches within one string.
CALL PRXPOSN Routine Returns the start position and length for a capture buffer.
CALL PRXSUBSTR Routine Returns the position and length of a substring that matches a pattern.
PRXCHANGE Function Performs a pattern-matching replacement.
PRXMATCH Function Searches for a pattern match and returns the position at which the pattern is found.
PRXPAREN Function Returns the last bracket match for which there is a match in a pattern.
PRXPARSE Function Compiles a Perl regular expression (PRX) that can be used for pattern matching of a character value.
PRXPOSN Function Returns a character string that contains the value for a capture buffer.

组合函数 Combinatorial

ALLCOMB Function Generates all combinations of the values of n variables taken k at a time in a minimal change order.
ALLPERM Function Generates all permutations of the values of several variables in a minimal change order.
CALL ALLCOMB Routine Generates all combinations of the values of n variables taken k at a time in a minimal change order.
CALL ALLCOMBI Routine Generates all combinations of the indices of n objects taken k at a time in a minimal change order.
CALL ALLPERM Routine Generates all permutations of the values of several variables in a minimal change order.
CALL GRAYCODE Routine Generates all subsets of n items in a minimal change order.
CALL LEXCOMB Routine Generates all distinct combinations of the non-missing values of n variables taken k at a time in lexicographic order.
CALL LEXCOMBI Routine Generates all combinations of the indices of n objects taken k at a time in lexicographic order.
CALL LEXPERK Routine Generates all distinct permutations of the non-missing values of n variables taken k at a time in lexicographic order.
CALL LEXPERM Routine Generates all distinct permutations of the non-missing values of several variables in lexicographic order.
CALL RANPERK Routine Randomly permutes the values of the arguments, and returns a permutation of k out of n values.
CALL RANPERM Routine Randomly permutes the values of the arguments.
COMB Function Computes the number of combinations of n elements taken r at a time.
GRAYCODE Function Generates all subsets of n items in a minimal change order.
LCOMB Function Computes the logarithm of the COMB function; that is, the logarithm of the number of combinations of n objects taken r at a time.
LEXCOMB Function Generates all distinct combinations of the non-missing values of n variables taken k at a time in lexicographic order.
LEXCOMBI Function Generates all combinations of the indices of n objects taken k at a time in lexicographic order.
LEXPERK Function Generates all distinct permutations of the non-missing values of n variables taken k at a time in lexicographic order.
LEXPERM Function Generates all distinct permutations of the non-missing values of several variables in lexicographic order.
LFACT Function Computes the logarithm of the FACT (factorial) function.
LPERM Function Computes the logarithm of the PERM function; that is, the logarithm of the number of permutations of n objects, with the option of including r number of elements.
PERM Function Computes the number of permutations of n items that are taken r at a time.

双曲线函数 Hyperbolic

ARCOSH Function Returns the inverse hyperbolic cosine.
ARSINH Function Returns the inverse hyperbolic sine.
ARTANH Function Returns the inverse hyperbolic tangent.
COSH Function Returns the hyperbolic cosine.
SINH Function Returns the hyperbolic sine.
TANH Function Returns the hyperbolic tangent.

宏函数 Macro

CALL EXECUTE Routine Resolves the argument, and issues the resolved value for execution at the next step boundary.
CALL SYMPUT Routine Assigns DATA step information to a macro variable.
CALL SYMPUTX Routine Assigns a value to a macro variable, and removes both leading and trailing blanks.
RESOLVE Function Returns the resolved value of the argument after it has been processed by the macro facility.
SYMEXIST Function Returns an indication of the existence of a macro variable.
SYMGET Function Returns the value of a macro variable during DATA step execution.
SYMGLOBL Function Returns an indication of whether a macro variable is in global scope to the DATA step during DATA step execution.
SYMLOCAL Function Returns an indication of whether a macro variable is in local scope to the DATA step during DATA step execution.

分位数函数 Quantile

BETAINV Function Returns a quantile from the beta distribution.
CINV Function Returns a quantile from the chi-square distribution.
FINV Function Returns a quantile from the F distribution.
GAMINV Function Returns a quantile from the gamma distribution.
PROBIT Function Returns a quantile from the standard normal distribution.
QUANTILE Function Returns the quantile from a distribution that you specify.
TINV Function Returns a quantile from the t distribution.

搜索函数 Search

WHICHC Function Searches for a character value that is equal to the first argument, and returns the index of the first matching value.
WHICHN Function Searches for a numeric value that is equal to the first argument, and returns the index of the first matching value.

排序函数Sort

CALL SORTC Routine Sorts the values of character arguments.
CALL SORTN Routine Sorts the values of numeric arguments.

外部例程 External Routines

CALL MODULE Routine Calls an external routine without any return code.
MODULEC Function Calls an external routine and returns a character value.
MODULEN Function Calls an external routine and returns a numeric value.

三角函数Trigonometric

ARCOS Function Returns the arccosine.
ARSIN Function Returns the arcsine.
ATAN Function Returns the arc tangent.
ATAN2 Function Returns the arc tangent of the ratio of two numeric variables.
COS Function Returns the cosine.
SIN Function Returns the sine.
TAN Function Returns the tangent.

截断函数 Truncation

CEIL Function Returns the smallest integer that is greater than or equal to the argument, fuzzed to avoid unexpected floating-point results.
CEILZ Function Returns the smallest integer that is greater than or equal to the argument, using zero fuzzing.
FLOOR Function Returns the largest integer that is less than or equal to the argument, fuzzed to avoid unexpected floating-point results.
FLOORZ Function Returns the largest integer that is less than or equal to the argument, using zero fuzzing.
FUZZ Function Returns the nearest integer if the argument is within 1E-12 of that integer.
INT Function Returns the integer value, fuzzed to avoid unexpected floating-point results.
INTZ Function Returns the integer portion of the argument, using zero fuzzing.
ROUND Function Rounds the first argument to the nearest multiple of the second argument, or to the nearest integer when the second argument is omitted.
ROUNDE Function Rounds the first argument to the nearest multiple of the second argument, and returns an even multiple when the first argument is halfway between the two nearest multiples.
ROUNDZ Function Rounds the first argument to the nearest multiple of the second argument, using zero fuzzing.
TRUNC Function Truncates a numeric value to a specified number of bytes.

变量控制函数Variable Control

CALL LABEL Routine Assigns a variable label to a specified character variable.
CALL SET Routine Links SAS data set variables to DATA step or macro variables that have the same name and data type.
CALL VNAME Routine Assigns a variable name as the value of a specified variable.

算术函数 Arithmetic

DIVIDE Returns the result of a division that handles special missing values for ODS output.

返回数值函数 Numeric

IFN Function Returns a numeric value based on whether an expression is true, false, or missing.

网络工具函数Web Tools

HTMLDECODE Function Decodes a string that contains HTML numeric character references or HTML character entity references, and returns the decoded string.
HTMLENCODE Function Encodes characters using HTML character entity references, and returns the encoded string.
URLDECODE Function Returns a string that was decoded using the URL escape syntax.
URLENCODE Function Returns a string that was encoded using the URL escape syntax.

外部文件函数 External Files

DCLOSE Function Closes a directory that was opened by the DOPEN function.
DCREATE Function Returns the complete pathname of a new, external directory.
DINFO Function Returns information about a directory.
DNUM Function Returns the number of members in a directory.
DOPEN Function Opens a directory, and returns a directory identifier value.
DOPTNAME Function Returns directory attribute information.
DOPTNUM Function Returns the number of information items that are available for a directory.
DREAD Function Returns the name of a directory member.
DROPNOTE Function Deletes a note marker from a SAS data set or an external file.
FAPPEND Function Appends the current record to the end of an external file.
FCLOSE Function Closes an external file, directory, or directory member.
FCOL Function Returns the current column position in the File Data Buffer (FDB).
FDELETE Function Deletes an external file or an empty directory.
FEXIST Function Verifies the existence of an external file that is associated with a fileref.
FGET Function Copies data from the File Data Buffer (FDB) into a variable.
FILEEXIST Function Verifies the existence of an external file by its physical name.
FILENAME Function Assigns or deassigns a fileref to an external file, directory, or output device.
FILEREF Function Verifies whether a fileref has been assigned for the current SAS session.
FINFO Function Returns the value of a file information item.
FNOTE Function Identifies the last record that was read, and returns a value that the FPOINT function can use.
FOPEN Function Opens an external file and returns a file identifier value.
FOPTNAME Function Returns the name of an item of information about a file.
FOPTNUM Function Returns the number of information items that are available for an external file.
FPOINT Function Positions the read pointer on the next record to be read.
FPOS Function Sets the position of the column pointer in the File Data Buffer (FDB).
FPUT Function Moves data to the File Data Buffer (FDB) of an external file, starting at the FDB’s current column position.
FREAD Function Reads a record from an external file into the File Data Buffer (FDB).
FREWIND Function Positions the file pointer to the start of the file.
FRLEN Function Returns the size of the last record that was read, or, if the file is opened for output, returns the current record size.
FSEP Function Sets the token delimiters for the FGET function.
FWRITE Function Writes a record to an external file.
MOPEN Function Opens a file by directory ID and member name, and returns either the file identifier or a 0.
PATHNAME Function Returns the physical name of an external file or a SAS library, or returns a blank.
RENAME Function Renames a member of a SAS library, an entry in a SAS catalog, an external file, or a directory.
SYSMSG Function Returns error or warning message text from processing the last data set or external file function.
SYSRC Function Returns a system error number.

金融函数Financial

BLACKCLPRC Function Calculates call prices for European options on futures, based on the Black model.
BLACKPTPRC Function Calculates put prices for European options on futures, based on the Black model.
BLKSHCLPRC Function Calculates call prices for European options on stocks, based on the Black-Scholes model.
BLKSHPTPRC Function Calculates put prices for European options on stocks, based on the Black-Scholes model.
COMPOUND Function Returns compound interest parameters.
CONVX Function Returns the convexity for an enumerated cash flow.
CONVXP Function Returns the convexity for a periodic cash flow stream, such as a bond.
DACCDB Function Returns the accumulated declining balance depreciation.
DACCDBSL Function Returns the accumulated declining balance with conversion to a straight-line depreciation.
DACCSL Function Returns the accumulated straight-line depreciation.
DACCSYD Function Returns the accumulated sum-of-years-digits depreciation.
DACCTAB Function Returns the accumulated depreciation from specified tables.
DEPDB Function Returns the declining balance depreciation.
DEPDBSL Function Returns the declining balance with conversion to a straight-line depreciation.
DEPSL Function Returns the straight-line depreciation.
DEPSYD Function Returns the sum-of-years-digits depreciation.
DEPTAB Function Returns the depreciation from specified tables.
DUR Function Returns the modified duration for an enumerated cash flow.
DURP Function Returns the modified duration for a periodic cash flow stream, such as a bond.
FINANCE Function Computes financial calculations such as depreciation, maturation, accrued interest, net present value, periodic savings, and internal rates of return.
GARKHCLPRC Function Calculates call prices for European options on stocks, based on the Garman-Kohlhagen model.
GARKHPTPRC Function Calculates put prices for European options on stocks, based on the Garman-Kohlhagen model.
INTRR Function Returns the internal rate of return as a fraction.
IRR Function Returns the internal rate of return as a percentage.
MARGRCLPRC Function Calculates call prices for European options on stocks, based on the Margrabe model.
MARGRPTPRC Function Calculates put prices for European options on stocks, based on the Margrabe model.
MORT Function Returns amortization parameters.
NETPV Function Returns the net present value as a fraction.
NPV Function Returns the net present value with the rate expressed as a percentage.
PVP Function Returns the present value for a periodic cash flow stream (such as a bond), with repayment of principal at maturity.
SAVING Function Returns the future value of a periodic saving.
YIELDP Function Returns the yield-to-maturity for a periodic cash flow stream, such as a bond.

产生随机数函数 Random Number

CALL RANBIN Routine Returns a random variate from a binomial distribution.
CALL RANCAU Routine Returns a random variate from a Cauchy distribution.
CALL RANEXP Routine Returns a random variate from an exponential distribution.
CALL RANGAM Routine Returns a random variate from a gamma distribution.
CALL RANNOR Routine Returns a random variate from a normal distribution.
CALL RANPOI Routine Returns a random variate from a Poisson distribution.
CALL RANTBL Routine Returns a random variate from a tabled probability distribution.
CALL RANTRI Routine Returns a random variate from a triangular distribution.
CALL RANUNI Routine Returns a random variate from a uniform distribution.
CALL STREAMINIT Routine Specifies a seed value to use for subsequent random number generation by the RAND function.
NORMAL Function Returns a random variate from a normal, or Gaussian, distribution.
RANBIN Function Returns a random variate from a binomial distribution.
RANCAU Function Returns a random variate from a Cauchy distribution.
RAND Function Generates random numbers from a distribution that you specify.
RANEXP Function Returns a random variate from an exponential distribution.
RANGAM Function Returns a random variate from a gamma distribution.
RANNOR Function Returns a random variate from a normal distribution.
RANPOI Function Returns a random variate from a Poisson distribution.
RANTBL Function Returns a random variate from a tabled probability distribution.
RANTRI Function Returns a random variate from a triangular distribution.
RANUNI Function Returns a random variate from a uniform distribution.
UNIFORM Function Returns a random variate from a uniform distribution.

SAS文件IO函数 SAS File I/O

ATTRC Function Returns the value of a character attribute for a SAS data set.
ATTRN Function Returns the value of a numeric attribute for a SAS data set.
CEXIST Function Verifies the existence of a SAS catalog or SAS catalog entry.
CLOSE Function Closes a SAS data set.
CUROBS Function Returns the observation number of the current observation.
DROPNOTE Function Deletes a note marker from a SAS data set or an external file.
DSNAME Function Returns the SAS data set name that is associated with a data set identifier.
ENVLEN Function Returns the length of an environment variable.
EXIST Function Verifies the existence of a SAS library member.
FETCH Function Reads the next non-deleted observation from a SAS data set into the Data Set Data Vector (DDV).
FETCHOBS Function Reads a specified observation from a SAS data set into the Data Set Data Vector (DDV).
GETVARC Function Returns the value of a SAS data set character variable.
GETVARN Function Returns the value of a SAS data set numeric variable.
IORCMSG Function Returns a formatted error message for _IORC_.
LIBNAME Function Assigns or deassigns a libref for a SAS library.
LIBREF Function Verifies that a libref has been assigned.
NOTE Function Returns an observation ID for the current observation of a SAS data set.
OPEN Function Opens a SAS data set.
PATHNAME Function Returns the physical name of an external file or a SAS library, or returns a blank.
POINT Function Locates an observation that is identified by the NOTE function.
RENAME Function Renames a member of a SAS library, an entry in a SAS catalog, an external file, or a directory.
REWIND Function Positions the data set pointer at the beginning of a SAS data set.
SYSMSG Function Returns error or warning message text from processing the last data set or external file function.
SYSRC Function Returns a system error number.
VARFMT Function Returns the format that is assigned to a SAS data set variable.
VARINFMT Function Returns the informat that is assigned to a SAS data set variable.
VARLABEL Function Returns the label that is assigned to a SAS data set variable.
VARLEN Function Returns the length of a SAS data set variable.
VARNAME Function Returns the name of a SAS data set variable.
VARNUM Function Returns the number of a variable’s position in a SAS data set.
VARTYPE Function Returns the data type of a SAS data set variable.

特殊函数 Special

ADDR Function Returns the memory address of a variable on a 32-bit platform.
ADDRLONG Function Returns the memory address of a variable on 32-bit and 64-bit platforms.
CALL POKE Routine Writes a value directly into memory on a 32-bit platform.
CALL POKELONG Routine Writes a value directly into memory on 32-bit and 64-bit platforms.
CALL SLEEP Routine For a specified period of time, suspends the execution of a program that invokes this CALL routine.
CALL SYSTEM Routine Submits an operating environment command for execution.
DIF Function Returns differences between an argument and its nth lag.
GETOPTION Function Returns the value of a SAS system or graphics option.
INPUT Function Returns the value that is produced when SAS converts an expression using the specified informat.
INPUTC Function Enables you to specify a character informat at run time.
INPUTN Function Enables you to specify a numeric informat at run time.
LAG Function Returns values from a queue.
PEEK Function Stores the contents of a memory address in a numeric variable on a 32-bit platform.
PEEKC Function Stores the contents of a memory address in a character variable on a 32-bit platform.
PEEKCLONG Function Stores the contents of a memory address in a character variable on 32-bit and 64-bit platforms.
PEEKLONG Function Stores the contents of a memory address in a numeric variable on 32-bit and 64-bit platforms.
PTRLONGADD Function Returns the pointer address as a character variable on 32-bit and 64-bit platforms.
PUT Function Returns a value using a specified format.
PUTC Function Enables you to specify a character format at run time.
PUTN Function Enables you to specify a numeric format at run time.
SLEEP Function For a specified period of time, suspends the execution of a program that invokes this function.
SYSGET Function Returns the value of the specified operating environment variable.
SYSPARM Function Returns the system parameter string.
SYSPROCESSID Function Returns the process ID of the current process.
SYSPROCESSNAME Function Returns the process name that is associated with a given process ID, or returns the name of the current process.
SYSPROD Function Determines whether a product is licensed.
SYSTEM Function Issues an operating environment command during a SAS session, and returns the system return code.
UUIDGEN Function Returns the short or binary form of a Universal Unique Identifier (UUID).

变量信息函数 Variable Information

CALL VNEXT Routine Returns the name, type, and length of a variable that is used in a DATA step.
VARRAY Function Returns a value that indicates whether the specified name is an array.
VARRAYX Function Returns a value that indicates whether the value of the specified argument is an array.
VFORMAT Function Returns the format that is associated with the specified variable.
VFORMATD Function Returns the decimal value of the format that is associated with the specified variable.
VFORMATDX Function Returns the decimal value of the format that is associated with the value of the specified argument.
VFORMATN Function Returns the format name that is associated with the specified variable.
VFORMATNX Function Returns the format name that is associated with the value of the specified argument.
VFORMATW Function Returns the format width that is associated with the specified variable.
VFORMATWX Function Returns the format width that is associated with the value of the specified argument.
VFORMATX Function Returns the format that is associated with the value of the specified argument.
VINARRAY Function Returns a value that indicates whether the specified variable is a member of an array.
VINARRAYX Function Returns a value that indicates whether the value of the specified argument is a member of an array.
VINFORMAT Function Returns the informat that is associated with the specified variable.
VINFORMATD Function Returns the decimal value of the informat that is associated with the specified variable.
VINFORMATDX Function Returns the decimal value of the informat that is associated with the value of the specified variable.
VINFORMATN Function Returns the informat name that is associated with the specified variable.
VINFORMATNX Function Returns the informat name that is associated with the value of the specified argument.
VINFORMATW Function Returns the informat width that is associated with the specified variable.
VINFORMATWX Function Returns the informat width that is associated with the value of the specified argument.
VINFORMATX Function Returns the informat that is associated with the value of the specified argument.
VLABEL Function Returns the label that is associated with the specified variable.
VLABELX Function Returns the label that is associated with the value of the specified argument.
VLENGTH Function Returns the compile-time (allocated) size of the specified variable.
VLENGTHX Function Returns the compile-time (allocated) size for the variable that has a name that is the same as the value of the argument.
VNAME Function Returns the name of the specified variable.
VNAMEX Function Validates the value of the specified argument as a variable name.
VTYPE Function Returns the type (character or numeric) of the specified variable.
VTYPEX Function Returns the type (character or numeric) for the value of the specified argument.
VVALUE Function Returns the formatted value that is associated with the variable that you specify.
VVALUEX Function Returns the formatted value that is associated with the argument that you specify.

美国人专用函数 与地理位置有关的一些函数 美国人对美国人真好

函数名 作用
Distance

距离函数

GEODIST Function Returns the geodetic distance between two latitude and longitude coordinates.
ZIPCITYDISTANCE Function Returns the geodetic distance between two zip code locations.
State and Zip Code

州和邮政编码

FIPNAME Function Converts two-digit FIPS codes to uppercase state names.
FIPNAMEL Function Converts two-digit FIPS codes to mixed case state names.
FIPSTATE Function Converts two-digit FIPS codes to two-character state postal codes.
STFIPS Function Converts state postal codes to FIPS state codes.
STNAME Function Converts state postal codes to uppercase state names.
STNAMEL Function Converts state postal codes to mixed case state names.
ZIPCITY Function Returns a city name and the two-character postal code that corresponds to a zip code.
ZIPCITYDISTANCE Function Returns the geodetic distance between two zip code locations.
ZIPFIPS Function Converts zip codes to two-digit FIPS codes.
ZIPNAME Function Converts zip codes to uppercase state names.
ZIPNAMEL Function Converts zip codes to mixed case state names.
ZIPSTATE Function Converts zip codes to two-character state postal codes.