NET/MASTER Network Control Language (NCL) Reference Manual
BOOLEXPR
Built-in Functions
4–24 106126 Tandem Computers Incorporated
In the following example, the expression is evaluated to determine if any of 5, 6, or 4
match any of the values of &num2, &num3, or &num1. The result is true, so NCL
returns a value of 1:
&num1 = 5
&num2 = 6
&num3 = 4
&result = BOOLEXPR( "ANY '5', '6', '4' =",
"ANY &num2, &num3, &num1" )
In the following example, the expression is evaluated to determine if all of 5, 6, and 4
match all of the values of &num2, &num3, and &num1. The lists are processed in
order from left to right and the result is false, so NCL returns a value of 0 (zero):
&num1 = 5
&num2 = 6
&num3 = 4
&result = BOOLEXPR( "ALL '5', '6', '4' =",
"ALL &num2, &num3, &num1" )
In the following example, the expression is evaluated to determine if any of 5, 6, or 4
match any of the values of &num2, &num3, or 5. However, there are constants on
both sides of the expression. The expression is invalid, so NCL returns a value of
INVALID:
&num1 = 5
&num2 = 6
&num3 = 4
&result = BOOLEXPR( "ANY '5', '6', '4' =",
"ANY &num2, &num3, 5" )
In the following example, the tilde (~) is used as the variable designator. The
expression is evaluated to determine if &SYS.RETCODE is equal to 0 (zero) and &a.b.c
is nonnull. The result is true, so NCL returns a value of 1:
&num1 = 5
&num2 = 6
&SYS.RETCODE = (-&num1 + &num2)
&a.b.c = "123"
&result = BOOLEXPR( "~SYS.RETCODE = 1 AND",
"NOT (~A.B.C == '')", "~" )
In the following example, the value of &a.b is evaluated to determine if it contains any
of the constants c, d, this, or a. The result is true, so NCL returns a value of 1:
&a.b = "this is a line"
&result = BOOLEXPR( "`A.B CONTAINS 'c','d',",
"'this','a'", "`" )