SAS函数列表

更新时间:2024-04-06 04:59:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

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

一,常规函数;二,windows环境下函数;三,OpenVMS虚拟内存环境下函数;四,z/OS操作环境下函数,五,宏语言函数;六,多国语言函数,七,其他函数 第一类函数常规函数最常用,数量也最多,这里依次列出所有的常规函数。 Character 字符函数 函数名称

ANYALNUM Function ANYALPHA Function ANYCNTRL Function ANYDIGIT Function ANYFIRST Function ANYGRAPH Function

ANYLOWER Function ANYNAME Function ANYPRINT Function ANYPUNCT Function ANYSPACE Function ANYUPPER

功能

Searches a character string for an alphanumeric character, and returns the first position at which the character is found. Searches a character string for an alphabetic character, and returns the first position at which the character is found.

Searches a character string for a control character, and returns the first position at which that character is found.

Searches a character string for a digit, and returns the first position at which the digit is found.

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. Searches a character string for a graphical character, and returns the first position at which that character is found.

Searches a character string for a lowercase letter, and returns the first position at which the letter is found. 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.

Searches a character string for a printable character, and returns the first position at which that character is found.

Searches a character string for a punctuation character, and returns the first position at which that character is found.

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. Searches a character string for an uppercase letter, and returns the

Function ANYXDIGIT

Function

BYTE Function CALL CATS Routine CALL CATT Routine

CALL CATX Routine CALL

COMPCOST Routine CALL MISSING Routine CALL SCAN Routine CAT Function CATQ Function CATS Function CATT Function CATX Function CHAR Function CHOOSEC Function

first position at which the letter is found.

Searches a character string for a hexadecimal character that

represents a digit, and returns the first position at which that

character is found. Returns one character in the ASCII or the EBCDIC collating sequence.

Removes leading and trailing blanks, and returns a concatenated character string.

Removes trailing blanks, and returns a concatenated character string.

Removes leading and trailing blanks, inserts delimiters, and returns a concatenated character string. Sets the costs of operations for later use by the COMPGED function

Assigns missing values to the specified character or numeric variables.

Returns the position and length of the nth word from a character string.

Does not remove leading or trailing blanks, and returns a concatenated character string.

Concatenates character or numeric values by using a delimiter to separate items and by adding quotation marks to strings that contain the delimiter.

Removes leading and trailing blanks, and returns a concatenated character string.

Removes trailing blanks, and returns a concatenated character string. Removes leading and trailing blanks, inserts delimiters, and returns a character string.

Returns a single character from a specified position in a character string.

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 Returns the first non-missing value from a list of character Function COLLATE Function COMPARE Function COMPBL Function COMPGED Function COMPLEV Function COMPRESS Function COUNT Function COUNTC Function COUNTW Function DEQUOTE Function FIND Function FINDC Function FINDW Function FIRST Function IFC Function

arguments. Returns a character string in ASCII or EBCDIC collating sequence. Returns the position of the leftmost character by which two strings differ, or returns 0 if there is no difference. Removes multiple blanks from a character string. Returns the generalized edit distance between two strings. Returns the Levenshtein edit distance between two strings. Returns a character string with specified characters removed from the original string.

Counts the number of times that a specified substring appears within a character string.

Counts the number of characters in a string that appear or do not appear in a list of characters.

Counts the number of words in a character string.

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.

Searches for a specific substring of characters within a character string.

Searches a string for any character in a list of characters. Returns the character position of a word in a string, or returns the number of the word in a string.

Returns the first character in a character string.

Returns a character value based on whether an expression is true,

INDEX Function INDEXC Function INDEXW Function LEFT Function LENGTH Function LENGTHC Function LENGTHM Function LENGTHN Function LOWCASE Function MD5 Function MISSING Function NLITERAL Function

NOTALNUM Function NOTALPHA Function NOTCNTRL Function NOTDIGIT

false, or missing.

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.

Searches a character expression for any of the specified characters, and returns the position of that character.

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-aligns a character string.

Returns the length of a non-blank character string, excluding trailing blanks, and returns 1 for a blank character string.

Returns the length of a character string, including trailing blanks. Returns the amount of memory (in bytes) that is allocated for a character string.

Returns the length of a character string, excluding trailing blanks. Converts all letters in an argument to lowercase.

Returns the result of the message digest of a specified string. Returns a numeric result that indicates whether the argument contains a missing value.

