SAS函数介绍
SAS基础表达式及函数简介

数值自动转换为字符
data; X=’abcd’; /*X为字符变量 */ Y=123; /*Y为数值变量 */ X=Y; /*自动将数值变量Y转换为字符变量 */ run;
注意: 将数值变量赋给字符变量时,结果会受到字符变量长
度的影响!长度不足时,SAS尽量转换成能够满足长度限 制的结果,即科学记数法。
字符型变量可以取字符、字母、特殊字符以及数字为 值。 在DATA步中某些SAS语句中,第一次出现的变量名 后跟一个美元符号($),即表明该变量是字符型变量 ,如name$ 或name $。如果变量后不加$符号,SAS将 该变量认为数值型。 在SAS中一个字符变量的取值可以有1-32768个字 符长,默认长度为8个字符长;或由第一次赋值时字符 长度决定。
1-EXP(N/(N-1)) A=B=C
STATE=‘CA’
AGE<100
在DATA步中,为了对变量进行变换,建立新变量、条件处理、计 算新值及指定新值,都需要使用SAS表达式。
Slide 2
一、SAS常数 SAS常数用来表示固定的值,它或者是一个数字,
或者是用引号引起来的字符串、或者是其它特殊记号。 SAS使用的常数有五种类型:数值常量、字符常量、
SAS系统中,数值缺失值用小数点来(.)表示。
Slide 3
2.字符常量 字符常量是由(单)引号括起来的字符串.
例如,在下面的语句中: IF name=‘TOM’ THEN DO; ‘TOM’就是一个字符常量。 如果字符常量含有引号,则用两个连续的单引号来处 理。例如,字符值为TOM’S时,输入: name=’TOM’’S’ 缺失的字符常量值为空字符,表示为’’或””(两个连续的 单引号或双引号)。
SAS常用函数介绍

SAS常用函数介绍
SAS常用函数介绍
SAS的功能非常强大和全面,这一点在函数上得到了极为充分的体现,SAS 8.2中共有25大类函数,功能涉及到文件管理、金触、数学计算、统计计算、字符串处理、货币转换等各个方面。
因篇幅限制,这里无法将数百种函数一一解释,只列举出饺为常用的十大类函数,关于这些函数的详细信息,以及术列出的货币转换函数、金融函数、地区以及邮政编码函数等相关信息请大家参见SAS帮助。
1.算术函数
2.字符函数
3.数学函数
4.概率与密度函数
5.分位数函数
6.随机函数
7.样本统计函数
8.三角函数
9.截断函数
10.日期时间函数。
SAS 函数

CINV(p,df,nc)
其中:0=<p<=1, df>0, nc>=0
计算自由度为df,非中心参数为nc的卡方分布的
p分位数。
data;
x=cinv(0.95,2);
proc print;
run;
x=5.99
P=0.0521622862
分位数函数
1 正态分布分位数
Probit(p) 其中,0=<p<=1 计算标准正态分布的分位数,它是概率函数
probnorm的逆函数。 例:验证probit是probnorm的逆函数 data; P=probnorm(probit(0.025)); put P=; run;
使用SAS函数: least=min(sum(of x1-x10),y);
二、SAS函数自变量与结果
1 函数自变量
函数举例
自变量类型
Max(X,Y);
变量名
X=Repeat(‘—‘,20);
常数
Least=Min(sum(of x1-x10),y); 变量名和函数
Num=sum(if x1>0),(if x2>0)); 表达式
二、函数的用法
1。用于组合表达式和条件语句 data a; set ResDat.idx000001; where year(date)>1996; run;
2。用于处理多变量 不用SAS函数: totx=x1+x2+x3+x4+x5+x6+x7+x8+x9; if totx<y then least=totx; else least=y;
Probt(x,df,nc) 计算自由度为df,非中心参数为nc的t分布随机变量
【BaseFunctions】SAS常用数学函数

