2.7.1 Condition to Check
Mandatory.
Specify an expression that can be evaluated and produces a "true" or "false" result.
The expression must be syntactically correct. Expression evaluation is left to right within brackets, so use brackets whenever in doubt as to the order in which the expression will be evaluated. Expression components are checked for type and length compatibility. Error messages are issued that indicate any problems found when attempting to evaluate the expression.
Rules
Components of the expression can be:
-
An alphanumeric literal such as 'NSW', NSW, 'Balmain' or BALMAIN
-
A numeric literal such as 1, 14.23, -1.141217.
-
Another column name such as #CUSTNO, #INVNUM, etc.
-
A system variable name such as *BLANKS, *ZERO, *DATE or any other system variable defined at your installation.
-
A process parameter such as *UP01, *UP02, etc.
-
Alphanumeric literals do NOT have to be in quotes when used in an expression. Quotes are only required when the alphanumeric literal contains lowercase characters. If no quotes are used the alpha literal is converted to uppercase. Thus BALMAIN = balmain = Balmain = balMAIN. However, Balmain does not equal 'Balmain'.
-
Column names must be preceded by a # (hash) symbol when used in expressions. This allows LANSA to differentiate between columns and alphanumeric literals. For instance the expression CNTRY = AUST does not indicate which of the components is the column and which is the alphanumeric literal. The correct format is #CNTRY = AUST or #CNTRY = 'AUST'.