Converts a character string that you specify to a SAS name literal.

Searches a character string for a non-alphanumeric character, and returns the first position at which the character is found. Searches a character string for a nonalphabetic character, and returns the first position at which the character is found.

Searches a character string for a character that is not a control character, and returns the first position at which that character is found.

Searches a character string for any character that is not a digit, and

Function NOTFIRST Function NOTGRAPH Function

NOTLOWER Function NOTNAME Function NOTPRINT Function NOTPUNCT Function

NOTSPACE Function NOTUPPER Function NOTXDIGIT Function NVALID Function PROPCASE Function QUOTE Function RANK Function REPEAT Function

returns the first position at which that character is found. 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.

Searches a character string for a non-graphical character, and returns the first position at which that character is found.

Searches a character string for a character that is not a lowercase letter, and returns the first position at which that character is found. 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.

Searches a character string for a nonprintable character, and returns the first position at which that character is found.

Searches a character string for a character that is not a punctuation character, and returns the first position at which that character is found.

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.

Searches a character string for a character that is not an uppercase letter, and returns the first position at which that character is found. Searches a character string for a character that is not a hexadecimal character, and returns the first position at which that character is found.

Checks the validity of a character string for use as a SAS variable name.

Converts all words in an argument to proper case. Adds double quotation marks to a character value. Returns the position of a character in the ASCII or EBCDIC collating sequence.

Returns a character value that consists of the first argument repeated n+1 times.

REVERSE Function RIGHT Function SCAN Function SOUNDEX Function SPEDIS Function STRIP Function SUBPAD Function

SUBSTR (left

of =) Function SUBSTR (right of =) Function SUBSTRN Function

TRANSLATE

Function TRANSTRN Function TRANWRD Function TRIM Function TRIMN Function UPCASE Function VERIFY

Reverses a character string. Right aligns a character expression. Returns the nth word from a character string. Encodes a string to facilitate searching.

Determines the likelihood of two words matching, expressed as the asymmetric spelling distance between the two words. Returns a character string with all leading and trailing blanks removed.

Returns a substring that has a length you specify, using blank padding if necessary.

Replaces character value contents.

Extracts a substring from an argument.

Returns a substring, allowing a result with a length of zero.

Replaces specific characters in a character string.

Replaces all occurrences of a substring found in a character string, allowing a zero-length replacement string.

Replaces or removes all occurrences of a substring in a character string.

Removes trailing blanks from a character string, and returns one blank if the string is missing.

Removes trailing blanks from character expressions, and returns a string with a length of zero if the expression is missing. Converts all letters in an argument to uppercase.

Returns the position of the first character in a string that is not in any

Function of several other strings.

日期和时间函数 Date and Time

CALL Converts an ISO 8601 interval to datetime and duration values, IS8601_CONVERT or converts datetime and duration values to an ISO 8601 Routine DATDIF Function DATE Function DATEJUL Function DATEPART Function DATETIME Function DAY Function DHMS Function HMS Function HOLIDAY Function HOUR Function INTCINDEX Function INTCK Function INTCYCLE Function INTFIT Function INTFMT Function INTGET Function INTINDEX Function

interval. Returns the number of days between two dates. Returns the current date as a SAS date value. Converts a Julian date to a SAS date value. Extracts the date from a SAS datetime value.

Returns the current date and time of day as a SAS datetime value.

Returns the day of the month from a SAS date value. Returns a SAS datetime value from date, hour, minute, and second values.

Returns a SAS time value from hour, minute, and second values.

Returns a SAS date value of a specified holiday for a specified year.

Returns the hour from a SAS time or datetime value. Returns the cycle index when a date, time, or datetime interval and value are specified.

Returns the count of the number of interval boundaries between two dates, two times, or two datetime values.

Returns the date, time, or datetime interval at the next higher seasonal cycle when a date, time, or datetime interval is specified.

Returns a time interval that is aligned between two dates. Returns a recommended SAS format when a date, time, or datetime interval is specified.

Returns a time interval based on three date or datetime values. Returns the seasonal index when a date, time, or datetime interval and value are specified.

INTNX Function INTSEAS Function INTSHIFT Function

INTTEST Function JULDATE Function JULDATE7 Function MDY Function MINUTE Function MONTH Function NWKDOM Function QTR Function SECOND Function TIME Function TIMEPART Function TODAY Function WEEK Function WEEKDAY Function YEAR Function YRDIF Function YYQ Function CMISS Function