【BaseFunctions】SAS常⽤数学函数ABS(x): 返回x的绝对值BETA(a, b): 返回Beta函数的值。
Beta函数的数学表达式:\(\beta{\left(a,b\right)} = \int_{0}^{1} x^{a-1}(1-x)^{b-1}dx =\frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}\)COALESCE(argument-1 <..., argument-n>): 返回参数argument-1, ..., argument-n中的第⼀个⾮缺失值CONSTANT(constant, <, parameter>): 返回⼀些常数数值。
参数constant指定常数名称,参数parameter依赖于参数constant。
DIGAMMA(argument): 返回双伽玛函数的值。
双伽玛(Digamma)函数表达式:\(\Psi(x) = \frac{\Gamma^{'}(x)}{\Gamma(x)}\)ERF(argument): 返回误差函数的值。
误差函数表达式:\(\mathbf{ERF}(x) = \frac{2}{\sqrt{\pi}}\int_{0}^{x}\epsilon^{-z^2} dz\)ERFC(argument): 返回互补误差函数的值。
互补误差函数表达式:\(\mathbf{ERFC}(x) = 1- \frac{2}{\sqrt{\pi}}\int_{0}^{x}\epsilon^{-z^2} dz\)EXP(argument): 返回指数函数的值FACT(n): 返回n的阶乘GAMMA(argument): 返回Gamma函数的值。
Gamma函数表达式:\(\Gamma(x) = \int_0^{\infty} t^{x-1}\epsilon^{-t}dt\)GCD(x1, x2, ..., xn): 返回⼀个或多个整数的最⼤公约数LCM(x1, x2, ..., xn): 返回⼀个或多个整数的最⼩公倍数LGAMMA(argument): 返回Gamma函数的值的⾃然对数。
SAS函数全量(齐全)

CAT Function Does not remove leading or trailing blanks, and returns a concatenated character string.
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.
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.
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.
sas 循环函数

sas 循环函数1. DO循环:SAS中最基本也是最常用的循环函数是DO循环。
它允许用户按照给定的次数重复执行一段代码。
DO循环的语法如下:```DO index_variable = start_value TO stop_value BY increment_value;/* 重复执行的代码 */END;```在这个循环中,index_variable是循环索引变量,start_value是索引的起始值,stop_value是索引的结束值,increment_value是每次循环迭代中索引的增量。
例如,下面的代码将打印1到10之间所有的奇数:```DATA test;DO i = 1 TO 10 BY 2;IF mod(i, 2) = 1 THENPUT i;END;RUN;2. DO WHILE循环:DO WHILE循环是一种基于条件的循环函数。
它在每次循环迭代之前检查一个条件,只有在条件满足时才继续执行。
DO WHILE循环的语法如下:```DO WHILE (condition);/* 循环执行的代码 */END;```在这个循环中,condition是一个逻辑表达式,只有在条件为TRUE时才会继续执行循环体中的代码。
例如,下面的代码将重复从1开始加1,直到总和超过100:```DATA test;total = 0;count = 0;DO WHILE (total < 100);count = count + 1;total = total + count;END;PUT count total;RUN;3. DO UNTIL循环:DO UNTIL循环与DO WHILE循环非常相似,只是在判断条件的时候相反。
即只有在条件为FALSE时才继续执行循环体中的代码。
DO UNTIL循环的语法如下:```DO UNTIL (condition);/* 循环执行的代码 */END;```在这个循环中,condition是一个逻辑表达式,只有在条件为FALSE时才会继续执行循环体中的代码。
常用SAS函数简介

152.3 146.7
150.6 148.1
5. 截取函数简介
SAS截取函数应用举例
例5:请把STD=1.92354和CV=0.601106用 3个不同的截取函数(ceil、int、round)进行运 算,并分析这些函数的作用。
q1=2.9199855804 q2=13.894376071
利用HELP查找SAS系统提供的各种函数
Help下拉菜单
SAS 帮助 与文件
索引中键入: SAS Function
SAS函数种类
在SAS系统9.1版本,SAS函数分为二十五种类型, 分别是算术函数、截取函数、数学函数、概率 和密度函数、分位数函数、非中心函数、样本 统计函数、随机数函数、财政金融函数、日期 和时间函数、换算函数和特殊函数等。 在SAS系统6.12版本,SAS函数分为十七种类型 共有178个,SAS系统8.1版本,SAS函数分为二十 二种类型共有319个函数。
例1.2: 以日为单位计算当前日期的天数。
data; x=date (); y=today(); format x y yymmdd10.; put x= y=; run;
例1.3: 将时间值换算为以秒计数的 计算方法。
data; hms=hms (21,50,51); put hms=; x=21*60*60+50*60+51; put x=; mdy=mdy (08,18,2001); put mdy=; format mdy yymmdd10.; run;
练习1
计算以下数据表中日期值所在的年季月以及 处于某月的第几天、某周的第几天。
Date 1991-01-02 1991-01-03 1991-01-04 1991-01-05 1991-01-07 1991-01-08 1991-01-09 1991-01-10 1991-01-11 1991-01-12
2.SAS基础_表达式及函数简介

变量类型转换
字符自动转换为数值(无法转换为数值时,取缺失值)
data; X=1; /*X为数值变量 */ Y=’10’; /*Y为字符变量 */ X=Y; /*将字符变量赋值给一个数值变量时, 自动将字符变量Y转换为数值变量 */ run; data; X=1; /*X为数值变量 */ Y=’10’; /*Y为字符变量 */ Z=X+Y; /*算术表达式中有字符变量时,自动将字符变量Y 转换为数值变量 */ run;
Slide 10
创建变量
使用赋值语句
Data a; x=1; run;/*数据集a中有个变量x,值为1,为数值型*/
使用INPUT语句
Data b; Input x $ y z; Datalines; Aaa 23 45 ; Run; /*创建三个变量,x为字符型,y、z为数值型*/
Slide 11
Slide 25
二 SAS函数的参数
参数类型 • 变量名 • 常数 • 函数
• 表达式 函数及其参数类型举例。
函数举例 Max(X,Y); X=Repeat(‘---‘, 20); Least=Min(sum(of x1-x10),y) ; 参数类型 变量名X,Y 常数 变量名和函数
SAS表达式及函数简介
Slide 1
SAS表达式
SAS表达式是由一系列算符和运算对象形成的一个指令集,它 被执行后产生一个目标值。 运算对象是SAS变量和SAS常数;算符是特殊的运算符、函数 和括号。
表达式分为简单表达式和复合表达式。 下列式子都是表达式。 X+1 3 LOG(X) LOG10(X) P/A*100 1-EXP(N/(N-1)) A=B=C STATE=‘CA’
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Functions and CALL Routines by CategoryCategories and Descriptions of Functions Category Function DescriptionArray DIM Returns the number of elements in an arrayHBOUND Returns the upper bound of an arrayLBOUND Returns the lower bound of an arrayBitwise Logical Operations BAND Returns the bitwise logical AND of two argumentsBLSHIFT Returns the bitwise logical left shift of two argumentsBNOT Returns the bitwise logical NOT of an argumentBOR Returns the bitwise logical OR of two argumentsBRSHIFT Returns the bitwise logical right shift of two argumentsBXOR Returns the bitwise logical EXCLUSIVE OR of two argumentsCharacter String Matching CALL RXCHANGE Changes one or more substrings that match a patternCALL RXFREE Frees memory allocated by other regular expression_r(RX) functions and CALL routinesCALL RXSUBSTR Finds the position, length, and score of a substring that matches a patternRXMA TCH Finds the beginning of a substring that matches a pattern and returns a valueRXPARSE Parses a pattern and returns a valueCharacter BYTE Returns one character in the ASCII or the EBCDIC collating sequenceCOLLATE Returns an ASCII or EBCDIC collating sequence character stringCOMPBL Removes multiple blanks from a character stringCOMPRESS Removes specific characters from a character stringDEQUOTE Removes quotation marks from a character valueINDEX Searches a character expression for a string of charactersINDEXC Searches a character expression for specific charactersINDEXW Searches a character expression for a specified string as a wordLEFT Left aligns a SAS character expressionLENGTH Returns the length of an argumentLOWCASE Converts all letters in an argument to lowercaseMISSING Returns a numeric result that indicates whether the argument contains a missing valueQUOTE Adds double quotation marks to a character valueRANK Returns the position of a character in the ASCII or EBCDIC collating sequenceREPEAT Repeats a character expressionREVERSE Reverses a character expressionRIGHT Right aligns a character expressionSCAN Selects a given word from a character expressionSOUNDEX Encodes a string to facilitate searchingSPEDIS Determines the likelihood of two words matching, expressed as the asymmetric spelling distance between the two wordsSUBSTR (left of =) Replaces character value contentsSUBSTR (right of =) Extracts a substring from an argumentTRANSLATE Replaces specific characters in a character expressionTRANWRD Replaces or removes all occurrences of a word in a character stringTRIM Removes trailing blanks from character expressions and returns one blank if the expression is missingTRIMN Removes trailing blanks from character expressions and returns a null string (zero blanks) if the expression is missingUPCASE Converts all letters in an argument to uppercaseVERIFY Returns the position of the first character that is unique to an expressionDBCS KCOMPARE Returns the result of a comparison of character stringsKCOMPRESS Removes specific characters from a character stringKCOUNT Returns the number of double-byte characters in a stringKINDEX Searches a character expression for a string of charactersKINDEXC Searches a character expression for specific charactersKLEFT Left aligns a SAS character expression by removing unnecessary leading DBCS blanks and SO/SIKLENGTH Returns the length of an argumentKLOWCASE Converts all letters in an argument to lowercaseKREVERSE Reverses a character expressionKRIGHT Right aligns a character expression by trimming trailing DBCS blanks and SO/SIKSCAN Selects a given word from a character expressionKSTRCA T Concatenates two or more character stringsKSUBSTR Extracts a substring from an argumentKSUBSTRB Extracts a substring from an argument based on byte positionKTRANSLATE Replaces specific characters in a character expressionKTRIM Removes trailing DBCS blanks and SO/SI from character expressionsKTRUNCATE Truncates a numeric value to a specified lengthKUPCASE Converts all single-byte letters in an argument to uppercaseKUPDATE Inserts, deletes, and replaces character value contentsKUPDATEB Inserts, deletes, and replaces character value contents based on byte unitKVERIFY Returns the position of the first character that is unique to an expressionDate and Time DATDIF Returns the number of days between two datesDA TE Returns the current date as a SAS date valueDA TEJUL Converts a Julian date to a SAS date valueDA TEPART Extracts the date from a SAS datetime valueDA TETIME Returns the current date and time of day as a SAS datetime valueDAY Returns the day of the month from a SAS date valueDHMS Returns a SAS datetime value from date, hour, minute, and secondHMS Returns a SAS time value from hour, minute, and second valuesHOUR Returns the hour from a SAS time or datetime valueINTCK Returns the integer number of time intervals in a given time spanINTNX Advances a date, time, or datetime value by a given interval, and returns a date, time, or datetime valueJULDATE Returns the Julian date from a SAS date valueJULDATE7 Returns a seven-digit Julian date from a SAS date valueMDY Returns a SAS date value from month, day, and year valuesMINUTE Returns the minute from a SAS time or datetime valueMONTH Returns the month from a SAS date valueQTR Returns the quarter of the year from a SAS date valueSECOND Returns the second from a SAS time or datetime valueTIME Returns the current time of dayTIMEPART Extracts a time value from a SAS datetime valueTODAY Returns the current date as a SAS date valueWEEKDAY Returns the day of the week from a SAS date valueYEAR Returns the year from a SAS date valueYRDIF Returns the difference in years between two datesYYQ Returns a SAS date value from the year and quarterDescriptive Statistics CSS Returns the corrected sum of squaresCV Returns the coefficient of variationKURTOSIS Returns the kurtosisMAX Returns the largest valueMEAN Returns the arithmetic mean (average)MIN Returns the smallest valueMISSING Returns a numeric result that indicates whether the argument contains a missing valueN Returns the number of nonmissing valuesNMISS Returns the number of missing valuesORDINAL Returns any specified order statisticRANGE Returns the range of valuesSKEWNESS Returns the skewnessSTD Returns the standard deviationSTDERR Returns the standard error of the meanSUM Returns the sum of the nonmissing argumentsUSS Returns the uncorrected sum of squaresV AR Returns the varianceExternal Files DCLOSE Closes a directory that was opened by the DOPEN function and returns a valueDINFO Returns information about a directoryDNUM Returns the number of members in a directoryDOPEN Opens a directory and returns a directory identifier valueDOPTNAME Returns directory attribute informationDOPTNUM Returns the number of information items that are available for a directoryDREAD Returns the name of a directory memberDROPNOTE Deletes a note marker from a SAS data set or an external file and returns a value FAPPEND Appends the current record to the end of an external file and returns a value FCLOSE Closes an external file, directory, or directory member, and returns a valueFCOL Returns the current column position in the File Data Buffer (FDB)FDELETE Deletes an external file or an empty directoryFEXIST Verifies the existence of an external file associated with a fileref and returns a value FGET Copies data from the File Data Buffer (FDB) into a variable and returns a value FILEEXIST Verifies the existence of an external file by its physical name and returns a valueFILENAME Assigns or deassigns a fileref for an external file, directory, or output device and returns a valueFILEREF Verifies that a fileref has been assigned for the current SAS session and returns a value FINFO Returns the value of a file information itemFNOTE Identifies the last record that was read and returns a value that FPOINT can useFOPEN Opens an external file and returns a file identifier valueFOPTNAME Returns the name of an item of information about a fileFOPTNUM Returns the number of information items that are available for an external file FPOINT Positions the read pointer on the next record to be read and returns a valueFPOS Sets the position of the column pointer in the File Data Buffer (FDB) and returns a valueFPUT Moves data to the File Data Buffer (FDB) of an external file, starting at the FDB's current column position, and returns a valueFREAD Reads a record from an external file into the File Data Buffer (FDB) and returns a valueFREWIND Positions the file pointer to the start of the file and returns a valueFRLEN Returns the size of the last record read, or, if the file is opened for output, returns the current record sizeFSEP Sets the token delimiters for the FGET function and returns a valueFWRITE Writes a record to an external file and returns a valueMOPEN Opens a file by directory id and member name, and returns the file identifier or a 0PATHNAME Returns the physical name of a SAS data library or of an external file, or returns a blankSYSMSG Returns the text of error messages or warning messages from the last data set or external file function executionSYSRC Returns a system error numberExternal Routines CALL MODULE Calls the external routine without any return codeCALL MODULEI Calls the external routine without any return code (in IML environment only)MODULEC Calls an external routine and returns a character valueMODULEIC Calls an external routine and returns a character value (in IML environment only)MODULEIN Calls an external routine and returns a numeric value (in IML environment only)MODULEN Calls an external routine and returns a numeric valueFinancial COMPOUND Returns compound interest parametersCONVX Returns the convexity for an enumerated cashflowCONVXP Returns the convexity for a periodic cashflow stream, such as a bondDACCDB Returns the accumulated declining balance depreciationDACCDBSL Returns the accumulated declining balance with conversion to a straight-line depreciationDACCSL Returns the accumulated straight-line depreciationDACCSYD Returns the accumulated sum-of-years-digits depreciationDACCTAB Returns the accumulated depreciation from specified tablesDEPDB Returns the declining balance depreciationDEPDBSL Returns the declining balance with conversion to a straight-line depreciationDEPSL Returns the straight-line depreciationDEPSYD Returns the sum-of-years-digits depreciationDEPTAB Returns the depreciation from specified tablesDUR Returns the modified duration for an enumerated cashflowDURP Returns the modified duration for a periodic cashflow stream, such as a bondINTRR Returns the internal rate of return as a fractionIRR Returns the internal rate of return as a percentageMORT Returns amortization parametersNETPV Returns the net present value as a fractionNPV Returns the net present value with the rate expressed as a percentagePVP Returns the present value for a periodic cashflow stream, such as a bondSA VING Returns the future value of a periodic savingYIELDP Returns the yield-to-maturity for a periodic cashflow stream, such as a bond Hyperbolic COSH Returns the hyperbolic cosineSINH Returns the hyperbolic sineTANH Returns the hyperbolic tangentMacro CALL EXECUTE Resolves an argument and issues the resolved value for executionCALL SYMPUT Assigns DATA step information to a macro variableRESOLVE Returns the resolved value of an argument after it has been processed by the macrofacilitySYMGET Returns the value of a macro variable during DATA step executionMathematical ABS Returns the absolute valueAIRY Returns the value of the airy functionCNONCT Returns the noncentrality parameter from a chi-squared distributionCOMB Computes the number of combinations of n elements taken r at a time and returns a value CONSTANT Computes some machine and mathematical constants and returns a valueDAIRY Returns the derivative of the airy functionDEVIANCE Computes the deviance and returns a valueDIGAMMA Returns the value of the DIGAMMA functionERF Returns the value of the (normal) error functionERFC Returns the value of the complementary (normal) error functionEXP Returns the value of the exponential functionFACT Computes a factorial and returns a valueFNONCT Returns the value of the noncentrality parameter of an F distributionGAMMA Returns the value of the Gamma functionIBESSEL Returns the value of the modified bessel functionJBESSEL Returns the value of the bessel functionLGAMMA Returns the natural logarithm of the Gamma functionLOG Returns the natural (base e) logarithmLOG10 Returns the logarithm to the base 10LOG2 Returns the logarithm to the base 2MOD Returns the remainder valuePERM Computes the number of permutations of n items taken r at a time and returns a valueSIGN Returns the sign of a valueSQRT Returns the square root of a valueTNONCT Returns the value of the noncentrality parameter from the student's t distributionTRIGAMMA Returns the value of the TRIGAMMA functionProbability CDF Computes cumulative distribution functionsLOGPDF Computes the logarithm of a probability (mass) functionLOGSDF Computes the logarithm of a survival functionPDF Computes probability density (mass) functionsPOISSON Returns the probability from a Poisson distributionPROBBETA Returns the probability from a beta distributionPROBBNML Returns the probability from a binomial distributionPROBBNRM Computes a probability from the bivariate normal distribution and returns a value PROBCHI Returns the probability from a chi-squared distributionPROBF Returns the probability from an F distributionPROBGAM Returns the probability from a gamma distributionPROBHYPR Returns the probability from a hypergeometric distributionPROBMC Computes a probability or a quantile from various distributions for multiple comparisons of means, and returns a valuePROBNEGB Returns the probability from a negative binomial distributionPROBNORM Returns the probability from the standard normal distributionPROBT Returns the probability from a t distributionSDF Computes a survival functionQuantile BETAINV Returns a quantile from the beta distributionCINV Returns a quantile from the chi-squared distributionFINV Returns a quantile from the F distributionGAMINV Returns a quantile from the gamma distributionPROBIT Returns a quantile from the standard normal distributionTINV Returns a quantile from the t distributionRandom Number CALL RANBIN Returns a random variate from a binomial distribution CALL RANCAU Returns a random variate from a Cauchy distributionCALL RANEXP Returns a random variate from an exponential distributionCALL RANGAM Returns a random variate from a gamma distributionCALL RANNOR Returns a random variate from a normal distributionCALL RANPOI Returns a random variate from a Poisson distributionCALL RANTBL Returns a random variate from a tabled probability distributionCALL RANTRI Returns a random variate from a triangular distributionCALL RANUNI Returns a random variate from a uniform distributionNORMAL Returns a random variate from a normal distributionRANBIN Returns a random variate from a binomial distributionRANCAU Returns a random variate from a Cauchy distributionRANEXP Returns a random variate from an exponential distributionRANGAM Returns a random variate from a gamma distributionRANNOR Returns a random variate from a normal distributionRANPOI Returns a random variate from a Poisson distributionRANTBL Returns a random variate from a tabled probabilityRANTRI Random variate from a triangular distributionRANUNI Returns a random variate from a uniform distributionUNIFORM Random variate from a uniform distributionSAS File I/O ATTRC Returns the value of a character attribute for a SAS data setATTRN Returns the value of a numeric attribute for the specified SAS data setCEXIST Verifies the existence of a SAS catalog or SAS catalog entry and returns a valueCLOSE Closes a SAS data set and returns a valueCUROBS Returns the observation number of the current observationDROPNOTE Deletes a note marker from a SAS data set or an external file and returns a valueDSNAME Returns the SAS data set name that is associated with a data set identifierEXIST Verifies the existence of a SAS data library memberFETCH Reads the next nondeleted observation from a SAS data set into the Data Set Data Vector (DDV) and returns a valueFETCHOBS Reads a specified observation from a SAS data set into the Data Set Data Vector (DDV) and returns a valueGETV ARC Returns the value of a SAS data set character variableGETV ARN Returns the value of a SAS data set numeric variableIORCMSG Returns a formatted error message for _IORC_LIBNAME Assigns or deassigns a libref for a SAS data library and returns a valueLIBREF Verifies that a libref has been assigned and returns a valueNOTE Returns an observation ID for the current observation of a SAS data setOPEN Opens a SAS data set and returns a valuePATHNAME Returns the physical name of a SAS data library or of an external file, or returns a blankPOINT Locates an observation identified by the NOTE function and returns a valueREWIND Positions the data set pointer at the beginning of a SAS data set and returns a valueSYSMSG Returns the text of error messages or warning messages from the last data set or external file function executionSYSRC Returns a system error numberV ARFMT Returns the format assigned to a SAS data set variableV ARINFMT Returns the informat assigned to a SAS data set variableV ARLABEL Returns the label assigned to a SAS data set variableV ARLEN Returns the length of a SAS data set variableV ARNAME Returns the name of a SAS data set variableV ARNUM Returns the number of a variable's position in a SAS data setV ARTYPE Returns the data type of a SAS data set variableSpecial ADDR Returns the memory address of a variableCALL POKE Writes a value directly into memoryCALL SYSTEM Submits an operating environment command for executionDIF Returns differences between the argument and its nth lagGETOPTION Returns the value of a SAS system or graphics optionINPUT Returns the value produced when a SAS expression that uses a specified informat expression is readINPUTC Enables you to specify a character informat at run timeINPUTN Enables you to specify a numeric informat at run timeLAG Returns values from a queuePEEK Stores the contents of a memory address into a numeric variablePEEKC Stores the contents of a memory address into a character variablePOKE Writes a value directly into memoryPUT Returns a value using a specified formatPUTC Enables you to specify a character format at run timePUTN Enables you to specify a numeric format at run timeSYSGET Returns the value of the specified operating environment variableSYSPARM Returns the system parameter stringSYSPROD Determines if a product is licensedSYSTEM Issues an operating environment command during a SAS session State and ZIP Code FIPNAME Converts FIPS codes to uppercase state namesFIPNAMEL Converts FIPS codes to mixed case state namesFIPSTATE Converts FIPS codes to two-character postal codesSTFIPS Converts state postal codes to FIPS state codesSTNAME Converts state postal codes to uppercase state namesSTNAMEL Converts state postal codes to mixed case state namesZIPFIPS Converts ZIP codes to FIPS state codesZIPNAME Converts ZIP codes to uppercase state namesZIPNAMEL Converts ZIP codes to mixed case state namesZIPSTA TE Converts ZIP codes to state postal codesTrigonometric ARCOS Returns the arccosineARSIN Returns the arcsineATAN Returns the arctangentCOS Returns the cosineSIN Returns the sineTAN Returns the tangentTruncation CEIL Returns the smallest integer that is greater than or equal to the argumentFLOOR Returns the largest integer that is less than or equal to the argumentFUZZ Returns the nearest integer if the argument is within 1E-12INT Returns the integer valueROUND Rounds to the nearest round-off unitTRUNC Truncates a numeric value to a specified lengthVariable Control CALL LABEL Assigns a variable label to a specified character variableCALL SET Links SAS data set variables to DATA step or macro variables that have the same name and data typeCALL VNAME Assigns a variable name as the value of a specified variableVariable Information V ARRAY Returns a value that indicates whether the specified name is an arrayV ARRAYX Returns a value that indicates whether the value of the specified argument is an arrayVFORMAT Returns the format that is associated with the specified variableVFORMA TD Returns the format decimal value that is associated with the specified variableVFORMA TDX Returns the format decimal value that is associated with the value of the specified argumentVFORMA TN Returns the format name that is associated with the specified variableVFORMA TNX Returns the format name that is associated with the value of the specified argumentVFORMA TW Returns the format width that is associated with the specified variableVFORMA TWX Returns the format width that is associated with the value of the specified argumentVFORMA TX Returns the format that is associated with the value of the specified argumentVINARRAY Returns a value that indicates whether the specified variable is a member of an arrayVINARRAYX Returns a value that indicates whether the value of the specified argument is a member of an arrayVINFORMAT Returns the informat that is associated with the specified variable VINFORMATD Returns the informat decimal value that is associated with the specified variableVINFORMATDX Returns the informat decimal value that is associated with the value of the specified argumentVINFORMATN Returns the informat name that is associated with the specified variableVINFORMATNX Returns the informat name that is associated with the value of the specified argumentVINFORMATW Returns the informat width that is associated with the specified variableVINFORMATWX Returns the informat width that is associated with the value of the specified argumentVINFORMATX Returns the informat that is associated with the value of the specified argument VLABEL Returns the label that is associated with the specified variableVLABELX Returns the variable label for the value of a specified argumentVLENGTH Returns the compile-time (allocated) size of the specified variableVLENGTHX Returns the compile-time (allocated) size for the value of the specified argument VNAME Returns the name of the specified variableVNAMEX Validates the value of the specified argument as a variable nameVTYPE Returns the type (character or numeric) of the specified variableVTYPEX Returns the type (character or numeric) for the value of the specified argumentWeb Tools HTMLDECODE Decodes a string containing HTML numeric character references or HTML character entity references and returns the decoded stringHTMLENCODE Encodes characters using HTML character entity references and returns the encoded stringURLDECODE Returns a string that was decoded using the URL escape syntax URLENCODE Returns a string that was encoded using the URL escape syntax。