NET/MASTER Network Control Language (NCL) Reference Manual

VERIFY
Built-in Functions
4–104 106126 Tandem Computers Incorporated
Examples
In the following example, the string “123” is verified to determine whether it contains
one or more of the characters 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0. Neither
n
(nomatch) or
m
(match) is specified, so
n
is assumed. 0 (zero) is returned because there are no
characters in the given string that are not in the reference string:
SAY VERIFY(123,1234567890)
In the following example, the string “1234A567” is verified to determine whether it
contains one or more of the characters 1, A, or 7. The character 7 occurs at position 8,
so the value 8 is returned:
&A = 1234A567
&B = 1A7
&C = M
&D = 6
&RESULT = VERIFY(&A,&B,&C,&D)
In the previous example, the option
m
(match) and starting character position 6 are
used.
In the following example, the string “1234A56” is verified to determine whether it
contains one or more of the characters “aaa”. No character is found to satisfy the
condition, so 0 (zero) is returned:
SAY VERIFY(1234A56,aaa,m)
In the previous example, the option
m
(match) is used. No starting character position
is specified, so the verification starts at the first character of
string
.
In the following example, the string “1A6” is verified to determine if none of its
characters appear in the reference string “1234567890”. The character “A” appears in
character position 2 of the string to be verified; this character is not in the reference
string, so the value 2 is returned:
SAY VERIFY(1A6,1234567890)
In the previous example, neither
option
or
start
is specified, so NCL uses the
default option
n
and starting character position 1.