Increments a date, time, or datetime value by a given time interval, and returns a date, time, or datetime value. Returns the length of the seasonal cycle when a date, time, or datetime interval is specified.

Returns the shift interval that corresponds to the base interval. Returns 1 if a time interval is valid, and returns 0 if a time interval is invalid.

Returns the Julian date from a SAS date value. Returns a seven-digit Julian date from a SAS date value. Returns a SAS date value from month, day, and year values. Returns the minute from a SAS time or datetime value. Returns the month from a SAS date value.

Returns the date for the nth occurrence of a weekday for the specified month and year.

Returns the quarter of the year from a SAS date value. Returns the second from a SAS time or datetime value. Returns the current time of day as a numeric SAS time value. Extracts a time value from a SAS datetime value. Returns the current date as a numeric SAS date value. Returns the week-number value.

From a SAS date value, returns an integer that corresponds to the day of the week.

Returns the year from a SAS date value.

Returns the difference in years between two dates.

Returns a SAS date value from year and quarter year values.

描述统计函数 Descriptive Statistics

Counts the number of missing arguments.

CSS Function Returns the corrected sum of squares.

CV Function EUCLID Function GEOMEAN Function

Returns the coefficient of variation.

Returns the Euclidean norm of the non-missing arguments. Returns the geometric mean.

GEOMEANZ

Function HARMEAN Function

HARMEANZ

Function

IQR Function KURTOSIS Function LARGEST Function LPNORM Function MAD Function MAX Function MEAN Function MEDIAN Function MIN Function MISSING Function N Function NMISS Function ORDINAL

Returns the geometric mean, using zero fuzzing.

Returns the harmonic mean.

Returns the harmonic mean, using zero fuzzing.

Returns the interquartile range. Returns the kurtosis.

Returns the kth largest non-missing value.

Returns the Lp norm of the second argument and subsequent non-missing arguments.

Returns the median absolute deviation from the median. Returns the largest value.

Returns the arithmetic mean (average). Returns the median value. Returns the smallest value.

Returns a numeric result that indicates whether the argument contains a missing value.

Returns the number of non-missing numeric values. Returns the number of missing numeric values.

Returns the kth smallest of the missing and nonmissing values.

Function PCTL Function RANGE Function RMS Function SKEWNESS Function SMALLEST Function STD Function STDERR Function SUM Function SUMABS Function

Returns the percentile that corresponds to the percentage. Returns the range of the nonmissing values.

Returns the root mean square of the nonmissing arguments. Returns the skewness of the nonmissing arguments. Returns the kth smallest nonmissing value.

Returns the standard deviation of the nonmissing arguments. Returns the standard error of the mean of the nonmissing arguments. Returns the sum of the nonmissing arguments.

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 ABS Function AIRY Function BETA Function CALL LOGISTIC Routine CALL

SOFTMAX

Returns the variance of the nonmissing arguments.

数学函数 Mathematical

Returns the absolute value.

Returns the value of the Airy function. Returns the value of the beta function.

Applies the logistic function to each argument.

Returns the softmax value.

Routine CALL STDIZE Routine CALL TANH Routine CNONCT Function COALESCE Function

CONSTANT

Function DAIRY Function DEVIANCE Function DIGAMMA Function ERF Function ERFC Function EXP Function FACT Function FNONCT Function GAMMA Function GCD Function IBESSEL

Standardizes the values of one or more variables.

Returns the hyperbolic tangent.

Returns the noncentrality parameter from a chi-square distribution. Returns the first non-missing value from a list of numeric arguments.

Computes machine and mathematical constants.

Returns the derivative of the AIRY function.

Returns the deviance based on a probability distribution. Returns the value of the digamma function. Returns the value of the (normal) error function.

Returns the value of the complementary (normal) error function. Returns the value of the exponential function. Computes a factorial.

Returns the value of the noncentrality parameter of an F distribution. Returns the value of the gamma function.

Returns the greatest common divisor for one or more integers. Returns the value of the modified Bessel function.

Function JBESSEL Function LCM Function LGAMMA Function LOG Function LOG1PX Function LOG10 Function LOG2 Function LOGBETA Function MOD Function MODZ Function MSPLINT Function SIGN Function SQRT Function TNONCT Function

