Conditional expressions

The conditional expression is enclosed in brackets immediately following the pattern operand.

If simple values or tables of values are not sufficient to qualify pattern matching, you can use conditional expressions. These expressions have the following format:


operand [conditional expression]

A simple conditional expression consists of an operand, a relational operator, and a second operand. The following are the relational operators:

Relational Operator Value
< Original token is less than
> Original token is greater than
= Abbreviation or original token is equal to
=A= Abbreviation is equal to
<= Original token is equal to
>= Original token is less than or equal to
!= Abbreviation or original token is not equal to
!=A= Abbreviation is not equal to
!=T= Original token is not equal to

The left operand can be any of the following elements:

  • A variable name
  • The field contents for the current operand
  • The contents for any dictionary field

The right operand can be any of the following elements:

  • A variable name
  • A literal
  • A constant

The complete format of a conditional expression is:


left-operand relational-operator right-operand

The following table explains the expression:

Operation Valid values
left-operand

{}
{} PICT
{} LEN
{field-name}
{field-name} PICT
{field-name} LEN
variable-name
variable-name PICT
variable-name LEN
<arithmetic-expression>
relational-operator

<
>
<=
>=
!=
=
right-operand

Literal
Constant
Variable name