Concatenation Operator
Operator |
Description |
Example |
Result |
& |
string concatenation |
"ab" & "c" |
"abc" |
Math Operators
Operator |
Description |
Example |
Result |
+ |
Addition |
2 + 3 |
5 |
- |
Subtraction |
3 - 2 |
1 |
* |
Multiplication |
2 * 3 |
6 |
/ |
Divide |
4 / 2 |
2 |
% |
Modulus |
3 % 2 |
1 |
Comparison Operators
Operator |
Description |
Example |
Result |
=, EQ |
Equal to |
2 = 2 |
true |
>, GT |
Greater than |
3 GT 2 |
true |
<, LT |
Less than |
2 < 3 |
true |
>= , GE |
Greater than or equal to |
3 GE 2 |
true |
<=, LE |
Less than or equal to |
2 <= 2 |
true |
<>, NE |
Not equal to |
1 NE 2 |
true |
~, LIKE |
Matches pattern containing wildcards |
123 ~ ### |
true |
Wildcards for the LIKE Operator
Wildcard Characters |
Matches in the comparison string |
? |
Any single character |
* |
Zero or more characters |
# |
Any single numeric digit |
[charlist] |
Any single character in charlist |
[!charlist] |
Any single character not in charlist |
charlist is a group of one or more characters enclosed in brackets ([]) and can be used to match any single character in a string. It may include any of the following characters:
• | Almost any character in the ANSI character set including digits |
• | The special characters opening bracket ([), question mark (?), number sign (#) and asterisk (*) can be used for matching only if enclosed in brackets. The closing bracket (]) can't be used within a charlist to match itself, but it can be used outside the group as an individual character. A hyphen (-) can be used at the beginning or end of charlist to match itself. In any other position it indicates a range of characters. |
• | A range of characters can be specified by placing a hyphen between lower and upper bounds. For example, [a-z], [A-Z] or [0-9]. Multiple ranges can be specified without any delimiter. For example [a-zA-Z0-9] matches any alphanumeric character. When a range of characters is specified they must appear in ascending sort order. [A-Z] is valid, but[Z-A] is not. |
TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.