Returns the value of the Bessel function. Returns the least common multiple.

Returns the natural logarithm of the Gamma function. Returns the natural (base e) logarithm. Returns the log of 1 plus the argument. Returns the logarithm to the base 10. Returns the logarithm to the base 2. Returns the logarithm of the beta function.

Returns the remainder from the division of the first argument by the second argument, fuzzed to avoid most unexpected floating-point results.

Returns the remainder from the division of the first argument by the second argument, using zero fuzzing.

Returns the ordinate of a monotonicity-preserving interpolating spline.

Returns the sign of a value. Returns the square root of a value.

Returns the value of the noncentrality parameter from the Student’s t distribution.

TRIGAMMA

Returns the value of the trigamma function.

Function

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

Returns a value from a cumulative probability distribution.

Function LOGCDF Function LOGPDF Function LOGSDF Function PDF Function POISSON Function PROBBETA Function

PROBBNML

Function

PROBBNRM

Function PROBCHI Function PROBF Function PROBGAM Function PROBHYPR Function PROBMC Function PROBNEGB Function

PROBNORM

Function PROBT Function SDF

Returns the logarithm of a left cumulative distribution function. Returns the logarithm of a probability density (mass) function. Returns the logarithm of a survival function.

Returns a value from a probability density (mass) distribution. Returns the probability from a Poisson distribution. Returns the probability from a beta distribution.

Returns the probability from a binomial distribution.

Returns a probability from a bivariate normal distribution.

Returns the probability from a chi-square distribution. Returns the probability from an F distribution. Returns the probability from a gamma distribution. Returns the probability from a hypergeometric distribution. Returns a probability or a quantile from various distributions for multiple comparisons of means.

Returns the probability from a negative binomial distribution.

Returns the probability from the standard normal distribution.

Returns the probability from a t distribution. Returns a survival function.

Function

二进制逻辑操作符 Bitwise Logical Operations BAND Function BLSHIFT Function BNOT Function BOR Function BRSHIFT Function BXOR Function DIM Function HBOUND Function LBOUND Function

Returns the bitwise logical AND of two arguments. Returns the bitwise logical left shift of two arguments. Returns the bitwise logical NOT of an argument. Returns the bitwise logical OR of two arguments. Returns the bitwise logical right shift of two arguments. Returns the bitwise logical EXCLUSIVE OR of two arguments.

数组函数 Array

Returns the number of elements in an array. Returns the upper bound of an array. Returns the lower bound of an array.

字符串配对函数 Character String Matching

CALL

PRXCHANGE Performs a pattern-matching replacement. Routine CALL

PRXDEBUG Routine CALL PRXFREE Routine CALL

PRXNEXT Routine CALL

Enables Perl regular expressions in a DATA step to send debugging output to the SAS log.

Frees memory that was allocated for a Perl regular expression.

Returns the position and length of a substring that matches a pattern, and iterates over multiple matches within one string. Returns the start position and length for a capture buffer.

PRXPOSN Routine CALL

PRXSUBSTR Routine

Returns the position and length of a substring that matches a pattern.

PRXCHANGE

Performs a pattern-matching replacement.

Function PRXMATCH Function PRXPAREN Function PRXPARSE Function PRXPOSN Function ALLCOMB Function ALLPERM Function CALL

ALLCOMB Routine CALL

ALLCOMBI Routine CALL

ALLPERM Routine

Searches for a pattern match and returns the position at which the pattern is found.

Returns the last bracket match for which there is a match in a pattern.

Compiles a Perl regular expression (PRX) that can be used for pattern matching of a character value.

Returns a character string that contains the value for a capture buffer.

Generates all combinations of the values of n variables taken k at a time in a minimal change order.

Generates all permutations of the values of several variables in a minimal change order.

Generates all combinations of the values of n variables taken k at a time in a minimal change order.

Generates all combinations of the indices of n objects taken k at a time in a minimal change order.

Generates all permutations of the values of several variables in a minimal change order.

组合函数 Combinatorial

CALL

GRAYCODE Generates all subsets of n items in a minimal change order. Routine 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 CALL LEXPERK Routine CALL

LEXPERM Routine CALL

RANPERK Routine CALL

RANPERM Routine COMB Function

GRAYCODE

Function LCOMB Function LEXCOMB Function LEXCOMBI Function LEXPERK Function LEXPERM Function LFACT Function LPERM Function PERM

