isCOBOL Evolve : Appendices : Intrinsic Functions
Intrinsic Functions
The table below shows all available intrinsic functions.
The Function name column defines the name of the function.
The Function type column defines the type of the function, it can be: Integer, Numeric, Alphabetic, Alphanumeric. When "any" word appears it means that the type of the function depends on the argument type.
The Argument number column defines the number of the arguments. When "arbitrary" word appears it means that the number or arguments is undefined and it can be arbitrary. When 0 appears, it means that the function doesn't has arguments.
The Argument type column defines the type of the arguments, they can be: Integer, Numeric, Alphabetic, Alphanumeric. When "any" appears it means that the type of the argument can be any of theme.
A detailed documentation of each single function follows.
Function name
Function type
Argument number
Argument type
Description
Numeric
1
Numeric
Absolute value of the argument passed
Numeric
1
Numeric
Arccosine of argument
Numeric
2
Numeric
Annuity of the arguments
Numeric
1
Numeric
Arcsine of argument
Numeric
1
Numeric
Arctangent of argument
Numeric
1
Alphanumeric
Decimal representation of binary data
Numeric
1
any
Length of argument in number of bytes
Numeric
1
Occurs
Current capacity of a dynamic capacity table
Alphanumeric
1
Integer
Character in position of argument
Numeric
1
Numeric
Cosine of argument
Alphanumeric
0
 
Current date and time and difference from Greenwich Mean Time
Integer
1
Integer
Standard date equivalent (YYYYMMDD) of integer date
Integer
2
Integer
Date with four digits year of a date with two digits year. The second optional parameter is the threshold (default 50)
Integer
1
Integer
Julian date equivalent (YYYYDDD) of integer date
Integer
2
Integer
Date with four digits year of a date with two digits year. in the format YYddd The second optional parameter is the threshold (default 50)
Alphanumeric
1
Numeric
Binary representation of decimal data
Alphanumeric
1
Numeric
Hexadecimal representation of decimal data
Alphanumeric
1
Numeric
Octal representation of decimal data
Alphanumeric
2
National
Character representation of a national value
Numeric
0
 
The value of E, the natural base
Numeric
1
Numeric
E raised to the power of argument
Numeric
1
Numeric
E raised to the power of argument
Integer
1
Integer
Factorial of argument
Numeric
1
Numeric
Fraction part of argument
Integer
1
Integer
resource identified by the handle
Numeric
1
Alphanumeric
Decimal representation of hexadecimal data
Integer
1
Numeric
The greatest integer not greater than argument
Integer
1
Integer
Integer date equivalent of standard date (YYYYMMDD)
Integer
1
Integer
Integer date equivalent of Julian date (YYYYDDD)
Integer
1
Numeric
Integer part of argument
Integer
1
any
Length of argument
Numeric
1
Numeric
Natural logarithm of argument
Numeric
1
Numeric
Logarithm to base 10 of argument
Alphanumeric
1
Alphanumeric
All letters in the argument are set to lowercase
any
arbitrary
any
Value of maximum argument
Numeric
arbitrary
Numeric
Arithmetic mean of arguments
Numeric
arbitrary
Numeric
Median of arguments
Numeric
arbitrary
Numeric
Mean of minimum and maximum arguments
any
arbitrary
any
Value of minimum argument
Integer
2
Integer
argument 1 modulo argument 2
National
2
Alphanumeric
National representation of a character string
Numeric
1
Alphanumeric
Numeric value of simple numeric string
Numeric
2
Alphanumeric
Numeric value of numeric string with optional commas and currency sign
Numeric
1
Numeric
Decimal representation of octal data
Integer
1
Alphanumeric
Ordinal position of the argument in collating sequence
Integer
1
any
Ordinal position of maximum argument
Integer
1
any
Ordinal position of minimum argument
Numeric
0
 
Value of pi
Numeric
arbitrary
Numeric
Present value of a series of future period-end amounts, argument 2 at a discount rate of argument 1
Numeric
1
Integer
Random number between 0 and 1
Numeric
arbitrary
Numeric
Value of maximum argument minus value of minimum argument
Numeric
2
Numeric
Remainder of arg 1 / arg 2
Alphanumeric
1
Alphanumeric
Reverse order of the characters of the argument
Numeric
1
Numeric
1 if argument is positive
0 if argument is zero
-1 if argument is negative
Numeric
1
Numeric
Sine of argument
Numeric
1
Numeric
Square root of argument
Numeric
arbitrary
Numeric
Standard deviation of arguments
Numeric
arbitrary
Numeric
Sum of arguments
Numeric
1
Numeric
Tangent of argument
Alphanumeric
1
Alphanumeric
The argument is trimmed
Alphanumeric
1
Alphanumeric
The argument is left trimmed
Alphanumeric
1
Alphanumeric
The argument is right trimmed
Alphanumeric
1
Alphanumeric
All letters in the argument are set to uppercase
Numeric
arbitrary
Numeric
Variance of argument
Alphanumeric
0
 
Date and time program was compiled
Numeric
2
Numeric
Four digits year of the first argument, the second optional parameter is the threshold (default 50)
Sample programs for each function are available between isCOBOL Samples.