List of built-in Rules functions
AVG
This function returns an integer that represents the average of all the values provided as arguments. This function uses the following syntax:
AVG(value1, value2, value3, ..., valueX)
Arguments to this function can be any variable or function result. The value must be a numeric integer. Invalid values are ignored and not considered in computing the average.
No rounding of the result is done. Any number of arguments can be provided. If no arguments are provided or all arguments are non-numeric, the function returns zero (0).
BITON
This function tests for one or more bits in a binary value and you can use it in when you need to determine whether bit flags are on or off in a flag byte. This function uses the following syntax:
BITON(string1,string2)
The string1 value can be any variable or function result. No data conversion is automatically performed on string1.
The string2 value is coded as a string of hexadecimal digit pairs with two characters being a single hexadecimal byte. The length of string2 must be an even number of characters. The specified string2 is converted to hexadecimal internally and is used to test the matching bits in string1. The string2 value is padded to the right if needed to match the length of string1.
C2D
This function converts a character string to its decimal equivalent. This function uses the following syntax:
C2D(string)
C2X
This function converts a character string to its hexadecimal string equivalent. This function uses the following syntax:
C2X(string)
CNVTUOM | CUOM | CU
This function returns a string that represents the value of the selected string that has had the scaling unit-of-measure converted to single units. The maximum value is 9,223,372,036,854,775,807 (one byte less than 8192PI).
If you specify a value that is too large, the function returns the original string and no conversion will be done.
Note
Floating point numbers are not supported. For example, 23.87K is not a valid value for this function.
This function uses the following syntax:
CUOM(value|variable)
where value|variable is any constant or variable
The following lists the supported suffixes:
K: value * 1000
Ki: value * 1024
M: value * 1,000,000
Mi: value * 1,048,576
G: value * 1,000,000,000
Gi: value * 1,073,741,824
T: value * 1,000,000,000,000
Ti: value * 1,099,511,627,776
P: value * 1,000,000,000,000,000
Pi: value * 1,125,899,906,842,624
Note
The values above are shown with commas for clarity. Converted values do not include commas.
If the supplied value does not have a suffix or the suffix is not recognized, the function returns the original string and without any conversion
Suffix values are case-insensitive.
DATE
This function returns a character string representing the current date in the format specified. This function uses the following syntax:
DATE(format)
where format can be one of the following values:
J: Julian date; formatted as YYYY/DDD
JU: Julian date; formatted as YYYYDDD (no slashes)
U: United States date; formatted as MM/DD/YYYY
UU: United States date; formatted as MMDDYYYY (no slashes)
US: United States date (short); formatted as MM/DD/YY
USU: United States date (short); formatted as MMDDYY (no slashes)
E: European date; formatted as DD/MM/YYYY
EU: European date; formatted as DDMMYYYY (no slashes)
ES: European date (short); formatted as DD/MM/YY
ESU: European date (short); formatted as DDMMYY (no slashes)
S: Sortable date; formatted as YYYY/MM/DD
SU: Sortable date; formatted as YYYYMMDD (no slashes)
SS: Sortable date (short); formatted as YY/MMDD
SSU - Sortable date (short); formatted as YYMMDD (no slashes)
M: Military date; formatted as DD-MMM-YYYY
MU: Military date; formatted as DDMMYYYY (no dashes)
MS: Military date (short); formatted as DD-MMM-YY
MSU: Military date (short); formatted as DDMMMYY (no dashes)
The format code is optional and, if omitted, the U format is used as the default.
D2C
This function converts the supplied numeric value to the EBCDIC equivalent character string. Only a single numeric value can be supplied. The value must be in the range of 0-256. Not all values in this range will result in a printable character.
This function uses the following syntax:
D2C(string)
D2X
This function converts the supplied numeric value to the 2-character hexadecimal equivalent character string. Only a single numeric value can be used and the value must be in the range of 0-256.
This function uses the following syntax:
D2X(string)
EVDATE or ED
This function returns a character string representing the date of the event being handled in the format specified by format. The format code is optional and, if omitted, uses the 'U' format as the default.
This function uses the following syntax:
EVDATE(format)
where format can be:
J: Julian date; formatted as YYYY/DDD
JU: Julian date; formatted as YYYYDDD (no slashes)
U: United States date; formatted as MM/DD/YYYY
UU: United States date; formatted as MMDDYYYY (no slashes)
US: United States date (short); formatted as MM/DD/YY
USU: United States date (short); formatted as MMDDYY (no slashes)
E: European date; formatted as DD/MM/YYYY
EU: European date; formatted as DDMMYYYY (no slashes)
ES: European date (short); formatted as DD/MM/YY
ESU: European date (short); formatted as DDMMYY (no slashes)
S: Sortable date; formatted as YYYY/MM/DD
SU: Sortable date; formatted as YYYYMMDD (no slashes)
SS: Sortable date (short); formatted as YY/MMDD
SSU - Sortable date (short); formatted as YYMMDD (no slashes)
M: Military date; formatted as DD-MMM-YYYY
MU: Military date; formatted as DDMMYYYY (no dashes)
MS: Military date (short); formatted as DD-MMM-YY
MSU: Military date (short); formatted as DDMMMYY (no dashes)
EVTIME or ET
This function returns a character string that represents the time of the event, formatted according to type. The type code is optional and, if omitted, the event time is formatted with a type of N.
This function uses the following syntax:
EVTIME(type)
where type can be:
N: normal; formatted as HH:MM:SS
NU: normal undelimited; formatted as HHMMSS
EXTRACT | EX
This function returns a variable-length string extracted from another string for evaluation based on a beginning and ending delimiter in the source string.
This function uses the following syntax:
EXTRACT(value|variable, delim1, delim2[,start])
where:
value|variable: any constant or variable that is the source for the extraction
delim1: any single character that identifies the beginning of the string to be extracted.
If not specified, an open parenthesis “(“ is assumed by default.
delim2: any single character that identifies the end of the string to be extracted.
If not specified, a closed parenthesis “)“ is assumed by default.
start: an optional value for the start position in the source where the extraction will begin. The default is 1.
If delim1 cannot be located within the source string, the function returns a single blank for a value. If delim2 cannot be located, the function returns whatever value was found (up to the first blank) while looking for delim2. This is useful when delim2 is missing (due to an intervening blank space).
Note
If the beginning of the start location has more than one occurrence of delim1, the EXTRACT function returns the value from the first occurrence of delim1 and delim2. Rule processing ignores all other occurrences.
If the start value specifies a value beyond the end of the value or variable, t he EXTRACT function uses a value of 1 and proceeds with the evaluation.
INRGRPL
This function tests whether the user ID, associated with the issuer of the Rule event, belongs to a RACF Group that is referenced by the ACEEFCGP table.
This function accepts one argument. The argument can be up to 8 characters long and must be enclosed in single quotes; asterisk (*) and plus sign (+) are also supported. If you specify an asterisk, it must as the last character.
This function uses the following syntax:
INRGRPL(groupName)
If the argument is found in the RACF Group list, the return code is 1; otherwise, the return code is 0.
The specified argument is compared against the list of RACF Group names associated with the event origin address space, as indicated in the ACEEFCGP field of the ACEE.
LC
This function converts the character string to all lowercase letters. This function uses the following syntax:
LC(string)
LEFT
This function returns len characters from string starting at the left end. This function uses the following syntax:
LEFT(string,len)
LEN
This function returns the length of the character string. This function uses the following syntax:
LEN(string)
LIKE | LK
This function compares the string in argument 1 to a pattern in argument 2. The pattern can include wildcard characters (+) to identify a location to be skipped or a generic character (*) to identify a number of characters to be skipped.
The following lists the possible returned values:
1: TRUE indicating that the pattern is found in the string
0: FALSE indicating that the pattern is not found in the string
This function uses the following syntax:
LIKE(value|variable, pattern)
where:
value|variable is any constant or variable that is the source string for the matching operation.
If the value includes blanks spaces, you must enclose it with single quotation marks. You do not need to use quotation marks if the value is a variable name,
pattern is any constant or variable that contains the pattern to be matched.
MAX
This function returns the integer value of the argument that is the largest. Any number of arguments may be provided. If no arguments are provided or all arguments are non-numeric, the function returns zero (0).
This function uses the following syntax:
MAX(value1, value2, value3, ..., valueX)
Arguments to this function can be any variable or function result. The value must be a numeric integer. Invalid values are ignored.
MIN
This function returns the integer value of the argument that is the smallest. Any number of arguments may be provided. If no arguments are provided or all arguments are non-numeric, the function returns zero (0).
This function uses the following syntax:
MIN(value1, value2, value3, ..., valueX)
Arguments to this function can be any variable or function result. The value must be a numeric integer. Invalid values are ignored.
NULL
This function returns a null string and you can use it to determine whether another value has a value assigned it. This function takes no arguments. You can also enter two single quotation marks ('') with no intervening data or space) can also be used to indicate a null string.
This function uses the following syntax:
NULL()
PARSE | PA
This function parses the specified string into words and returns the specified word from the source string. Words are numbered starting at 1 and delimited by white space.
Syntax: PARSE(value|variable, number)
where:
value|variable is any constant or variable that is the source string for the parsing operation.
If the value includes blanks spaces, you must enclose it with single quotation marks. You do not need to use quotation marks if the value is a variable name,
number is the relative number of the desired word.
Words within the string are numbered starting at 1. If the value for number exceeds that number of words in the string, the function returns a single blank.
POS
This function returns the position of string2 in string1. This function uses the following syntax:
POS(string1,string2)
This function returns 0 if string2 cannot be found in string1. The search always begins with the leftmost character of string1.
REXX | RX
This function creates a compound variable name that can then be used to obtain a value for inclusion in the equation. This function uses the following syntax:
REXX(string)
RIGHT
This function extracts len characters from string starting at the right end. This function uses the following syntax:
RIGHT(string,len)
STRIP | STP
This function removes a character from the string as indicated by the options.
If the option and char values are omitted, blanks are stripped from the lead and tail of the string. There are three formats to the function. All arguments must be specified for the chosen format; that is, you cannot skip an argument by using a double comma such as STRIP(&WORD1,,!)
. The char value must not be any of the operator or comparator symbols (+, -, =, and so on) or single or double quotation marks. If double quotation marks are necessary, use the X() function to specify the reserved character.
This function uses the following syntax:
STRIP(value,option,char)
STRIP(value,option)
STRIP(value)
The following options are valid:
B: remove leading and trailing char from the string
L: remove leading char from string
T: remove trailing char from string
A: remove char from anywhere it is found in the string
SUBSTR | SB
This function returns a portion of the string beginning at the start position for the specified length.
Commas are used to separate the arguments of the function. All arguments must be specified for the chosen format; that is, you cannot skip an argument by using a double comma (for example, SUBSTR(&WORD1,,5) is not valid). Be default, if the length value is omitted (second format shown), the function returns the rest of the string based on the start position value.
This function uses the following syntax:
SUBSTR(value,startPositionLength)
SUBSTR(value,startPosition)
SYMBOL | SYM
This function returns a value indicating the status of variable name as a valid variable that currently is allocated in the variable pool. This function uses the following syntax:
SYMBOL(variableName)
TIME
This function returns a character string that represents the current time-of-day formatted according to type. This function uses the following syntax:
TIME(type)
where type can be one of the following values:
N: normal; formatted as HH:MM:SS
NU: normal undelimited; formatted as HHMMSS
L: long form; formatted as HH:MM:SS.THM (to milliseconds)
LU: long form undelimited; formatted as HHMMSSTHM
X: extra long form; formatted as HH:MM:SS.THMIJU (to microsecond)
XU: extra long undelimited; formatted as HHMMSSTHMIJU
Example:
TIME(X)
returns 08:15:22.354208 (current time of day)
The type code is optional and, if omitted, the time-of-day is formatted with a type of N.
UC
This function returns character string string1 in all uppercase letters. This function uses the following syntax:
UC(string1)
VALUE
This function returns the contents of symbol after resolving it as a variable (similar to the REXX VALUE function). This function uses the following syntax:
VALUE(&symbol)
X
This function changes the specified string1 of hexadecimal characters into an internal hexadecimal value.
The value string1 must contain an even number of characters consisting only of numbers 0 through 9 and characters A through F.
This function uses the following syntax:
X(string1)
X2C
This function returns the character string string1 of hexadecimal characters as its EBCDIC equivalent character string.
An even number of characters must be supplied in string1. Note that not all hexadecimal string values will return printable characters.
This function uses the following syntax:
X2C(string1)
X2D
This function returns the character string string1 of hexadecimal characters as its decimal equivalent character string.
The maximum is 8 characters (4 hexadecimal bytes) and you must specify an even number of characters.
This function uses the following syntax:
X2D(string1)
X2B
This function returns the character string string1 of hexadecimal characters into its binary bit character string. This function uses the following syntax:
X2B(string1)
The maximum is 8 characters (4 hexadecimal bytes) and you must specify an even number of characters.
Selection criteria fields that support built-in functions
The following table shows the selection criteria fields for each event type that support the use of built-in Rules functions. Any of the Rules functions are supported.
Selection criteria fields that support built-in Rules functions
Event Type | Fields that support use of built-in Rules functions |
---|---|
ALRM | Context, Scope, Queue |
ALRT | Key, Queue |
CICS | Job Name, Acct Info, RACF User, RACF Group, CICS TDQ |
CMD | Job Name, Acct Info, RACF User, RACF Group |
DB2 | none |
EOM | Job Name |
EOS | Job Name, RACF User, RACF Group |
EXT | Job Name, Acct Info, RACF User, RACF Group |
IIZ | Job Name, Acct Info, RACF User, RACF Group, Class |
IMP | Job Name, Client, UserId, ROUTE list |
IMS | Job Name, Acct Info, RACF User, RACF Group |
JRNL | Origin |
MQS | Job Name, Queue Id |
MSG | Job Name, Acct Info, RACF User, RACF Group |
NVC | Job Name |
NVM | Job Name |
TIME | none |
TLM | Job Name, Acct Info, RACF User, RACF Group |
VAR | none |
Action specification fields that support built-in functions
The following table shows the action specification fields for each event type that support the use of built-in Rules functions. Any of the Rules functions are supported.
Action specification fields that support built-in Rules functions
Event Type | Fields that support use of built-in Rules functions |
---|---|
ALRM | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
ALRT | EXEC/Parms, Command, Reword Alert, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
BRC | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
CICS | EXEC/Parms, Command, Reword Message, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
CMD | EXEC/Parms, Command, Reword Message, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
DB2 | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Follow-up EXEC, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
EOM | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Follow-up EXEC, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
EOS | EXEC/Parms, Command, Reword Message, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
EXT | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
HWTO | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
IMP | EXEC/Parms, Command, Reword Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
IMS | EXEC/Parms, Command, Reword Message, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
JRNL | EXEC/Parms, Command, Reword Message, Issue WTO, Issue Journal Message Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
MQS | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
MSG | EXEC/Parms, Command, Reword Message, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
NVC | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
NVM | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
TIME | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
TLM | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
VAR | EXEC/Parms, Command, Issue WTO, Issue Journal Message, Alert Key, Alert Text, Alert PCMD, Alert Follow-up EXEC, Alert Final Action |
Comments
Log in or register to comment.