# Operators

Contents
sm1252sp1
Contents
This topic lists all supported operators by category.
Comparative Operators
• Equality (= and ~=)
• Inequality (!= and ~!=)
• Greater-than (> and ~>)
• Less-than (< and ~<)
• Greater-than or Equal-to (>= and ~>=)
• Less-than or Equal-to (<= and ~<=)
String Operators
• BEGINS_WITH and ~BEGINS_WITH
• ENDS_WITH and ~ENDS_WITH
• CONTAINS and ~CONTAINS
• Pattern Matching (LIKE)
• Concatenation (+)
Set Operators
• Set Inclusion (IN and ~IN)
• INTERSECT and ~INTERSECT
• UNION and ~UNION
• Indexing ([..])
Logical Operators
• AND, &, and &&
• NOT
• OR, |, and ||
• XOR
Arithmetic Operators
• Addition (+)
• Subtraction (-)
• Multiplication (*)
• Division (/)
Miscellaneous Operator
• Conditional Decision (? and :)
Equality Operators
The equality operator (=) compares two values. If the values are equal, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE. If the two values are strings, the operation is case-sensitive.
The equality operator (~=) only compares string values and is not case-sensitive.
Examples:
1 = 1Result = TRUE
1 = 2Result = FALSE
"sparrow" = "SPARROW"Result = FALSE
"sparrow" ~= "SPARROW"Result = TRUE
Inequality Operators
The inequality operator (!=) compares two values. If the values are not equal, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE. If the two values are strings, the operation is case-sensitive.
The inequality operator (~!=) only compares string values and is not case-sensitive.
Examples:
1 != 1Result = FALSE
1 != 2Result = TRUE
"sparrow" != "SPARROW"Result = TRUE
"sparrow" ~!= "SPARROW"Result = FALSE
Less-than Operators
The less-than operator (<) compares two values. If the first value is less than the second value, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE. If the two values are Boolean, TRUE is greater than FALSE. If the two values are strings, the operation is case-sensitive.
The less-than operator (~<) only compares string values and is not case-sensitive.
Examples:
1 < 2Result = TRUE
2 < 1Result = FALSE
'crow' < 'CROW'Result = FALSE
'crow' ~< 'CROW'Result = FALSE
Greater-than Operators
The greater-than operator (>) compares two values. If the first value is greater than the second value, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE. If the two values are Boolean, TRUE is greater than FALSE. If the two values are strings, the operation is case-sensitive.
The greater-than operator (~>) only compares string values and is not case-sensitive.
Examples:
1 > 2Result = FALSE
2 > 1Result = TRUE
'crow' > 'CROW'Result = TRUE
'crow' ~> 'CROW'Result = FALSE
Less-than or Equal-to Operators
The less-than or equal-to operator (<=) compares two values. If the first value is less than or equal to the second value, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE. If the two values are Boolean, TRUE is greater than FALSE. If the two values are strings, the operation is case-sensitive.
The less-than or equal-to operator (~<=) only compares string values and is not case-sensitive.
Examples:
1 <= 2Result = TRUE
2 <= 1Result = FALSE
'junco' <= 'JUNCO'Result = FALSE
'junco' ~<= 'JUNCO'Result = TRUE
Greater-than or Equal-to Operators
The greater-than or equal-to operator (>=) compares two values. If the first value is greater than or equal to the second value, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE. If the two values are Boolean, TRUE is greater than FALSE. If the two values are strings, the operation is case-sensitive.
The greater-than or equal-to operator (~>=) only compares string values and is not case-sensitive.
Examples:
1 >= 2Result = FALSE
2 >= 1Result = TRUE
'junco' >= 'JUNCO'Result = TRUE
'junco' ~>= 'JUNCO'Result = TRUE
Begins-with Operators
The two begins-with operators (BEGINS_WITH and ~BEGINS_WITH) are designed to be used with string values. If the first string begins with the second string, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE.
The "BEGINS_WITH" operator is case-sensitive. The "~BEGINS_WITH" operator is not case-sensitive.
Examples:
'
CA Single Sign-On
' BEGINS_WITH 'site'Result = FALSE
'
CA Single Sign-On
' ~BEGINS_WITH 'site'Result = TRUE
Ends-with Operators
The two ends-with operators (ENDS_WITH and ~ENDS_WITH) are designed to be used with string values. If the first string ends with the second string, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE.
The "ENDS_WITH" operator is case-sensitive. The "~ENDS_WITH" operator is not case-sensitive.
Examples:
'
CA Single Sign-On
' ENDS_WITH 'DER'Result = FALSE
'
CA Single Sign-On
' ~ENDS_WITH 'DER'Result = TRUE
Containment Operators
The two containment operators (CONTAINS and ~CONTAINS) are designed to be used with string values. If the first string contains the second string, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE.
The "CONTAINS" operator is case-sensitive. The "~CONTAINS" operator is not case-sensitive.
Examples:
'
CA Single Sign-On
' CONTAINS 'EMI'Result = FALSE
'
CA Single Sign-On
' ~CONTAINS 'EMI'Result = TRUE
Set Inclusion Operators
The set inclusion operators (IN and ~IN) test whether the first operand, a string, is an element of the second operand, a set. If the string is an element of the set, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE.
The IN operator is case-sensitive. The ~IN operator is not case-sensitive.
Examples:
'MON' IN 'Sun^Mon^Tue^Wed^Thu^Fri^Sat'Result = FALSE
'MON' ~IN 'Sun^Mon^Tue^Wed^Thu^Fri^Sat'Result = TRUE
Pattern Matching Operator
The pattern matching operator LIKE compares a string value to a pattern of characters that is also a string, for example, 'abc' LIKE '???'. If the string value matches the pattern, the result of the operation is TRUE. Otherwise, the result of the operation is FALSE. The pattern matching operation is case-sensitive.
Patterns are created by combining single characters, character ranges, or both. Character ranges are specified by concatenating the first character in the range, a hyphen, and the last character in the range, for example, 0-9. Valid characters include numbers, uppercase and lowercase letters, and reserved characters that have special meanings. Character sets contain one or more characters, character ranges, or both and are enclosed by square brackets. For example, [0-9A-Za-z], [0-2ABC], and [789x-z] are all valid character sets.
Character ranges are always part of a character set.
The following table lists the reserved characters and their meanings:
 Character Meaning ' or " Specifies a string, such as 'abc' or "abc" - Specifies a range of characters, such as 0-9 ? Matches any single character * Matches any sequence of characters, including one or none [set] Matches any single character in the specified set [!set] or [^set] Matches any single character not in the specified set [set]? Matches any single character in the specified set or an empty string [set]* Matches any sequence of characters in the specified set, including one or none \ Treats any reserved character as a regular character, such as \*