Generates all combinations of the indices of n objects taken k at a time in lexicographic order.

Generates all distinct permutations of the non-missing values of n variables taken k at a time in lexicographic order.

Generates all distinct permutations of the non-missing values of several variables in lexicographic order.

Randomly permutes the values of the arguments, and returns a permutation of k out of n values.

Randomly permutes the values of the arguments.

Computes the number of combinations of n elements taken r at a time.

Generates all subsets of n items in a minimal change order.

Computes the logarithm of the COMB function; that is, the logarithm of the number of combinations of n objects taken r at a time. Generates all distinct combinations of the non-missing values of n variables taken k at a time in lexicographic order.

Generates all combinations of the indices of n objects taken k at a time in lexicographic order.

Generates all distinct permutations of the non-missing values of n variables taken k at a time in lexicographic order.

Generates all distinct permutations of the non-missing values of several variables in lexicographic order.

Computes the logarithm of the FACT (factorial) 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.

Computes the number of permutations of n items that are taken r at a

Function ARCOSH Function ARSINH Function ARTANH Function COSH Function SINH Function TANH Function 宏函数 Macro CALL EXECUTE Routine CALL SYMPUT Routine CALL

SYMPUTX Routine RESOLVE Function SYMEXIST Function SYMGET Function

time.

双曲线函数 Hyperbolic

Returns the inverse hyperbolic cosine. Returns the inverse hyperbolic sine. Returns the inverse hyperbolic tangent. Returns the hyperbolic cosine. Returns the hyperbolic sine. Returns the hyperbolic tangent.

Resolves the argument, and issues the resolved value for execution at the next step boundary.

Assigns DATA step information to a macro variable.

Assigns a value to a macro variable, and removes both leading and trailing blanks.

Returns the resolved value of the argument after it has been processed by the macro facility.

Returns an indication of the existence of a macro variable. Returns the value of a macro variable during DATA step execution.

SYMGLOBL Returns an indication of whether a macro variable is in global scope Function to the DATA step during DATA step execution. SYMLOCAL Returns an indication of whether a macro variable is in local scope to Function the DATA step during DATA step execution. 分位数函数 Quantile

BETAINV Function CINV Function FINV Function GAMINV Function PROBIT Function QUANTILE Function TINV Function WHICHC Function WHICHN Function 排序函数Sort CALL SORTC Routine CALL SORTN Routine CALL MODULE Routine MODULEC Function MODULEN Function

Returns a quantile from the beta distribution. Returns a quantile from the chi-square distribution. Returns a quantile from the F distribution. Returns a quantile from the gamma distribution. Returns a quantile from the standard normal distribution. Returns the quantile from a distribution that you specify. Returns a quantile from the t distribution.

搜索函数 Search

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

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

Sorts the values of character arguments.

Sorts the values of numeric arguments.

外部例程 External Routines

Calls an external routine without any return code.

Calls an external routine and returns a character value. Calls an external routine and returns a numeric value.

三角函数Trigonometric

ARCOS Function ARSIN Function ATAN Function ATAN2 Function COS Function

Returns the arccosine. Returns the arcsine. Returns the arc tangent.

Returns the arc tangent of the ratio of two numeric variables. Returns the cosine.

SIN Function Returns the sine. TAN Function CEIL Function CEILZ Function FLOOR Function FLOORZ Function FUZZ Function INT Function INTZ Function ROUND Function ROUNDE Function

Returns the tangent.

截断函数 Truncation

Returns the smallest integer that is greater than or equal to the argument, fuzzed to avoid unexpected floating-point results. Returns the smallest integer that is greater than or equal to the argument, using zero fuzzing.

Returns the largest integer that is less than or equal to the argument, fuzzed to avoid unexpected floating-point results.

Returns the largest integer that is less than or equal to the argument, using zero fuzzing.

Returns the nearest integer if the argument is within 1E-12 of that integer.

Returns the integer value, fuzzed to avoid unexpected floating-point results.

Returns the integer portion of the argument, using zero fuzzing. Rounds the first argument to the nearest multiple of the second argument, or to the nearest integer when the second argument is omitted.

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 TRUNC Function CALL LABEL Routine CALL SET Routine CALL VNAME Routine

Rounds the first argument to the nearest multiple of the second argument, using zero fuzzing.

Truncates a numeric value to a specified number of bytes.

变量控制函数Variable Control

