Intrinsic Function List
| Function name | Arguments | Type of fn | Returning |
|---|---|---|---|
| ABS | arg-1 | Numeric | Absolute value of arg-1 |
| ACOS | arg-1 | Numeric | Arccosine of arg-1 |
| ANNUITY | arg-1,arg-2 | Numeric | Ration of annuity paid for arg-2 periods at interest of arg-1 to initial investment of one |
| ASIN | arg-1 | Numeric | Arcsine of arg-1 |
| ATAN | arg-1 | Numeric | Arctangent of arg-1 |
| BOOLEAN-OF-INTEGER | Not supported | NA | NA |
| BYTE-LENGTH | arg-1 | Numeric | Size in bytes of arg-1 |
| BYTE-OF | arg-1 | Numeric | Size in bytes of memory |
| CHAR | arg-1 | Numeric | Character in position of arg-1 of the alphanumeric collating sequence |
| CHAR-NATIONAL | Not supported | NA | NA |
| COMBINED-DATETIME | arg-1,arg-2 | Numeric | Accepts two arguments, (a date in integer date form, and a time in standard numeric time form), and returns a numeric value in which the date occupies the integer part of the value and the time represents the fractional part, according to the expression argument-1 + (argument-2 / 100000). For example, given the integer date form value 143951 (representing the date February 15, 1995) and the standard numeric time form value 18867.812479168304 (representing the time 05:14:27.812479168304), the returned value would be exactly 143951.18867812479168304 |
| CONCATENATE | arg-1 ... | Alphanumeric | Concatenation of alphanumeric representation of arg-x |
| COS | arg-1 | Numeric | Cosine of arg-1 |
| CURRENT-DATE | None | Alphanumeric | Current date and time and difference from Greenwich Mean Time |
| DATE-OF-INTEGER | arg-1 | Numeric | Standard date equivalent (YYYYMMDD) of integer date |
| DATE-TO-YYYYMMDD | arg-1 ... | Numeric | arg-1 is converted from YYMMDD to YYYYMMDD based on the value of arg-2 |
| DAY-OF-INTEGER | arg-1 | Numeric | Julian date equivalent YYYYDDD) of integer date. |
| DAY-TO-YYYYDDD | arg-1 ... | Numeric | arg-1 converted from YYDDD to YYYYDDD based on the value of arg-2 |
| DISPLAY-OF | arg-1, arg-2 (optional) | Alphanumeric | An alphanumeric character string consisting of the content of argument-1, converted to a specific code page representation defined by arg-2. arg-1 must be class NATIONAL. If arg-2 is omitted, the code page specified at compilation time is used |
| E | None | Numeric | Returns the value of e, the natural base |
| EXCEPTION-FILE | None | Alphanumeric | pos. 1-2: I-O-status pos. 3-134: file-name only for I-O conditions |
| EXCEPTION-FILE-N | Not supported | NA | NA |
| EXCEPTION-LOCATION | None | Alphanumeric | Three parts, separated by ';' ∗ 1. program, function, or method name ∗ 2. paragraph name, including qualification if applicable ∗ 3. an implementor-defined identifier of the source line containing causing the exception |
| EXCEPTION-LOCATION-N | Not supported | NA | NA |
| EXCEPTION-STATEMENT | None | Alphanumeric | name of the verb causing the exception condition |
| EXCEPTION-STATUS | None | Alphanumeric | name of the exception condition |
| EXP | arg-1 | Numeric | E raised to the power or arg-1 |
| EXP10 | arg-1 | Numeric | 10 raised to the power of arg-& |
| FACTORIAL | arg-1 | Numeric | Factorial of arg-1 |
| FRACTION-PART | arg-1 | Numeric | Fraction part of arg-1 |
| HIGHEST-ALGEBRAIC | Not supported | NA | NA |
| INTEGER | arg-1 | Numeric | The greatest integer not greater than arg-1 |
| INTEGER-OF-BOOLEAN | Not supported | NA | NA |
| INTEGER-OF-DATE | arg-1 | Numeric | The integer equivalent of the standard date (YYYYMMDD) |
| INTEGER-OF-DAY | arg-1 | Numeric | The integer date equivalent of the Julian Date (YYYYDDD) |
| INTEGER-PART | arg-1 | Numeric | Integer part of arg-1 |
| LENGTH | arg-1 | Numeric | Length of arg-1 in character positions |
| LENGTH-AN | arg-1 | Numeric | Length of arg-1 in alphanumeric character positions. It may be applied to an alphanumeric, national, or numeric data item, or literal. |
| LOCALE-COMPARE | Not supported | NA | NA |
| LOCALE-DATE | arg-1, arg-2 | Alphanumeric | A character string containing a date in a culturally-appropriate format specified by a locale. arg-1 must be alphanumeric and 8 character positions in length. arg-1 must be a date in the same format as the year, month, and day returned in character positions 1 through 8 by the CURRENT-DATE function. arg-2 must be associated with a locale in the SPECIAL-NAMES paragraph. |
| LOCALE-TIME | arg-1, arg-2 | Alphanumeric | A character string containing a time in a culturally-appropriate format specified by a locale. arg-1 must be alphanumeric and 13 character positions in length. arg-1 must be in the same format as the hours, minutes, and seconds returned in character positions 9 through 21 by the CURRENT-DATE function. arg-2 must be associated with a locale in the SPECIAL-NAMES paragraph. |
| LOCALE-TIME-FROM-SECONDS | arg-1,arg-2 | Alphanumeric | Same as LOCAL-TIME arg-1 is numeric and represents the numbers of seconds from Midnight. |
| LOG | arg-1 | Numeric | Natural log of arg-1 |
| LOG10 | arg-1 | Numeric | Log to base 10 of arg-1 |
| LOWER-CASE | arg-1 | Alphanumeric | All letters in arg-1 are set to lower-case |
| LOWEST-ALGEBRAIC | Not supported | NA | NA |
| MAX | arg-1 ... | Numeric | Value of maximum argument |
| MEAN | arg-1 ... | Numeric | Arithmetic mean of arguments |
| MEDIAN | arg-1 ... | Numeric | Arithmetic median of Arguments |
| MIDRANGE | arg-1 ... | Numeric | Mean of minimum and maximum arguments |
| MIN | arg-1 ... | Numeric | Value of minimum argument |
| MOD | arg-1,arg-2 | Numeric | arg-1 modulo arg-2 |
| NATIONAL-OF | arg-1,arg-2 | National | National character string |
| NUMVAL | arg-1 | Numeric | Numeric value of simple numeric string |
| NUMVAL-C | arg-1,arg-2 | Numeric | Numeric value of numeric string with optional commas and currency string |
| NUMVAL-F | Not supported | NA | NA |
| ORD | arg-1 | Numeric | Ordinal position of the argument in the collating sequence |
| ORD-MAX | arg-1 ... | Numeric | Ordinal position of maximum argument |
| ORD-MIN | arg-1 ... | Numeric | Ordinal position of minimum argument |
| PI | None | Numeric | Value of Pi |
| PRESENT-VALUE | arg-1 ... | Numeric | Preset value of a series of future period-end amounts, arg-2, at a discount rate of arg-1. |
| RANDOM | Optional arg-1 | Numeric | Random number.If arg-1 is provided, it will be used to reinitialize the pseudo’random sequence. If no argument is provided, the next random number is returned. The returned number is between 0 and 1 with 10 significant decimal. It should be assigned to a PIC 9V9(10). |
| RANGE | arg-1 ... | Numeric | Value of maximum argument minus the value of minimum argument. |
| REM | arg-1, arg-2 | Numeric | Remainder of arg-1 /arg-2 |
| REVERSE | arg-1 | Alphanumeric | Reverse order of the characters of the argument |
| SECONDS-FROM- FORMATTED-TIME | arg-1, arg-2 | Numeric | Accepts two parameters; a literal that is either a time format or a combined date and time format, and a data item whose content is in the specified format and returns a value in standard numeric time form. |
| SECONDS-PAST- MIDNIGHT | None | Numeric | number of second from Midnight |
| SIGN | arg-1 | Numeric | The sign of arg-1 |
| SIN | arg-1 | Numeric | Sine of arg-1 |
| SQRT | arg-1 | Numeric | Square root of arg-1 |
| STANDARD-COMPARE | Not Supported | NA | NA |
| STANDARD-DEVIATION | arg-1... | Numeric | Standard deviation of arguments |
| STORED-CHAR-LENGTH | arg-1 | Numeric | The length of a string arg-1 ignoring trailing spaces |
| SUBSTITUTE | arg-1 ... | Alphanumeric | Copy of arg-1 where partial string arg-2 is replaced by value of arg- 3, arg-4 by value of arg- 5, … |
| SUBSTITUTE-CASE | arg-1 ... | Alphanumeric | Idem SUBSTITUTE but comparison are done case independent |
| SUM | arg-1 ... | Numeric | Sum of arguments |
| TAN | arg-1 | Numeric | Tangent of arg-1 |
| TEST-DATE-YYYYMMDD | arg-1 | Numeric | It returns a zero if the argument is a valid date; the value 1 if the year subfield content is out of range; the value 2 if the month subfield content is out of range; or the value 3 if the day subfield content is out of range for the given year and month. arg-1 must be standard date form (YYYYMMDD). |
| TEST-DAY-YYYYDDD | arg-1 | Numeric | It returns a zero if the argument is a valid date; the value 1 if the year subfield content is out of range; or the value 2 if the day subfield content is out of range for the given year. Arg-1 must be in Julian date form (YYYYDDD). |
| TEST-NUMVAL | Not supported | NA | NA |
| TEST-NUMVAL-C | Not supported | NA | NA |
| TEST-NUMVAL-F | Not supported | NA | NA |
| TRIM | arg-1, arg-2 | Alphanumeric | The given string arg-1 with any leading and trailing blanks removed, or if arg-2 if given:0 trim spaces both before and after 1 trim spaces before only 2 trim spaces after only. |
| TRIML | arg-1 | Alphanumeric | Equivalent to: TRIM(arg-1, 1) |
| TRIMR | arg-1 | Alphanumeric | Equivalent to: TRIM(arg-1, 2) |
| UPPER-CASE | arg-1 | Alphanumeric | All letters in the argument are set to upper case. |
| VARIANCE | arg-1... | Numeric | Variance of argument |
| WHEN-COMPILED | None | Alphanumeric | Date and time program was compiled |
| YEAR-TO-YYYY | arg-1, arg-2 | Numeric | arg-1 converted from YY to YYYY based on the value of arg-2 |