Examples that use '?'
'' LIKE '?'Result = FALSE
'a' LIKE '?'Result = TRUE
'ab' LIKE '?'Result = FALSE
'abc' LIKE '???'Result = TRUE
'191' LIKE '1??'Result = TRUE
'201' LIKE '1??'Result = FALSE
Examples that use '*'
'' LIKE '*'Result = TRUE
'a' LIKE '*'Result = TRUE
'a1b2c3' LIKE '*'Result = TRUE
'robin' LIKE 'r*n'Result = TRUE
'room' LIKE 'r*n'Result = FALSE
Examples that use '[set]'
'' LIKE '[abcde]'Result = FALSE
'f' LIKE '[abcde]'Result = FALSE
'c' LIKE '[abcde]'Result = TRUE
'abc' LIKE '[abcde]'
Compare:
'abc' LIKE '[abcde]*'Result = FALSE
Examples that use '[!set]' or '[^set]'
'' LIKE '[!abcde]'Result = FALSE
'f' LIKE '[^abcde]'Result = TRUE
'c' LIKE '[!abcde]'Result = FALSE
'xyz' LIKE '[^abcde]'Result = FALSE
Examples that use '[set]?'
'' LIKE '[abcde]?'Result = TRUE
'a' LIKE '[abcde]?'Result = TRUE
'ab' LIKE '[abcde]?'Result = FALSE
'z' LIKE '[abcde]?'Result = FALSE
Examples that use '[set]*'
'' LIKE '[abcde]*'Result = TRUE
'a' LIKE '[abcde]*'Result = TRUE
'aabbccddee' LIKE '[abcde]*'Result = TRUE
'abcdef' LIKE '[abcde]*'Result = FALSE
'abc' LIKE '[abcde]*'
Compare:
'abc' LIKE '[abcde]'Result = TRUE
Examples that use '\'
'123-456-7890' LIKE '[0-9][0-9][0-9]\-[0-9][0-9][0-9]\-[0-9][0-9][0-9][0-9]'Result = TRUE
'_!_^_*_?_' LIKE '_\!_\^_\*_\?_'Result = TRUE
Examples that test case-sensitivity
'a' LIKE '[a-z]'Result = TRUE
'A' LIKE '[a-z]'Result = FALSE
'A' LIKE '[A-Za-z]'Result = TRUE
'Robin' LIKE '[A-Za-z]*'Result = TRUE
'Robin' LIKE '[A-Z][a-z]*'Result = TRUE
'robin' LIKE '[A-Z][a-z]*'Result = FALSE
Set Intersection Operators
The set intersection operators (INTERSECT and ~INTERSECT) compare two sets. Sets are strings of elements separated by the caret character. The resulting set is a string that contains only those elements present in both sets. The INTERSECT operator is case-sensitive. The ~INTERSECT operator is not case-sensitive.
The sequence of elements in the resulting set is not predictable. When the operation is not case-sensitive, the case of elements in the resulting set is also not predictable.
Examples:
'BLUE JAY^ORIOLE^WREN' INTERSECT 'BLUE JAY^wren'Result = 'BLUE JAY'
'BLUE JAY^ORIOLE^WREN' ~INTERSECT 'BLUE JAY^wren'Result = 'BLUE JAY^WREN'
Set Union Operators
The set union operator (UNION) returns a set containing all unique elements of the two operand sets (the union of the two sets). Duplicate elements are removed.
If the tilde character (~) precedes the UNION operator (~UNION), then two elements that differ only in case are considered identical.
The sequence of the resulting set is not predictable. Also, if the ~UNION operator is specified, the case of a resulting intersecting element is not predictable.
Examples:
"JUAN^BART^CHUCK" UNION "CHUCK^Bart" Result = "JUAN^BART^CHUCK^Bart"
"JUAN^BART^CHUCK" ~UNION "CHUCK^Bart"Result = "JUAN^BART^CHUCK"
"JUAN^BART^JUAN^CHUCK" UNION "JUAN^BART^JUAN^CHUCK" Result = "JUAN^BART^CHUCK"
NOT Operator
The NOT operator takes a single Boolean operand and reverses its value. It changes FALSE to TRUE and TRUE to FALSE. Note that this operator is usually used to reverse the result of a comparison operator.
Examples:
NOT ("
CA Single Sign-On
" ENDS_WITH "R")Result = TRUE
NOT ("
CA Single Sign-On
" ~ENDS_WITH "R")Result = FALSE
AND Operator
The AND operator (also written & and &&) takes two Boolean operands and returns TRUE if both operands are TRUE. Note that this operator is usually used to connect two comparisons.
The evaluator does not evaluate the second Boolean operand if the first one is FALSE (since the result must be FALSE).
Examples:
(1 > 2) AND ("JUAN" ~= "JUAN")Result = FALSE
(1 < 2) AND ("JUAN" ~= "JUAN")Result = TRUE
OR Operator
The OR operator (also written | or ||) takes two Boolean operands and returns TRUE if either operand is TRUE. Note that this operator is usually used to connect two comparisons.
The evaluator does not evaluate the second Boolean operand if the first one is TRUE (since the result must be TRUE already).
Examples:
(1 > 2) OR ("JUAN" ~= "JUAN")Result = TRUE
(1 < 2) OR ("JUAN" ~= "JUAN")Result = TRUE
Exclusive OR Operator
The exclusive OR (XOR) operator takes two Boolean operands and returns TRUE if either operand is TRUE, but not both. This operator is usually used to connect two comparisons.
Examples:
(1 > 2) XOR ("JUAN" ~= "JUAN")Result = TRUE
(1 < 2) XOR ("JUAN" ~= "JUAN")Result = FALSE
String Concatenation Operator
The string concatenation operator (+) returns a string that contains the combination of its two string operands.
If the first operand is a string, but the second is a number or a Boolean, the second operand is converted to a string. If the first operand is a number, the operator (+) indicates arithmetic addition, not concatenation.
Examples:
"JUAN" + " " + "Jones"Result = "JUAN Jones"
"JUAN" + 2Result = "JUAN2"
Arithmetic Addition Operator
The arithmetic addition (+) operator returns the sum of two numeric operands.
If the first operand is a number, but the second is a string or a Boolean, the second operand is converted to a number.
Examples:
1 + 2Result = 3
1 + "JUAN"Result = 1
1 + "32JUAN"Result = 33
Arithmetic Subtraction Operator
The arithmetic subtraction (-) operator returns the difference between two numeric operands.
If the first operand is a number, but the second is a string or a Boolean, the second operand is converted to a number.
Examples:
1 - 2Result = -1
1 - "JUAN"Result = 1
100 - "32JUAN"Result = 68
Arithmetic Multiplication Operator
The arithmetic multiplication (*) operator returns the product of two operands.
If the first operand is a number, but the second is a string or a Boolean, the second operand is converted to a number.
Examples:
1 * 2Result = 2
1 * "JUAN"Result = 0
100 * "32JUAN"Result = 3200
Arithmetic Division Operator
The arithmetic division operator (/) returns the quotient of two operands.
If the first operand is a number, but the second is a string or a Boolean, the second operand is converted to a number.
All division is integer division.
Division by zero, which is arithmetically undefined, always results in an error in this environment.
Examples:
1 / 2Result = 0
1 / "JUAN"Result = 0
100 / "32JUAN"Result = 3
Conditional Operator
The conditional operator evaluates a Boolean expression (the first operand) and based on the result returns one of two other operands.
If the Boolean operand is TRUE, the result of the operator is the second operand (the THEN clause), otherwise the third operand is returned (the ELSE clause). The second and the third operand must be the same type.
Only one clause of this operator is ever evaluated. In other words, if the THEN clause (operand) is evaluated, the ELSE clause (operand) is not evaluated. (And the opposite is also true.)
Examples:
"JUAN" = "juan" ? "YES" : "NO"Result = "NO"
"JUAN" ~= "juan" ? "YES" : "NO" Result = "YES"
Indexing Operator
The indexing operator takes two arguments: a set and a number (the index). The set is broken into components and the component corresponding to the specified index is returned (like a traditional array). If the index is out of range, a blank string is returned.
The first element in the set is at index zero (0).
Examples:
"Sun^Mon^Tue^Wed^Thu^Fri^Sat"Result = "Tue"
"Sun^Mon^Tue^Wed^Thu^Fri^Sat"Result = "Sun"
Functions Available within Expressions
This topic lists all of the functions by area of utility.
Numeric Functions
• ABS
• ALL
• ANDBITS
• ANY
• HEX
• MAX
• MIN
• MOD
• NOTBITS
• ORBITS
• SIGN
• XORBITS
String Functions
• AFTER
• BEFORE
• CENTER
• CHAR
• FIND
• LCASE
• LEFT
• LEN
• LPAD
• LTRIM
• MID
• PCASE
• RIGHT
• RPAD
• RPT
• RTRIM
• SPACE
• TRANSLATE
• UCASE
Set Functions
• COUNT
• ENUMERATE
• FILTER
• LOOP
• SORT
Date Functions
• DATE (form 1)
• DATE (form 2)
• DATEFROMSTRING
• DATETOSTRING
• DAY
• DOW
• DOY
• HOUR
• HOUR24
• MINUTE
• MONTH
• NOW
• NOWGMT
• SECOND
• YEAR
• YEAR4
Conversion Functions
• BOOLEAN
• NUMBER
• STRING
Generic User Directory I/O Functions
• GET
• SET
LDAP Functions
• ABOVE
• AT
• BELOW
• COMMONDN
• EXPLODEDN
• PARENTDN
• RDN
• RELATIONDN
URL/Path Handling Functions
• QS
• URL
• URLDECODE
• URLENCODE
Logging Functions
• ERROR
• INFO
• TRACE
• WARNING
File I/O Functions
• EXISTS
• KEY
• LOG
Error Handling Functions
• MAYBE
• THROW
• VEXIST
Miscellaneous Functions
• EVALUATE
ABOVE Function--Is User Above Specified LDAP DN
The ABOVE function returns a TRUE if the specified user (user_DN) exists within a container that is
above
the specified container (root_DN).
Syntax
The ABOVE function has the following format:
```ABOVE(root_DN, user_DN)
```
Parameters
The ABOVE function accepts the following parameters:
1. root_DN
(string)
2. user_DN
(string)
Return Value
The ABOVE function returns a Boolean value.
Remarks
LDAP Only: Yes
ABS Function--Find the Absolute Value
The ABS function finds the absolute value of a number.
Syntax
The ABS function has the following format:
```ABS(number)
```
Parameters
The ABS function accepts the following parameter:
1. number
(number)
Return Value
The ABS function returns a number.
Example
Return_value=ABS(3)Return_value=3
Return_value=ABS(-2)Return_value=2
AFTER Function--Find a String
The AFTER function finds the specified instance of a search string in a source string and returns that part of the source string that follows the search string. If the search string is not found, then the AFTER function returns a blank string.
Syntax
The AFTER function has the following format:
```AFTER(source_string, search_string[, not_case_sensitive][, n])
```
Parameters
The AFTER function accepts the following parameters:
1. source_string
(string)
2. search_string
(string)
3. not_case_sensitive
(Boolean)
(Optional) Specifies case sensitivity. If the
not_case_sensitive
flag is omitted or set to FALSE, the function searches the source string for an exact match. If the
not_case_sensitive
flag is set to TRUE, the function ignores case.
4. n
(number)
(Optional) Specifies the instance of the search string in the source string. If
n
is set to zero or one or omitted, the function finds the first instance of the search string. Otherwise, the function finds the
nth
instance of the search string. If
n
is negative, the function begins the search at the end of the source string.
Return Value
The AFTER function returns a string.
Example
Return_value=AFTER('EricEric', 'r')Return_value='icEric'
Return_value=AFTER('EricEric', 'R')Return_value=''
Return_value=AFTER('EricEric', 'R', TRUE)Return_value='icEric'
Return_value=AFTER('EricEric', 'r', -1)Return_value='ic'
Return_value=AFTER('EricEric', 'R', -1)Return_value=''
Return_value=AFTER('EricEric', 'R', TRUE, -1)Return_value='ic'
Return_value=AFTER('EricEric', 'r', 2)Return_value='ic'
Return_value=AFTER('EricEric', 'R', 2)Return_value=''
Return_value=AFTER('EricEric', 'R', TRUE, 2)Return_value='ic'
ALL Function--All Bits Set
The ALL function accepts two numbers and returns a TRUE if
all
of the bits that are set in the second number are also set in the first number.
Syntax
The ALL function has the following format:
```ALL(number1, number2)
```
Parameters
The ALL function accepts the following parameters:
1. number1
(number)
2. number2
(number)
Return Value
The ALL function returns a Boolean value.
Example
Return_value=ALL(7, 2)Return_value=TRUE
Return_value=ALL(7, 15)Return_value=FALSE
ANDBITS Function--Perform a Bitwise AND Operation
The ANDBITS function performs a bitwise AND operation on two numbers.
Syntax
The ANDBITS function has the following format:
```ANDBITS(number1,number2)
```
Parameters
The ANDBITS function accepts the following parameters:
1. number1
(number)
2. number2
(number)
Return Value
The ANDBITS function returns a number.
Example
Return_value=ANDBITS(7,2)Return_value=2
Return_value=ANDBITS(7,15)Return_value=7
ANY Function--Any Bits Set
The ANY function accepts two numbers and returns a TRUE if
any
of the bits that are set in the second number are also set in the first number.
Syntax
The ANY function has the following format:
```ANY(number1, number2)
```
Parameters
The ANY function accepts the following parameters:
1. number1
(number)
2. number2
(number)
Return Value
The ANY function returns a Boolean value.
Example
Return_value=ANY(7, 2)Return_value=TRUE
Return_value=ANY(7, 15)Return_value=TRUE
AT Function--Is User at Specified LDAP DN
The AT function returns a TRUE if the specified user (user_DN) exists within the specified container (root_DN).
Syntax
The AT function has the following format:
```AT(root_DN, user_DN)
```
Parameters
The AT function accepts the following parameters:
1. root_DN
(string)
2. user_DN (string)
Return Value
The AT function returns a Boolean value.
Remarks
LDAP Only: Yes
BEFORE Function--Find a String
The BEFORE function finds the specified instance of a search string in a source string and returns that part of the source string that precedes the search string. If the search string is not found, then the BEFORE function returns the entire source string.
Syntax
The BEFORE function has the following format:
```BEFORE(source_string, search_string[, not_case_sensitive][, n])
```
Parameters
The BEFORE function accepts the following parameters:
1. source_string
(string)
2. search_string
(string)
3. not_case_sensitive
(Boolean)
Specifies case sensitivity. If the
not_case_sensitive
flag is set to FALSE or omitted, the BEFORE function searches the source string for an exact match. If the
not_case_sensitive
flag is set to TRUE, the function ignores case.
4. n
(number)
Specifies the instance of the search string in the source string. If
n
is set to zero or one or omitted, the BEFORE function finds the first instance of the search string. Otherwise, the function finds the
nth
instance of the search string. If
n
is negative, the function begins the search at the end of the source string.
Return Value
The BEFORE function returns a string.
Example
Return_value=BEFORE('EricEric', 'r')Return_value='E'
Return_value=BEFORE('EricEric', 'R')Return_value='EricEric'
Return_value=BEFORE('EricEric', 'R', TRUE)Return_value='E'
Return_value=BEFORE('EricEric', 'r', -1)Return_value='EricE'
Return_value=BEFORE('EricEric', 'R', -1)Return_value='EricEric'
Return_value=BEFORE('EricEric', 'R', TRUE, -1)Return_value='EricE'
Return_value=BEFORE('EricEric', 'r', 2)Return_value='EricE'
Return_value=BEFORE('EricEric', 'R', 2)Return_value='EricEric'
Return_value=BEFORE('EricEric', 'R', TRUE, 2)Return_value='EricE'
BELOW Function--Is User Below Specified LDAP DN
The BELOW function returns a TRUE if the specified user (user_DN) exists within a container that is
below
the specified container (root_DN)
Syntax
The BELOW function has the following format:
```BELOW(root_DN, user_DN)
```
Parameters
The BELOW function accepts the following parameters:
1. root_DN
(string)
2. user_DN
(string)
Return Value
The BELOW function returns a Boolean value.
Remarks
LDAP Only: Yes
BOOLEAN Function--Convert to "TRUE" or "FALSE"
The BOOLEAN function converts a number or string value to a string value of either "TRUE" or "FALSE". Numeric values of zero are converted to "FALSE". All other numeric values are converted to "TRUE". String values of "true" or "yes" are converted to "TRUE". All other string values are converted to "FALSE". The BOOLEAN function is not case-sensitive.
Syntax
The BOOLEAN function has the following format:
```BOOLean(number | string)
```
Parameters
The BOOLEAN function accepts either one of the following two parameters:
1. number
(number)
2. string
(string)
Return Value
The BOOLEAN function returns one of the following string values:
• "TRUE"
• "FALSE"
Example
Return_value=BOOLEAN('Phoebe')Return_value="FALSE"
Return_value=BOOLEAN('Yes')Return_value="TRUE"
Return_value=BOOLEAN(123)Return_value="TRUE"
Return_value=BOOLEAN(0)Return_value="FALSE"
CHAR Function--Convert an ASCII Value
The CHAR function converts the specified ASCII value to a one-character string.
Syntax
The CHAR function has the following format:
```CHaR(ASCII_value)
```
Parameters
The CHAR function accepts the following parameter:
1. ASCII_value
(number)
Specifies the ASCII value. If the
ASCII_value
is zero, the function returns an empty string. If the
ASCII_value
is greater than 255, the function converts the modulus 256 of the
ASCII_value
to a one-character string.
Note:
Performing a modulus 256 on a value is equivalent to performing a bitwise AND with 255.
Return Value
The CHAR function returns a one-character string.
Example
Return_value=CHAR(0)Return_value=''
Return_value=CHAR(36)Return_value='\$'
Return_value=CHAR(299)Return_value='+'
CENTER Function--Pad a Source String
The CENTER function pads both ends of a source string with a specified character until the resulting string is a specified length. If the padding is uneven, the function adds an extra character to the end of the string.
Syntax
The CENTER function has the following format:
```CENTER(source, length[, padding])
```
Parameters
The CENTER function accepts the following parameters:
1. source
(string or number)
Specifies the source string. The function automatically converts a number to a string.
2. length
(number)
Specifies the length of the resulting string.
3. padding
(string)
(Optional) Specifies the character that the function uses to pad the source string.
• If the
padding
is more than one character long, the function uses the first character.
• If the
padding
is an empty string, the function does not pad the source.
• If the
padding
is omitted and the source is a string, the function uses a space for padding.
• If the
padding
is omitted and the source is a number, the function uses a zero for padding.
Return Value
The CENTER function returns a string.
Example
Return_value=CENTER('Robin', 9, '*')Return_value='**Robin**'
Return_value=CENTER('Robin', 7, 'ooo')Return_value='oRobino'
Return_value=CENTER('Robin', 7, '')Return_value='Robin'
Return_value=CENTER('Robin', 11)Return_value='   Robin'
Return_value=CENTER(123, 9)Return_value='000123000'
COMMONDN Function--Find a Common Root
The COMMONDN function returns the common root of two LDAP distinguished names (DNs) without calling an LDAP server.
Syntax
The COMMONDN function has the following format:
```COMMONDN(ldapdn1, ldapdn2)
```
Parameters
The COMMONDN function accepts the following parameters:
1. ldapdn1
(string)
Specifies an LDAP distinguished name (DN).
2. ldapdn2
(string)
Specifies an LDAP distinguished name (DN).
If either
ldapdn1
or
ldapdn2
is not a valid LDAP DN or if the two DNs do not share a common root, the function returns an empty string. An LDAP DN is not case-sensitive.
Return Value
The COMMONDN function returns a string.
Remarks
LDAP Only: Yes
Example
Return_value=COMMONDN('uid=Vincent,o=NDS.com', 'ou=People,o=nds.com')Return_value='o=NDS.com'
COUNT Function--Count the Elements in a Set
The COUNT function counts the number of elements in a set.
Syntax
The COUNT function has the following format:
```COUNT(set[, case_sensitive])
```
Parameters
The COUNT function accepts the following parameters:
1. set
(string)
Specifies a string of elements that are separated by the caret character: 'element1^element2'. Each element is a string.
2. case_sensitive
(Boolean)
(Optional) Specifies case sensitivity.
• If the
case_sensitive
flag is omitted, the function counts all elements.
• If the
case_sensitive
flag is supplied, the function counts only unique elements.
• If the
case_sensitive
flag is TRUE, the function is case-sensitive.
• If the
case_sensitive
flag is FALSE, the function is not case-sensitive.
Return Value
The COUNT function returns a number.
Example
Return_value=COUNT('phoebe^PHOEBE^robin^robin')Return_value=4
Return_value=COUNT('phoebe^PHOEBE^robin^robin', FALSE)Return_value=2
Return_value=COUNT('phoebe^PHOEBE^robin^robin', TRUE)Return_value=3
DATE Function--Set to Midnight (form 1)
The DATE function (form 1) accepts a numeric representation of date and time and sets the time to midnight on the specified date.
Syntax
The DATE function (form 1) has the following format:
```DATE(date_time)
```
Parameters
The DATE function (form1) accepts the following parameter:
1. date_time
(number)
Specifies the date and time as the number of seconds that have passed since January 1, 1970. If
date_time
is not a valid representation of date and time, the function returns -1.
Return Value
The DATE function (form1) returns a number.
DATE Function--Convert Year, Month, Day, Hours, Minutes, and Seconds (form 2)
The DATE function (form 2) accepts six numbers that represent the year, month, day, hours, minutes, and seconds and converts them to a numeric representation of date and time. Date and time are represented numerically as the number of seconds that have passed since January 1, 1970. If the three time parameters are omitted, the function sets the time to midnight on the specified date.
Syntax
The DATE function (form 2) has the following format:
```DATE(year, month, day[, hours, minutes, seconds])
```
Parameters
The DATE function (form 2) accepts the following parameters:
1. year
(number)
Specifies a four-digit representation of the year.
Example:
2007
2. month
(number)
Specifies the month.
Range:
1-12
3. day
(number)
Specifies the day.
Range:
1-31
4. hours
(number)
(Optional) Specifies the number of hours.
Range:
0-23
5. minutes
(number)
(Optional) Specifies the number of minutes.
Range:
0-59
6. seconds
(number)
(Optional) Specifies the number of seconds.
Range:
0-59
Return Value
The DATE function (form 2) returns a number.
DATEFROMSTRING Function--Convert String to Number
The DATEFROMSTRING function accepts a string representation of a date, a time, or both and converts the string to a numeric representation. Date and time are represented numerically as the number of seconds that have passed since January 1, 1970.
Syntax
The DATEFROMSTRING function has the following format:
```DATEFROMSTRING(date_time[, format_string])
```
Parameters
The DATEFROMSTRING function accepts the following parameters:
1. date_time
(string)
2. format_string
(string)
(Optional) Specifies the format of
date_time
. For example, the
format_string
"YYYYMMDD" specifies the format of "20020223." If the
format_string
is omitted, the function uses the default format of "YYYYMMDDhhmmss." If
date_time
is invalid, the function returns -1.
Return Value
The DATEFROMSTRING function returns a number.
Example
Return_value=DATEFROMSTRING('20020223')Return_value=1024804800
DATETOSTRING Function--Convert Number to String
The DATETOSTRING function accepts a numeric representation of a date, a time, or both and converts the number to a string representation.
Syntax
The DATETOSTRING function has the following format:
```DATETOSTRING(date_time[, format_string])
```
Parameters
The DATETOSTRING function accepts the following parameters:
1. date_time
(number)
Specifies a date, a time, or both as the number of seconds that have passed since January 1, 1970. If the
date_time
is invalid, the function returns the value "INVALID DATE".
2. format_string
(string)
(Optional) Specifies the format of a date, a time, or both in the resulting string using the format codes listed in the table. Any characters or character combinations not listed in the table are inserted in the resulting string as is. If the
format_string
is omitted, the function formats the resulting string using the date and time representation appropriate for the locale that is currently stored in the Policy Server. The format codes and resulting formats are:
 Code Resulting Format %a Abbreviated weekday name (English) %A Full weekday name (English) %b Abbreviated month name (English) %B Full month name (English) %c Date and time representation appropriate for current locale %#c Long date and time representation appropriate for current locale %d Day of month as decimal number (01-31) %H Hour in 24-hour format (00-23) %I Hour in 12-hour format (01-12) %j Day of year as decimal number (001-366) %m Month as decimal number (01-12) %M Minute as decimal number (00-59) %P Local am and pm indicator for 12-hour clock %S Second as decimal number (00-59) %U Week of year as decimal number with Sunday as first day of week (00-53) %w Weekday as decimal number (0-6 with Sunday as 0) %W Week of year as decimal number with Monday as first day of week (00-53) %x Date representation appropriate for current locale %#x Long date representation appropriate for current locale %X Time representation appropriate for current locale %y Year without century as decimal number (00-99) %Y Year with century as decimal number %z, %Z Time-zone name or abbreviation if known %% Percent sign
The pound sign modifies the meaning of the format codes, as follows.
• The format code %#c specifies the long date and time representation appropriate for the current locale.
• The format code %#x specifies the long date representation appropriate for the current locale.
• In all other cases, the pound sign, which is inserted in the format code after the percent sign, results in the removal of leading zeros, if any.
• The pound sign has no effect on codes that format alpha characters, such as the names of months.
Return Value
The DATETOSTRING function returns a string.
Example
Return_value=DATETOSTRING(1024804800, '%Y%m%d')Return_value='20020223'
Return_value=DATETOSTRING(1024804800, '%Y%#m%#d')Return_value='2002223'
DAY Function--Return Day of Month
The DAY function accepts a numeric representation of date and time and returns the number corresponding to the day of the month.
Syntax
The DAY function has the following format:
```DAY(date_time)
```
Parameters
The DAY function accepts the following parameter:
1. date_time
(number)
Specifies the date and time as the number of seconds that have passed since January 1, 1970. If the date is invalid, the function returns -1.
Return Value
The DAY function returns a number from 1 to 31.
Example
Return_value=DAY(1024804800)Return_value=23
DOW Function--Return Day of Week
The DOW function accepts a numeric representation of date and time and returns a number corresponding to the day of the week.
Syntax
The DOW function has the following format:
```DOW(date_time)
```
Parameters
The DOW function accepts the following parameter:
1. date_time
(number)
Specifies the date and time as the number of seconds that have passed since January 1, 1970. If the date is invalid, the function returns -1.
Return Value
The DOW function returns a number from 0 (Sunday) to 6 (Saturday).
Example
Return_value=DOW(1024804800)Return_value=0
DOY Function--Return Day of Year
The DOY function accepts a numeric representation of date and time and returns a number corresponding to the day of the year.
Syntax
The DOY function has the following format:
```DOY(date_time)
```
Parameters
The DOY function accepts the following parameter:
1. date_time
(number)
Specifies the date and time as the number of seconds that have passed since January 1, 1970. If the date is invalid, the function returns -1.
Return Value
The DOY function returns a number from 1 to 366.
Example
Return_value=DOY(1024804800)Return_value=173
ENUMERATE Function--Test Set Elements
The ENUMERATE function passes each element in the specified set to the named expression specified by the parameter #
virtual_user_attribute
or
@user_class
using pasting. If the named expression returns a value, the element is included in the resulting string.
Syntax
The ENUMERATE function has the following format:
```ENUMERATE(set, #virtual_user_attribute | @user_class)

```
Parameters
The ENUMERATE function accepts the following parameters:
1. set
(string)
Specifies a string of elements that are separated by the caret character: 'element1^element2'. Each element is a string.
2. #virtual_user_attribute
(named expression)
Specifies a named expression that calculates a user attribute.
3. @user_class
(named expression)
Specifies a named expression that tests for membership in a user directory or group.
Return Value
The ENUMERATE function returns a string or integer depending on the attribute type that the function expects.
Example 1
Virtual User Attribute #GetCN set to RDN( STRING(%0),FALSE)
ENUMERATE(SM_USERGROUPS, #GetCN)
Example 2
ENUMERATE(SM_USERGROUPS, STRING(RDN(%0, FALSE)))
Example 3 (Removed to clarify CQ154015)

ERROR Function--Write Error Message to Console Log
The ERROR function writes the specified error message to
CA Single Sign-On
's Console Log.
Syntax
The ERROR function has the following format:
```ERROR(error_message)
```
Parameters
The ERROR function accepts the following parameter:
1. error_message
(string)
Return Value
The ERROR function returns an empty string. When used in a Boolean context, the ERROR function returns the value TRUE.
Remarks
Priviledged: Yes
Example
Return_value=ERROR('Invalid Access')Return_value=''
EVALUATE Function--Evaluate an Expression
The EVALUATE function evaluates an expression in the context of the current user and returns the result as a string. If an optional user path is provided, the function evaluates the expression in the context of the specified user.
Syntax
The EVALUATE function has the following format:
```EVALUATE(expression)
```
Parameters
The EVALUATE function accepts the following parameters:
1. expression
(string)
Specifies the expression to be evaluated.
Return Value
The EVALUATE function returns a string.
Remarks
Privileged: Yes
Example
Return_value=EVALUATE("sn + ',' + givenname")Return_value="Hood, Robin"
EXISTS Function--Look Up File Name
The EXISTS function looks up the specified file and returns a TRUE if the file exists. Otherwise, the function returns a FALSE.
Syntax
The EXISTS function has the following format:
```EXISTS(filename)
```
Parameters
The EXISTS function accepts a filename.
filename
(string)
Return Value
The EXISTS function returns a Boolean value.
Remarks
Privileged: Yes
Example
Return_value=EXISTS('SmUtilities.dll')Return_value=TRUE
EXPLODEDN Function--Convert LDAP DN to Set
The EXPLODEDN function converts an LDAP distinguished name (DN) to a set without calling an LDAP server.
Syntax
The EXPLODEDN function has the following format:
```EXPLODED(ldapdn[, remove_attribute_names])
```
Parameters
The EXPLODEDN function accepts the following parameters:
1. ldapdn
(string)
Specifies an LDAP distinguished name (DN).
2. remove_attribute_names
(Boolean)
(Optional) Specifies the
remove_attribute_names
flag. If the flag is TRUE, the function removes the attribute names from the LDAP distinguished name (DN).
Return Value
The EXPLODEDN function returns a string of elements that are separated by the caret character: 'element1^element2'. Each element is a string.
Remarks
LDAP Only: Yes
Example
Return_value=EXPLODEDN('uid=hawk,o=NDS.com', FALSE)Return_value='uid=hawk^o=NDS.com'
Return_value=EXPLODEDN('uid=hawk,o=NDS.com', TRUE)Return_value='hawk^NDS.com'
FILTER Function--Test Set Elements
The FILTER function compares each element in the specified set to the specified pattern and returns a new set containing only the elements that match the pattern. If the optional NOT operator is included, the FILTER function returns a new set containing only the elements that do not match the pattern.
Syntax
The FILTER function has the following format:
```FILTER(set, [NOT ]pattern)
```
Parameters
The FILTER function accepts the following parameters:
1. set
(string)
Specifies a string of elements that are separated by the caret character: 'element1^element2'. Each element is a string.
2. pattern
(string)
Specifies a pattern of characters. A
pattern
can include single characters, ranges of characters, or both. A range of characters is expressed as two characters separated by a hyphen. The following are examples of valid character ranges: 0-9, a-z, and A-Z. The
pattern
parameter can also include characters that are reserved and have special meanings. The reserved characters are:
 Character Meaning ? Matches any single character * Matches any sequence of characters, including one or none [set] Matches any single character in the specified set [!set] or [^set] Matches any single character not in the specified set \ Treats any reserved character as a regular character, such as \*

1. NOT (operator)
(Optional) If the NOT operator is included, the function returns a new set containing only the elements that do not match the pattern.
Return Value
The FILTER function returns a string of elements separated by the caret character: 'element1^element2'. Each element is a string.
Example
Return_value=FILTER('Faith^Earl^Emilie^Fred', 'E*')Return_value='Earl^Emilie'
Return_value=FILTER('Faith^Earl^Emilie^Fred', NOT 'E*')Return_value='Faith^Fred'
FIND Function--Return Position in String
The FIND function finds the specified instance of the search string in the source string and returns its position. If the search string is not found, then the function returns a zero.
Syntax
The FIND function has the following format:
```FIND(source_string, search_string[, not_case_sensitive][, n])
```
Parameters
The FIND function accepts the following parameters:
1. source_string
(string)
2. search_string
(string)
3. not_case_sensitive
(Boolean)
(Optional) Specifies case sensitivity. If the
not_case_sensitive
flagis omitted or set to FALSE, the function searches the source string for an exact match. If the
not_case_sensitive
flag is set to TRUE, the FIND function ignores case.
4. n
(number)
(Optional) Specifies the instance of the search string in the source string. If
n
is set to zero or one or omitted, the function finds the first instance of the search string. Otherwise, the function finds the
nth
instance of the search string. If
n
is negative, the function begins the search at the end of the source string.
Return Value
The FIND function returns a number.
Example
Return_value=FIND('PhoebePhoebe', 'oe', FALSE, 1)Return_value=3
Return_value=FIND('PhoebePhoebe', 'OE', FALSE, 1)Return_value=0
Return_value=FIND('PhoebePhoebe', 'OE', TRUE, 1)Return_value=3
Return_value=FIND('PhoebePhoebe', 'oe', FALSE, -1)Return_value=9
Return_value=FIND('PhoebePhoebe', 'OE', FALSE, -1)Return_value=0
Return_value=FIND('PhoebePhoebe', 'OE', TRUE, -1)Return_value=9
Return_value=FIND('PhoebePhoebe', 'oe', FALSE, 2)Return_value=9
Return_value=FIND('PhoebePhoebe', 'OE', FALSE, 2)Return_value=0
Return_value=FIND('PhoebePhoebe', 'OE', TRUE, 2)Return_value=9
GET Function--Locate Attributes in a User Directory
The GET function locates the specified attribute or attributes in a user directory and returns the attribute values. Multiple attribute values are separated by the caret character. If the function cannot find an attribute, it returns an empty string.
Syntax
The GET function has the following format:
```GET(user_attribute_name | user_attributes_string)
```
Parameters
The GET function accepts one of the following parameters:
1. user_attribute_name
(unquoted string)
Specifies a single user attribute.
2. user_attributes_string
(string)
Specifies a string of user attribute names separated by a character. The function uses this character to separate one attribute's values from another attribute's values in the resulting string.
Return Value
The GET function returns a string.
Remarks
Privileged: Yes
LDAP Only: Yes
Example
Return_value=GET('sn,givenname')Return_value='Finch,Robin'
HEX Function--Convert to Hexadecimal
The HEX function converts a decimal number to a hexadecimal number and returns it as a string.
Syntax
The HEX function has the following format:
```HEX(decimal_number)
```
Parameters
The HEX function accepts the following parameter:
1. decimal_number
(number)
Return Value
The HEX function returns a string.
Example
Return_value=HEX(16)Return_value='10'
HOUR Function--Convert to Hour
The HOUR function converts the specified date and time to an hour from 1 to 12.
Syntax
The HOUR function has the following format:
```HOUR(date_time)
```
Parameters
The HOUR function accepts the following parameter:
1. date_time
(number)
Specifies the date and time as the number of seconds that have passed since January 1, 1970. If
date_time
is not a valid representation of date and time, the function returns -1.
Return Value
The HOUR function returns a number from 1 to 12.
HOUR24 Function--Convert to Hour
The HOUR24 function converts the specified date and time to an hour from 0 to 23.
Syntax
The HOUR24 function has the following format:
```HOUR24(date_time)
```
Parameters
The HOUR24 function accepts the following parameter:
1. date_time
(number)
Specifies the date and time as the number of seconds that have passed since January 1, 1970. If
date_time
is not a valid representation of date and time, the function returns -1.
Return Value
The HOUR24 function returns a number from 0 to 23.
INFO Function--Write INFO Message to Console Log
The INFO function writes the string argument to the
CA Single Sign-On
Console Log as an INFO message.
Syntax
The INFO function has the following format:
```INFO(source_string)
```
Parameters
The INFO function accepts the following parameter:
1. source_string
(string)
Return Value
The INFO function returns a Boolean, always TRUE.
Example
Return_value=INFO("86% Complete")Return_value=TRUE
KEY Function--Look Up Key
The KEY function looks up the specified key name in the specified application section of the specified file and returns a key value. If the key, application, or file is not found, then the KEY function returns an empty string.
Syntax
The KEY function has the following format:
```KEY(filename, [application_name, ]key_name)
```
Parameters
The KEY function accepts the following parameters:
1. filename
(string)
Specifies the file. In the specified file, comment lines start with a semicolon, pound sign, or two forward slashes. Comment lines, blank lines, and leading and trailing spaces are ignored.
2. application_name
(string)
(Optional) Specifies the name of the application section. In the specified file, application names are enclosed by square brackets and specify the beginning of an application section:
[application_name
]. Application names are case-sensitive.
3. key_name
(string)
Specifies the name of the key. In the specified file, key names and values are enclosed by angle brackets and paired by an equal sign, one pair per line: <
key_name
>=<key_value>. Key names are case-sensitive.
Return Value
The KEY function returns a string.
Remarks
Privileged: Yes
LDAP Only: No
Example
Return_value=KEY('application.dat', 'login user')Return_value='key_value'
LCASE Function--Convert to Lowercase
The LCASE function converts any uppercase letters in the specified string to lowercase.
Syntax
The LCASE function has the following format:
```LCASE(specified_string)
```
Parameters
The LCASE function accepts the following parameter:
1. specified_string
(string)
Return Value
The LCASE function returns a string.
Example
Return_value=LCASE('BARRED OWL')Return_value='barred owl'
LEFT Function--Return Part of a String
The LEFT function returns a specified number of characters of a string. If the string is shorter than the specified number of characters, the entire string is returned.
Syntax
The LEFT function has the following format:
```LEFT(source_string, length)
```
Parameters
The LEFT function accepts the following parameters:
1. source_string
(string)
2. length
(number)
Return Value
The LEFT function returns a string.
Example
Return_value=LEFT('JuanJuan', 2)Return_value='Ju'
Return_value=LEFT('JuanJuan', 10)Return_value=('JuanJuan')
Return_value=LEFT('JuanJuan', 0)Return_value=''
LEN Function--Return the Length of a String
The LEN function returns the length of a string.
Syntax
The LEN function has the following format:
```LEN(source_string)
```
Parameters
The LEN function accepts the following parameter:
1. source_string
(string)
Return Value
The function returns a number.
Example
Return_value=LEN("JuanJuan")Return_value=8
LOG Function--Write a String to a File
The LOG function writes the string argument to the specified file.
Syntax
The LOG function has the following format:
```LOG(filename, source_string)
```
Parameters
The LOG function accepts the following parameters:
filename
(string)
1. source_string
(string)
Return Value
The LOG function returns a Boolean, which is always TRUE.
Remarks
Privileged: Yes
Example
Return_value=LOG("auditlog.txt", "Accessing Realm XXX")Return_value=TRUE
LOOP Function--Call a Virtual Attribute in a Loop
The LOOP function calls the virtual attribute once for each possible number in the loop, starting and ending at the specified values. If the step value is specified, the numbers are incremented by the step value. If the virtual attribute returns a non-blank value, the value is included in the resulting set.
Syntax
The LOOP function has the following format:
```LOOP(#virtual_user_attribute, start_value, end_value, [step,] )
```
Parameters
The LOOP function accepts the following parameters:
1. #virtual_user_attribute
(Named Expression)
Name of a defined virtual attribute. The virtual attribute can access the current loop counter by using a reference to %0.
2. start_value
(number)
3. end_value
(number)
4. step
(number)
(Optional) The default is 1. Negative values are allowed.
Return Value
The LOOP function returns a set.
Examples
For these examples assume the virtual user attribute is #Padset := LPAD(%0, 2)
```Return_set=LOOP(#Padset ,1, 5)
Return_set="001^002^003^004^005"
Return_set=LOOP(#Padset ,1, 5, 2)
Return_set="001^003^005"
Return_set=LOOP(#Padset ,5, 1, -1)
Return_set="005^004^003^002^001"
```

LPAD Function--Pad a Source String on the Left
The LPAD function pads a source string on the left with the first character of the specified padding until the resulting string is the specified length.
Syntax
The LPAD function has the following format:
```LPAD(source_string, length[, padding])
```
Parameters
The LPAD function accepts the following parameters:
1. source_string
(string)
This parameter can also be a number; it is automatically converted to a string.
2. length
(number)
The number of characters of the final string.
3. padding
(string)
(Optional) If the padding is more than one character long, only the first character is used. If the padding is zero length, no padding is done. If the source is a string and padding omitted, a space is used for padding. If the source is a number and padding is omitted, a zero is used for padding.
Return Value
The LPAD function returns a string.
Examples
Result_value=LPAD('Juan', 5)Result_value=' Juan'
Result_value=LPAD('Juan', 5, 'X')Result_value= 'XJuan'
Result_value=LPAD('Juan', 6, 'XY')Result_value= 'XXJuan'
Result_value=LPAD(5, 2)Result_value= '05'
Result_value=LPAD(5, 2, ' ')Result_value=' 5'
LTRIM Function--Remove Leading Spaces in a String
The LTRIM function returns a string representing the
source_string
with any leading spaces removed.
Syntax
The LTRIM function has the following format:
```LTRIM(source_string)
```
Parameters
The LTRIM function accepts the following parameter:
1. source_string
(string)
Return Value
The LTRIM function returns a string.
Example
Return_value=LTRIM('  Juan ')Return_value='Juan '
MAX Function--Determine the Larger of Two Values
The MAX function returns the larger of two numeric arguments.
Syntax
The MAX function has the following format:
```MAX(int_1, int_2)
```
Parameters
The MAX function accepts the following parameters:
1. int_1
(number)
2. int_2
(number)
Return Value
The MAX function returns a number.
Example
Return_value=MAX(-2, 4)Return_value=4
MAYBE Function--Report an Indeterminate Result
You can write an expression that tests a condition and calls the function MAYBE if information needed for the test is missing or incomplete. When the expression evaluator encounters MAYBE, it tries to resolve the expression without the needed information. This is only possible when MAYBE is part of a compound expression.
For example, when the operator is AND and one operand is FALSE, the evaluator can determine that the result of the operation is FALSE. When one operand is TRUE and the other operand is undefined or both operands are undefined, the evaluator cannot determine the result of the operation. When both operands are TRUE, the result of the AND operation is TRUE.
 AND Operator True False Undefined True True False Indeterminate False False False False Undefined Indeterminate False Indeterminate
Likewise, when the operator is OR and one operand is TRUE, the evaluator can determine that the result of the operation is TRUE. When one operand is FALSE and the other operand is undefined or both operands are undefined, the evaluator cannot determine the result of the operation. When both operands are FALSE, the result of the OR operation is FALSE.
 OR Operator True False Undefined True True True True False True False Indeterminate Undefined True Indeterminate Indeterminate
If the evaluator cannot resolve the expression, it stops processing and the specified message is output to the console log or report depending on the context. MAYBE is typically called during role evaluation either in the context of a policy or report generation.
Typically, conditions depend on the time of day or an IP address or the value of a virtual user attribute (specified by the # sign), a user class (specified by the @ sign), a context variable (specified by the % sign), or a user attribute.
In the case of LDAP user directories, the evaluator cannot determine whether a user attribute is defined.
Syntax
The MAYBE function has the following format:
```MAYBE(message)
```
Parameters
The MAYBE function accepts the following parameter:
1. message
(string)
Specifies the information that is missing and needed to evaluate a condition in an expression.
Return Value
The MAYBE function does not return.
Example
VEXIST(%ClientIP) ? #CheckIP : MAYBE('Client IP address is not defined.')Message Output to the Console Log or Report: 'Client IP address is not defined.'
MID Function--Return Part of a String
The MID function returns the characters of the
source_string
starting at the
start
position (numbered from one) up to the specified
length
. If no
length
is specified, the rest of the source_string (after the
start
position) is returned.
Syntax
The MID function has the following format:
```MID(source_string, start[,length])
```
Parameters
The MID function accepts the following parameters:
1. source_string
(string)
2. start
(number)
3. length
(number) (Optional)
Return Value
The MID function returns a string.
Example
Return_value=MID('JuanJuan', 2, 3)Return_value='uan'
Return_value=MID('JuanJuan', 2)Return_value='uanJuan'
MIN Function--Determine the Lesser of Two Numbers
The MIN function returns the lesser of two numeric arguments.
Syntax
The MIN function has the following format:
```MIN(int_1, int_2)
```
Parameters
The MIN function accepts the following parameters:
1. int_1
(number)
2. int_2
(number)
Return Value
The MIN function returns a number.
Example
Return_value=MIN(-2, 4)Return_value=-2
MINUTE Function--Return the Minutes Component for a Date
The MINUTE function returns the number representing the minute component for a specified
date_time
expressed in seconds since January 1, 1970.
Syntax
The MINUTE function has the following format:
```MINUTE(date_time)
```
Parameters
The MINUTE function accepts the following parameter:
1. date_time
(number)
The date in the number of seconds.
Return Value
The MINUTE function returns a number between 0 and 59. If the
date_time
is invalid, MINUTE returns -1.
MOD Function--Return Division Remainder
The MOD function returns the modulus (remainder) of the division of the first number by the second. If the second number is zero, zero is returned.
Syntax
The MOD function has the following format:
```MOD(int_1, int_2)
```
Parameters
The MOD function accepts the following parameters:
1. int_1
(number)
The dividend of the division operation.
2. int_2
(number)
The divisor of the division operation.
Return Value
The MOD function returns a number.
Example
Return_value=MOD(3, 2)Return_value=1
Return_value=MOD(6, 3)Return_value =0
MONTH Function--Return the Month Component of a Date
The MONTH function returns the number representing the month component for a specified
date_time
expressed in seconds since January1, 1970.
Syntax
The MONTH function has the following format:
```MONTH(date_time)
```
Parameters
The MONTH function accepts the following parameter:
1. date_time
(number)
The date represented in the number of seconds.
Return Value
The MONTH function returns a number between 1 and 12. If the
date_number
is invalid, MONTH returns -1.
NOTBITS Function--Perform a Bitwise NOT
The NOTBITS function performs a bitwise NOT operation on a number.
Syntax
The NOTBITS function has the following format:
```NOTBITS(number)
```
Parameters
The NOTBITS function accepts the following parameter:
1. number
(number)
Return Value
The NOTBITS function returns a number.
Examples
Return_value=NOTBITS(0)Return_value=-1
Return_value=NOTBITS(1)Return_value=-2
NOW Function--Return Current Time in Seconds
The NOW function returns a numeric value representing the number of seconds since January 1, 1970 at the time the function is invoked. The time is local to the current server system.
This value is computed at the beginning of operations in a specific expression. Multiple references to the NOW function within the same expression always have the same result.
Syntax
The NOW function has the following format:
```NOW()
```
Parameters
The NOW function accepts no parameters.
Return Value
The NOW function returns a number.
Example
Return_value=NOW()Return_value=1024804800
NOWGMT Function--Return Current Time in Seconds
The NOWGMT function returns a numeric value representing the number of seconds since January 1, 1970 at the time the function is invoked. The time is in the Greenwich (ZULU) time zone.
This value is computed at the beginning of operations in a specific expression. Multiple references to the NOWGMT function within the same expression always have the same result.
Syntax
The NOWGMT function has the following format:
```NOWGMT()
```
Parameters
The NOWGMT function accepts no parameters.
Return Value
The NOWGMT function returns a number.
NUMBER Function--Convert to a Numeric Value
The NUMBER function converts its argument to a numeric value. Strings are converted up to the first non-digit. Booleans that have a value of TRUE are converted to 1; otherwise, they are converted to zero.
Syntax
The NUMBER function has the following format:
```NUMBER(source_string | bool_val)
```
Parameters
The NUMBER function accepts either of the following parameters:
1. source_string
(string)
2. bool_val
(Boolean)
Return Value
The NUMBER function returns a number.
Example
Return_value=NUMBER('juan')Return_value=0
Return_value=NUMBER('45juan')Return_value=45
Return_value=NUMBER(TRUE)Return_value=1
ORBITS Function--Perform a Bitwise OR Operation
The ORBITS function performs a bitwise OR operation on its two arguments.
Syntax
The ORBITS function has the following format:
```ORBITS(int_1, int_2)
```
Parameters
The ORBITS function accepts the following parameters:
1. int_1
(number)
2. int_2
(number)
Return Value
The ORBITS function returns a number.
Examples
Result_value=ORBITS(6, 1)Result_value=7
Result_value=ORBITS(7, 8)Result_value=15
PARENTDN Function--Retrieve Parent in LDAP Tree
The PARENTDN function returns the next level up in the LDAP Directory Information Tree above the specified distinguished name (DN). If the specified DN is invalid, or is already at the top of the tree, a blank string is returned.
Syntax
The PARENTDN function has the following format:
```PARENTDN(source_string)
```
Parameters
The PARENTDN function accepts the following parameters:
1. source_string
(string)
The LPAP distinguished name (DN).
Return Value
The PARENTDN function returns a string.
Remarks
LDAP Only: Yes
Example
Return_value=PARENTDN("uid=juan,o=NDS.com")Return_value="o=NDS.com"
Return_value=PARENTDN("o=NDS.com") Return_value=""
PCASE Function--Convert a String to Proper Case
The PCASE function converts the specified string to proper case (initial capital letters).
Syntax
The PCASE function has the following format:
```PCASE(source_string)
```
Parameters
The PCASE function accepts the following parameters:
1. source_string
(string)
Return Value
The PCASE function returns a string.
Example
Return_value=PCASE("framingham, mass")Return_value="Framingham, Mass")
QS Function--Retrieve Items from a Query String
The QS function retrieves items from the query string associated with the resource being accessed by the user when the expression is evaluated.
If no arguments are supplied to this function, the entire query string (and only the query string) is returned. The query string is returned unchanged.
If the string argument is supplied as a blank string (“”), then all of the arguments in the query string that are unnamed are returned. If multiple values exist, they are returned as a set.
If the string argument is supplied as a non-blank string, all of the arguments in the query string that are named with a matching name are returned. Case-sensitivity is controlled by the optional Boolean flag. If multiple values exist, they are returned as a set.
Syntax
The QS function has the following format:
```
QS([input_string,][not_case_sensitive])
```
Parameters
The QS function accepts the following optional parameters:
• input_string
(string)
(Optional) Name of an argument in the query string.
• not_case_sensitive
(string)
(Optional) Specifies whether the function performs a case sensitive search.
Values
:
• FALSE (default): The function searches the query string for an exact match.
• TRUE: The function ignores case.
Return Value
The QS function returns a string.
Example
Assume this resource:
http://myserver.com/index.jsp?Test=A&X&TEST=D&c&Dbg
Return_value=QS()Return_value='Test=A&X&TEST=D&c&Dbg'
Return_value=QS("")Return_value='X^c'
Return_value=QS("Test")Return_value= 'A^D'
Return_value=QS("Test", false)Return_value= 'A'
"Dbg" IN QS("")Return_value=TRUE
RDN Function--Retrieve First Component of LDAP DN
The RDN function returns the first component of the specified LDAP Distinguished Name (DN). If the optional Boolean argument is TRUE (the default), the attribute name is removed and only the value is returned.
If the specified DN is invalid, a blank string is returned. This function does not call any LDAP server.
Syntax
The RDN function has the following format:
```RDN(DN_string[, keep_name])
```
Parameters
The RDN function accepts the following parameters:
1. DN_string
(string)
LDAP Distinguished Name
2. keep_name
(Optional) When set to FALSE (the default), the attribute name is removed from the returned string. When set to TRUE, the attribute is included in the returned string.
Return Value
The RDN function returns a string.
Remarks
LDAP Only: Yes
Example
Return_value=RDN("uid=juan,o=NDS.com")Return_value="juan"
Return_value=RDN("uid=juan,o=NDS.com", FALSE)Return_value="juan"
Return_value=RDN("uid=juan,o=NDS.com", TRUE)Return_value="uid=juan"
RELATIONDN Function--Compare Two Distinguished Names
The RELATIONDN function compares the two specified LDAP distinguished names (DNs) and returns a string indicating the relationship between them.
If either of the two DNs is invalid, or the two DNs are completely unrelated, a blank string is returned.
If the two DNs are related, the difference in levels (of the Directory Information Tree) is returned as a string. If the first DN is the ancestor of the second, the number is positive. If the first DN is a descendent of the second, the number is negative. If the two DNs are equal or siblings, the return is 0 (indicating no levels).
This function does not call any LDAP server functions.
Syntax
The RELATIONDN function has the following format:
```RELATIONDN(dn_1, dn_2)
```
Parameters
The RELATIONDN function accepts the following parameters:
1. dn_1
(string)
2. dn_2
(string)
Return Value
The RELATIONDN function returns a string.
Remarks
LDAP Only: Yes
Example
Return_value=RELATIONDN("uid=eric,o=NDS.com", "o=NDS.com")Return_value="-1"
Return_value=RELATIONDN("o=NDS.com", "uid=eric,o=NDS.com")Return_value="1"
Return_value=RELATIONDN("uid=dave,o=NDS.com", "uid=eric,o=NDS.com")Return_value="0"
Return_value=RELATIONDN("uid=dave,o=XYZ.com", "uid=eric,o=NDS.com")Return_value=""
RIGHT Function--Retrieve Characters from a String
The RIGHT function returns the specified number of characters from the end of a string. If the string is shorter than the number, the entire string is returned.
Syntax
The RIGHT function has the following format:
```RIGHT(source_string, length)
```
Parameters
The RIGHT function accepts the following parameters:
1. source_string
(string)
2. length
(number)
Number of characters to extract, counting from the end of the string.
Return Value
The RIGHT function returns a string.
Example
Return_value=RIGHT('JuanJuan', 2)Return_value='an'
Return_value=RIGHT('JuanJuan', 10)Return_value='JuanJuan'
Return_value=RIGHT('JuanJuan', 0)Return_value=''
RPAD Function--Pad a String on the Right
The RPAD function adds the first character of the specified padding to the end of the string until the source string becomes the specified length.
If the padding is more than one character long, only the first character is used. If the padding is zero length, no padding is added.
If the source is a string, and the padding is not specified, a space is used for padding. If the source is a number and padding is not specified, a zero is used for padding.
Syntax
The RPAD function has the following format:
```RPAD(source_string|number, length[, padding])
```
Parameters
The RPAD function accepts the following parameters:
1. source_string
(string)
This parameter can be a number; it is converted to a string.
2. length
(number)
3. padding
(string)
(Optional)
Return Value
The RPAD function returns a string.
Example
Return_value=RPAD('Juan', 5)Return_value='Juan '
Return_value=RPAD('Juan', 5, 'X') Return_value='JuanX'
Return_value=RPAD('Juan', 6, 'XY')Return_value='JuanXX'
Return_value=RPAD(5, 2)Return_value='50'
Return_value=RPAD(5, 2, ' ')Return_value='5 '
RPT Function--Repeat a String
The RPT function returns a string that repeats a source string the specified number of times.
Syntax
The RPT function has the following format:
```RPT(source_string|number, repeat_count)
```
Parameters
The RPT function accepts the following parameters:
1. source_string
(string)
This parameter can be a number; it is converted to a single character.
2. repeat_count
(string)
Return Value
The RPT function returns a string.
Example
Return_value=RPT('Juan', 3)Return_value='JuanJuanJuan')
Return_value=RPT('*', 10)Return_value="**********')
RTRIM Function--Remove Trailing Spaces from a String
The RTRIM function eliminates trailing spaces from a source string and returns the result.
Syntax
The RTRIM function has the following format:
```RTRIM(source_string)
```
Parameters
The RTRIM function accepts the following parameter:
1. source_string
(string)
Return Value
The RTRIM function returns a string.
Example
Return_value=RTRIM(' JuanJuan  ' )Return_value=' JuanJuan'
SECOND Function--Return the Number of Seconds in a Date
The SECOND function returns a value that represents the seconds component of a date expressed as the number of seconds since January 1, 1970.
Syntax
The SECOND function has the following format:
```SECOND(date_time)
```
Parameters
The SECOND function accepts the following parameter:
1. date_time
(number)
The number of seconds.
Return Value
The SECOND function returns a number from 0 to 59.
SET Function--Set the Value of an Attribute
The SET function assigns a specified value to a specified attribute. Multiple values are specified for multi-valued attributes by a set. This function works for all User Directories supported by
CA Single Sign-On
.
The SET function returns TRUE if
CA Single Sign-On
returns success on the modification.
If the attribute is not visible to
CA Single Sign-On
, the function fails. The attribute may not be visible due to security reasons (security in the User Directory) or, in the case of ODBC directories, because it is not in the configured Query or not an attribute listed in the Set Properties setting of the
CA Single Sign-On
Query Scheme.
Syntax
The SET function has the following format:
```SET(attr_name, value)
```
Parameters
The SET function accepts the following parameters:
1. attr_name
(string)
2. value
(string)
Specifies one or more values. Multiple values are separated by the caret character.
Return Value
The SET function returns a Boolean.
Remarks
Privileged: Yes
Example
Return_value=SET("Retries", STRING(NUMBER(Retries) + 1))
SIGN Function--Return the Sign of a Number
The SIGN function accepts a number. If the number is negative, SIGN returns a negative one. If the number is zero, SIGN returns a zero. If the number is positive, SIGN returns a positive one.
Syntax
The SIGN function has the following format:
```SIGN(number)
```
Parameters
The SIGN function accepts the following parameter:
1. number
(number)
Return Value
The SIGN function returns a number: -1, 0, or +1.
Example
Return_value=SIGN(-40)Return_value=-1
Return_value=SIGN(0)Return_value=0
Return_value=SIGN(999)Return_value=1
SORT Function--Sort a Set
The SORT function sorts a specified set. Case sensitivity is specified by an optional Boolean parameter. Duplicate items are eliminated from the resulting set.
Syntax
The SORT function has the following format:
```SORT(source_set[, not_case_sensitive]
```
Parameters
The SORT function accepts the following parameters:
1. source_set
(string)
Set to be sorted.
2. not_case_sensitive
(Boolean)
(Optional) If this parameter is omitted or set to FALSE, the sort treats entries as identical unless the cases are different. If this parameter is set to TRUE, the sort ignores case.
Return Value
The SORT function returns a set.
Examples
Return_value=SORT("Eric^Bart^Chuck^BART^Chuck") Return_value="BART^Bart^Chuck^Eric"
Return_value=SORT("Eric^Bart^Chuck^BART^Chuck", FALSE) Return_value="BART^Bart^Chuck^Eric"
Return_value=SORT("Eric^Bart^Chuck^BART^Chuck", TRUE) Return_value="Bart^Chuck^Eric"
SPACE Function--Return a String of Spaces
The SPACE function returns a string that consists of the specified number of spaces.
Syntax
The SPACE function has the following format:
```SPACE(repeat_count)
```
Parameters
The SPACE function accepts the following parameters:
1. repeat_count
(number)
The number of spaces to include in the string.
Return Value
The SPACE function returns a string.
Example
Return_value=SPACE(3) Return_value='   '
Return_value=SPACE(10) Return_value="          "
STRING Function--Convert to a String
The STRING function converts a number or Boolean into a string value.
Syntax
The STRING function has the following format:
```STRING(num_value|bool_value)
```
Parameters
The STRING function accepts either one of these parameters:
1. num_value
(number)
2. bool_value
(Boolean)
Return Value
The STRING function returns a string.
Example
Return_value=STRING(TRUEVAL)Return_value="TRUE"
Return_value=STRING(123) Return_value='123'
THROW Function--Stop Processing and Report Custom Error
You can write an expression that tests for an error and if an error has occurred, calls THROW, passing a custom error message. When the expression evaluator encounters THROW, it stops processing the expression and outputs the custom error message to the console log.
Syntax
The THROW function has the following format:
```THROW(error_message)
```
Parameters
The THROW function accepts the following parameter:
1. error_message
(string)
Specifies the custom error message that is output to the console log.
Return Value
The THROW function does not return.
Example
EXISTS('MyFile') ? #Process('MyFile') : THROW('File does not exist.')Message Output to the Console Log: 'File does not exist.'
VEXIST(#Sortname) ? #Sortname : THROW('Sortname is not defined.')Message Output to the Console Log: 'Sortname is not defined.'
TRACE Function--Write Trace Entry to Console Log
The TRACE function writes the string argument to the
CA Single Sign-On
Console Log as a trace entry.
Syntax
The TRACE function has the following format:
```TRACE(source_string)
```
Parameters
The TRACE function accepts the following parameter:
1. source_string
(string)
Return Value
The TRACE function returns a Boolean, always TRUE.
Remarks
Priviledged: Yes
Example
Return_value=TRACE("Executing Code")Return_value=TRUE
TRANSLATE Function--Replace String Value
The TRANSLATE function replaces all occurrences of one string found within a second string with a third string. The search is case-sensitive unless the optional Boolean is set to TRUE.
Syntax
The TRANSLATE function has the following format:
```TRANSLATE(source_string, search_string, replace_string[, not_case_sensitive])
```
Parameters
The TRANSLATE function accepts the following parameters:
1. source_string
(string)
2. search_string
(string)
3. replace_string
(string)
4. not_case_sensitive
(Boolean)
(Optional) If this parameter is not set or set to FALSE, case is considered in the search. If set to TRUE, case is ignored.
Return Value
The TRANSLATE function returns a string.
Example
Return_value=TRANSLATE('Eric','r','x')Return_value='Exic'
Return_value=TRANSLATE('Eric','ri','x')Return_value='Exc'
Return_value=TRANSLATE('Eric','r','xy')Return_value='Exyic'
Return_value=TRANSLATE('Eric','R','x')Return_value='Eric'
Return_value=TRANSLATE('Eric','R','x',TRUE)Return_value= 'Exic'
UCASE Function--Convert to Upper Case
The UCASE function converts the source string to upper case.
Syntax
The UCASE function has the following format:
```UCASE(source_string)
```
Parameters
The UCASE function accepts the following parameter:
1. source_string
(string)
Return Value
The UCASE function returns a string.
Example
Return_value=UCASE('framingham, mass')Return_value='FRAMINGHAM, MASS'
URL Function--Returns a Component of a URL String
The URL function parses the supplied URL (or path) and returns the specified component. This function ignores characters that are URL-encoded.
The URL function only parses strings that use slashes, not backslashes. If you are using a system running Windows, use the TRANSLATE function to convert backslashes to slashes.
Syntax
The URL function has the following format:
```URL(url_string, component)
```
Parameters
The URL function accepts the following parameters:
1. url_string
(string)
The URL or path must be specified following this format:
```[<protocol>:][//][<user>[:<password>]@]<server>[:<port#>] [[/<directory>]/[<file>]] [?<querystring>]
```
2. component
(string)
Component names are not case-sensitive. You can specify any of the following components:
3. PROTOCOL, DRIVE, or NAMESPACE
• USER
• PASSWORD
• SERVER
• PORT
• DOMAIN
• URI
• PATH
• DIRECTORY
• FILENAME
• BASENAME
• EXTENSION
• QUERYSTRING
Return Value
The URL function returns a string.
Examples
Return_value=URL("http://www.myserver.com:8080/app1/xyzzy.jsp?id=12", "PROTOCOL")Return_value="http:"
Return_value=URL("ftp://joe:[email protected]/dir1/xyzzy.zip", "USER")Return_value="joe"
Return_value=URL("ftp://joe:[email protected]/dir1/xyzzy.zip", "PASSWORD")Return_value="dog"
Return_value=URL("http://www.myserver.com:8080/app1/xyzzy.jsp?id=12", "SERVER")Return_value="www.myserver.com"
Return_value=URL("http://www.myserver.com:8080/app1/xyzzy.jsp?id=12", "PORT")Return_value="8080"
Return_value=URL("http://www.myserver.com:8080/app1/xyzzy.jsp?id=12", "DOMAIN")Return_value="myserver.com"
Return_value=URL("ftp://joe:[email protected]/dir1/xyzzy.zip", "URI")Return_value="/dir1/xyzzy.zip"
Return_value=URL("ftp://joe:[email protected]/dir1/xyzzy.zip", "PATH")Return_value="/dir1/xyzzy.zip"
Return_value=URL("ftp://joe:[email protected]/dir1/xyzzy.zip", "DIRECTORY")Return_value="/dir1"
Return_value=URL("ftp://joe:[email protected]/dir1/xyzzy.zip", "FILENAME")Return_value="xyzzy.zip"
Return_value=URL("ftp://joe:[email protected]/dir1/xyzzy.zip", "BASENAME")Return_value="xyzzy"
Return_value=URL("ftp://joe:[email protected]/dir1/xyzzy.zip", "EXTENSION")Return_value="zip"
Return_value=URL("ftp://joe:[email protected]/dir1/xyzzy.zip", "QUERYSTRING")Return_value=""
Return_value=URL("http://www.myserver.com:8080/app1/xyzzy.jsp?id=12", "QUERYSTRING")Return_value="id=12"
URLDECODE Function--Decode a URL String
The URLDECODE function decodes the specified URL string.
Syntax
The URLDECODE function has the following format:
```URLDECODE(url)
```
Parameters
The function accepts the following parameter:
1. url
(string)
Return Value
The URLDECODE function returns a string.
Example
Return_value=URLDECODE("Framingham%2C+Mass")Return_value="Framingham, Mass"
URLENCODE Function--Encode a String
The URLENCODE function encodes the passed-in string to URL format.
Syntax
The URLENCODE function has the following format:
```URLENCODE(source_string)
```
Parameters
The URLENCODE function accepts the following parameter:
1. source_string
(string)
Return Value
The URLENCODE function returns a string.
Example
Return_value=URLENCODE('Framingham, Mass') Return_value='Waltham%2C+Mass'
VEXIST Function--Is the Parameter Defined?
The VEXIST function accepts a named expression, a context variable, or user attribute and determines whether it is defined. If defined, VEXIST returns TRUE. If not, VEXIST returns FALSE.
In the case of LDAP user directories,
CA Single Sign-On
cannot determine whether a user attribute is defined and returns FALSE.
Syntax
The VEXIST function has the following format:
```VEXIST(#virtual_user_attribute | @user_class | %context_variable | user_attribute_name | user_attribute_string)
```
Parameters
The VEXIST function accepts one of the following parameters:
1. #virtual_user_attribute
(named expression)
Specifies a named expression that calculates a user attribute.
2. @user_class
(named expression)
Specifies a named expression that tests for membership in a user directory or group.
3. %context_variable
(context variable)
Specifies a context variable.
4. user_attribute_name
(unquoted string)
Specifies a single user attribute.
5. user_attributes_string
(string)
Specifies a string of user attribute names separated by a character.
Return Value
The VEXIST function returns a Boolean.
Example
Return_value=VEXIST(#Age)Return_value=TRUE
Return_value=VEXIST(@IsDolphin)Return_value=FALSE
Return_value=VEXIST(%ClientIP)Return_value=TRUE
Return_value=VEXIST(givenname)Return_value=FALSE
Return_value=VEXIST('last,first')Return_value=TRUE
WARNING Function--Write WARNING Message to Console Log
The WARNING function writes the string argument to the
CA Single Sign-On
Console Log as a warning message.
Syntax
The WARNING function has the following format:
```WARNING(source_string)
```
Parameters
The WARNING function accepts the following parameter:
1. source_string
(string)
Return Value
The WARNING function returns a Boolean, always TRUE.
Example
Return_value=WARNING("Buffer Full")Return_value=TRUE
XORBITS Function--Perform a Bitwise XOR Operation
The XORBITS function performs a bitwise XOR operation on its two arguments.
Syntax
The XORBITS function has the following format:
```XORBITS(num_1,num_2)
```
Parameters
The XORBITS function accepts the following parameters:
1. num_1
(number)
2. num_2
(number)
Return Value
The XORBITS function returns a number.
Example
Return_value=XORBITS(7, 2)Return_value=5
Return_value=XORBITS(7, 15)Return_value=8
YEAR Function--Return the Year Component of a Numeric Date
The YEAR function returns a number that indicates the year component of a date in seconds since January 1, 1970.
Syntax
The YEAR function has the following format:
```YEAR(date_time)
```
Parameters
The YEAR function accepts the following parameter:
1. date_time
(number)
The date represented in seconds.
Return Value
The YEAR function returns a number between 70 and 138.
YEAR4 Function--Return the Year Component of a Date (4 digits)
The YEAR4 function returns the four-digit year component of a date expressed in seconds since January 1, 1970.
Syntax
The YEAR4 function has the following format:
```YEAR4(date_time)
```
Parameters
The YEAR4 function accepts the following parameters:
1. date_time
(number)
Return Value
The YEAR4 function returns a returns a number between 1970 and 2038.