Assigns a variable label to a specified character variable.

Links SAS data set variables to DATA step or macro variables that have the same name and data type.

Assigns a variable name as the value of a specified variable.

算术函数 Arithmetic

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

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

DIVIDE

返回数值函数 Numeric IFN Function

网络工具函数Web Tools

Decodes a string that contains HTML numeric character

HTMLDECODE

references or HTML character entity references, and returns the

Function

decoded string. HTMLENCODE Encodes characters using HTML character entity references, and Function returns the encoded string. URLDECODE Function URLENCODE Function DCLOSE Function DCREATE Function

Returns a string that was decoded using the URL escape syntax. Returns a string that was encoded using the URL escape syntax.

外部文件函数 External Files

Closes a directory that was opened by the DOPEN function. Returns the complete pathname of a new, external directory.

DINFO Function DNUM Function DOPEN Function DOPTNAME Function DOPTNUM Function DREAD Function DROPNOTE Function FAPPEND Function FCLOSE Function FCOL Function FDELETE Function FEXIST Function FGET Function FILEEXIST Function FILENAME Function FILEREF Function FINFO Function

Returns information about a directory. Returns the number of members in a directory.

Opens a directory, and returns a directory identifier value. Returns directory attribute information.

Returns the number of information items that are available for a directory.

Returns the name of a directory member.

Deletes a note marker from a SAS data set or an external file. Appends the current record to the end of an external file. Closes an external file, directory, or directory member.

Returns the current column position in the File Data Buffer (FDB). Deletes an external file or an empty directory.

Verifies the existence of an external file that is associated with a fileref.

Copies data from the File Data Buffer (FDB) into a variable. Verifies the existence of an external file by its physical name. Assigns or deassigns a fileref to an external file, directory, or output device.

Verifies whether a fileref has been assigned for the current SAS session.

Returns the value of a file information item.

FNOTE Function FOPEN Function FOPTNAME Function FOPTNUM Function FPOINT Function

Identifies the last record that was read, and returns a value that the FPOINT function can use.

Opens an external file and returns a file identifier value. Returns the name of an item of information about a file. Returns the number of information items that are available for an external file.

Positions the read pointer on the next record to be read.

Sets the position of the column pointer in the File Data Buffer

FPOS Function

(FDB). FPUT Function FREAD Function FREWIND Function FRLEN Function

Moves data to the File Data Buffer (FDB) of an external file, starting at the FDB’s current column position.

Reads a record from an external file into the File Data Buffer (FDB).

Positions the file pointer to the start of the file.

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 MOPEN Function PATHNAME Function RENAME Function SYSMSG Function SYSRC Function

Writes a record to an external file.

Opens a file by directory ID and member name, and returns either the file identifier or a 0.

Returns the physical name of an external file or a SAS library, or returns a blank.

Renames a member of a SAS library, an entry in a SAS catalog, an external file, or a directory.

Returns error or warning message text from processing the last data set or external file function. Returns a system error number.

金融函数Financial

BLACKCLPRC Function BLACKPTPRC Function BLKSHCLPRC Function BLKSHPTPRC Function COMPOUND Function CONVX Function CONVXP Function DACCDB Function DACCDBSL Function DACCSL Function DACCSYD Function DACCTAB Function DEPDB Function DEPDBSL Function DEPSL Function DEPSYD Function DEPTAB Function

Calculates call prices for European options on futures, based on the Black model.

Calculates put prices for European options on futures, based on the Black model.

Calculates call prices for European options on stocks, based on the Black-Scholes model.

Calculates put prices for European options on stocks, based on the Black-Scholes model.

Returns compound interest parameters.

Returns the convexity for an enumerated cash flow.

Returns the convexity for a periodic cash flow stream, such as a bond.

Returns the accumulated declining balance depreciation. Returns the accumulated declining balance with conversion to a straight-line depreciation.

Returns the accumulated straight-line depreciation. Returns the accumulated sum-of-years-digits depreciation. Returns the accumulated depreciation from specified tables. Returns the declining balance depreciation.

Returns the declining balance with conversion to a straight-line depreciation.

Returns the straight-line depreciation. Returns the sum-of-years-digits depreciation. Returns the depreciation from specified tables.

DUR Function DURP Function FINANCE Function

Returns the modified duration for an enumerated cash flow. Returns the modified duration for a periodic cash flow stream, such as a bond.

