MPE/iX Commands Reference Manual (32650-90877)
Appendix B 643
Expression Evaluator Functions
MOD modulo (4) 25 mod 2 1
NOT logical not not(2>1) FALSE
NUMERIC (
string
) check if a string
is all digits
numeric('12345')
numeric('$a234ef')
TRUE
FALSE
OCTAL(
integer
) convert to octal
string
octal(329) %511
ODD(integer) determine if
integer is odd
odd(233)
odd(-2)
TRUE
FALSE
OR logical or 5=5 or 2=3 TRUE
ORD(
string
) ordinal (8) ord('AbcD') 65
POS(
find
str,source
str
[,
n
])
find
nth
occurrence of
find str
in
source str
;
positive value
for
n
begins
search at left;
negative value
for
n
begins
search at right)
(12)
pos('ab','cgabd')
pos('.','file.grp.acct',2)
pos('.','file.grp.acct',-1)
3
9
9
PMATCH(
pattern,
str
[,
start
])
searches for
pattern
in a
given string
(
str
) starting
at
start
;
pattern
may
contain
wildcards;
default
start
is
1
PMATCH('f@','fread')
PMATCH('abc','abcd')
TRUE
FALSE
Table B-1. Expression Evaluator Functions
Symbol Function Example Result