最全的SAS9.2函数列表二 | 数据分析网 首页 分类阅读 行业资讯 大数据 统计学 数据分析 数
时间: 2016-04-17来源:数据分析网
前景提要
第二类 函数 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 WAKEUP
Calls a specific routine or module that resides in an external dynamic link library (DLL). 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 VMS
Writes characters to the channel assigned by TTOPEN. 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 WTO
Issues a TSO command or invokes a CLIST or a REXX exec during a SAS session. 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 %UPCASE, %QUPCASE
During macro execution, unmasks all special characters and mnemonic operators for a value. 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 UNICODEWIDTH
Specifies the length of the character unit for the Unicode data. 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
本文为 数据分析网 原创文章,转载或内容合作请联系我们,未经允许谢绝转载,本文链接:https://www.afenxi.com/14306.html 。

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行