Computes financial calculations such as depreciation, maturation, accrued interest, net present value, periodic savings, and internal rates of return.

GARKHCLPRC Calculates call prices for European options on stocks, based on the Function Garman-Kohlhagen model. GARKHPTPRC Calculates put prices for European options on stocks, based on the Function 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 Calculates call prices for European options on stocks, based on the Function Margrabe model. MARGRPTPRC Calculates put prices for European options on stocks, based on the Function Margrabe model. MORT Function Returns amortization parameters. NETPV Function NPV Function PVP Function SAVING Function YIELDP Function CALL RANBIN Routine CALL RANCAU Routine

Returns the net present value as a fraction.

Returns the net present value with the rate expressed as a percentage.

Returns the present value for a periodic cash flow stream (such as a bond), with repayment of principal at maturity. Returns the future value of a periodic saving.

Returns the yield-to-maturity for a periodic cash flow stream, such as a bond.

产生随机数函数 Random Number

Returns a random variate from a binomial distribution.

Returns a random variate from a Cauchy distribution.

CALL RANEXP Routine CALL RANGAM Routine CALL RANNOR Routine CALL RANPOI Routine CALL RANTBL Routine CALL RANTRI Routine CALL RANUNI Routine

CALL

STREAMINIT

Routine NORMAL Function RANBIN Function RANCAU Function RAND Function RANEXP Function RANGAM

Returns a random variate from an exponential distribution.

Returns a random variate from a gamma distribution.

Returns a random variate from a normal distribution.

Returns a random variate from a Poisson distribution.

Returns a random variate from a tabled probability distribution.

Returns a random variate from a triangular distribution.

Returns a random variate from a uniform distribution.

Specifies a seed value to use for subsequent random number

generation by the RAND function.

Returns a random variate from a normal, or Gaussian, distribution. Returns a random variate from a binomial distribution. Returns a random variate from a Cauchy distribution.

Generates random numbers from a distribution that you specify. Returns a random variate from an exponential distribution. Returns a random variate from a gamma distribution.

Function RANNOR Function RANPOI Function RANTBL Function RANTRI Function RANUNI Function UNIFORM Function ATTRC Function ATTRN Function CEXIST Function CLOSE Function CUROBS Function DROPNOTE Function DSNAME Function ENVLEN Function EXIST Function FETCH Function

Returns a random variate from a normal distribution. Returns a random variate from a Poisson distribution. Returns a random variate from a tabled probability distribution. Returns a random variate from a triangular distribution. Returns a random variate from a uniform distribution. Returns a random variate from a uniform distribution.

SAS文件IO函数 SAS File I/O

Returns the value of a character attribute for a SAS data set. Returns the value of a numeric attribute for a SAS data set. Verifies the existence of a SAS catalog or SAS catalog entry. Closes a SAS data set.

Returns the observation number of the current observation. Deletes a note marker from a SAS data set or an external file. Returns the SAS data set name that is associated with a data set identifier.

Returns the length of an environment variable. Verifies the existence of a SAS library member.

Reads the next non-deleted observation from a SAS data set into the Data Set Data Vector (DDV).

FETCHOBS Function GETVARC Function GETVARN Function IORCMSG Function LIBNAME Function LIBREF Function NOTE Function OPEN Function PATHNAME Function POINT Function RENAME Function REWIND Function SYSMSG Function SYSRC Function VARFMT Function VARINFMT Function VARLABEL Function

Reads a specified observation from a SAS data set into the Data Set Data Vector (DDV).

Returns the value of a SAS data set character variable. Returns the value of a SAS data set numeric variable. Returns a formatted error message for _IORC_. Assigns or deassigns a libref for a SAS library. Verifies that a libref has been assigned.

Returns an observation ID for the current observation of a SAS data set.

Opens a SAS data set.

Returns the physical name of an external file or a SAS library, or returns a blank.

Locates an observation that is identified by the NOTE function. Renames a member of a SAS library, an entry in a SAS catalog, an external file, or a directory.

Positions the data set pointer at the beginning of a SAS data set. Returns error or warning message text from processing the last data set or external file function. Returns a system error number.

Returns the format that is assigned to a SAS data set variable. Returns the informat that is assigned to a SAS data set variable. Returns the label that is assigned to a SAS data set variable.

VARLEN Function VARNAME Function VARNUM Function VARTYPE Function

Returns the length of a SAS data set variable. Returns the name of a SAS data set variable.

Returns the number of a variable’s position in a SAS data set. Returns the data type of a SAS data set variable.

特殊函数 Special ADDR Function ADDRLONG Function

Returns the memory address of a variable on a 32-bit platform.

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 CALL SLEEP Routine CALL SYSTEM Routine DIF Function GETOPTION Function INPUT Function INPUTC Function INPUTN Function LAG Function PEEK Function PEEKC Function PEEKCLONG Function

Writes a value directly into memory on 32-bit and 64-bit platforms.

For a specified period of time, suspends the execution of a program that invokes this CALL routine.

Submits an operating environment command for execution. Returns differences between an argument and its nth lag. Returns the value of a SAS system or graphics option. Returns the value that is produced when SAS converts an expression using the specified informat.

Enables you to specify a character informat at run time. Enables you to specify a numeric informat at run time. Returns values from a queue.

Stores the contents of a memory address in a numeric variable on a 32-bit platform.

Stores the contents of a memory address in a character variable on a 32-bit platform.

Stores the contents of a memory address in a character variable on 32-bit and 64-bit platforms.

PEEKLONG Function PTRLONGADD Function PUT Function PUTC Function PUTN Function SLEEP Function SYSGET Function SYSPARM Function SYSPROCESSID Function

Stores the contents of a memory address in a numeric variable on 32-bit and 64-bit platforms.

Returns the pointer address as a character variable on 32-bit and 64-bit platforms.

Returns a value using a specified format.

Enables you to specify a character format at run time. Enables you to specify a numeric format at run time. For a specified period of time, suspends the execution of a program that invokes this function.

Returns the value of the specified operating environment variable.

Returns the system parameter string. Returns the process ID of the current process.

SYSPROCESSNAME Returns the process name that is associated with a given Function process ID, or returns the name of the current process. SYSPROD Function SYSTEM Function UUIDGEN Function

Determines whether a product is licensed.

Issues an operating environment command during a SAS

session, and returns the system return code.

Returns the short or binary form of a Universal Unique Identifier (UUID).

变量信息函数 Variable Information CALL VNEXT Routine VARRAY Function VARRAYX Function VFORMAT Function VFORMATD Function VFORMATDX Function

Returns the name, type, and length of a variable that is used in a DATA step.

Returns a value that indicates whether the specified name is an array.

Returns a value that indicates whether the value of the specified argument is an array.

Returns the format that is associated with the specified variable. Returns the decimal value of the format that is associated with the specified variable.

Returns the decimal value of the format that is associated with the value of the specified argument.

VFORMATN Function VFORMATNX Function VFORMATW Function VFORMATWX Function VFORMATX Function VINARRAY Function VINARRAYX Function VINFORMAT Function VINFORMATD Function

VINFORMATDX Function VINFORMATN Function

VINFORMATNX Function VINFORMATW Function

VINFORMATWX Function VINFORMATX Function VLABEL Function VLABELX Function

Returns the format name that is associated with the specified variable.

Returns the format name that is associated with the value of the specified argument.

Returns the format width that is associated with the specified variable.

Returns the format width that is associated with the value of the specified argument.

Returns the format that is associated with the value of the specified argument.

Returns a value that indicates whether the specified variable is a member of an array.

Returns a value that indicates whether the value of the specified argument is a member of an array.

Returns the informat that is associated with the specified variable.

Returns the decimal value of the informat that is associated with the specified variable.

Returns the decimal value of the informat that is associated with the value of the specified variable. Returns the informat name that is associated with the specified variable.

Returns the informat name that is associated with the value of the specified argument. Returns the informat width that is associated with the specified variable.

Returns the informat width that is associated with the value of the specified argument. Returns the informat that is associated with the value of the specified argument.

Returns the label that is associated with the specified variable. Returns the label that is associated with the value of the specified argument.

VLENGTH Function VLENGTHX Function

Returns the compile-time (allocated) size of the specified variable.

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 VTYPE Function VTYPEX Function VVALUE Function VVALUEX Function

Validates the value of the specified argument as a variable name. Returns the type (character or numeric) of the specified variable. Returns the type (character or numeric) for the value of the specified argument.

Returns the formatted value that is associated with the variable that you specify.

Returns the formatted value that is associated with the argument that you specify.

本文来源:https://www.bwwdw.com/article/gzwr.html

Top