[
|../../index.htm#lansa/ugub_20011.htm]
You are here:
This display results when:
|
|---|
Rule |
Level |
Order To Process |
|---|---|---|
RULE01 |
Dictionary |
100 |
RULE02 |
Dictionary |
200 |
RULE03 |
File |
20 |
RULE04 |
Dictionary |
50 |
RULE05 |
File |
10 |
ADD |
When information is added (inserted) to the database. |
ADDUSE |
When information is added, and the field is actually specified/used in the INSERT command being executed. |
CHG |
When information is changed (updated) in the database. |
CHGUSE |
When information is changed, and the field is actually specified/used in the UPDATE command being executed. |
DLT |
When information is deleted (removed) from the database. |
Note that 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'.
Note also that field names must be preceded by a # (hash) symbol when used in expressions. This allows LANSA to differentiate between fields and alphanumeric literals. For instance the expression CNTRY = AUST does not indicate which of the components is the field and which is the alphanumeric literal. The correct format is #CNTRY = AUST or #CNTRY = 'AUST'.
Valid expression operators are:
Operator |
Description |
|---|---|
( |
Open bracket |
) |
Close bracket |
+ |
Add |
- |
Subtract |
/ |
Divide |
* |
Multiply |
= |
Compare equal |
^= |
Compare not equal |
< |
Compare less than |
<= |
Compare less than or equal to |
> |
Compare greater than |
>= |
Compare greater than or equal to |
*EQ |
Compare equal |
*NE |
Compare not equal |
*LT |
Compare less than |
*LE |
Compare less than or equal to |
*GT |
Compare greater than |
*GE |
Compare greater than or equal to |
AND |
And |
OR |
Or |
*AND |
And |
*OR |
Or |
|
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. The syntax of the expression is checked. It must also be remembered that when evaluating numeric variables the leading variable will be used to determine the decimal precision. Error messages are issued that indicate any problems found when attempting to evaluate the expression.
If the Condition Above Is Found to Be True
Mandatory. Prefilled to NEXT. Specifies what is to happen if the expression is found to be "true" after evaluation. Allowable values are:
NEXT |
Field is "okay". Proceed to next rule for this field. |
ERROR |
Field is in error. Issue error message described below. |
ACCEPT |
Field is okay. Bypass all other rules for this field. |
Else the Condition Above Is Found to Be False
Mandatory. Prefilled to ERROR. Specifies what is to happen if the expression is found to be "false" after evaluation. Allowable values are:
NEXT |
Field is "okay". Proceed to next rule for this field. |
ERROR |
Field is in error. Issue error message described below. |
ACCEPT |
Field is okay. Bypass all other rules for this field. |
Error Message Number, File and Library:
Optional. Specify either error message number, file and library or error message text (described below), but not both. Error message files and error message numbers are a native part of the IBM i operating system. Refer to the IBM supplied Control Language Reference Manual for details. CL commands involving message files include CRTMSGF and ADDMSGD.
If you are working on an IBM i, you can directly edit the message details from this screen panel. Enter as much of the message details as is known and use the function key labeled "Work Msgd" (Work Message Description). This will cause a WRKMSGD command to be executed, using as much of the supplied message details as is possible. This operating system facility will allow you to create or edit the message details. Upon completion of the WRKMSGD command, this screen panel will be redisplayed, unchanged, to allow you to proceed.
Do not store user defined messages in, or modify "shipped" messages in, the LANSA message file DC@M01 via this or any other message file editing facility. It is regularly replaced by new version or PC (program change) installations.
Text
Optional. If you do not wish to use an error message file (described above) to store the message text, then you may enter the text of the error message to be displayed directly. If this facility is used then the message will have no second level text associated with it. Refer to the section on Messages and the Help Key.
If neither an error message number, file and library nor error message text is specified LANSA will insert a default error message number, file and library as the error message. These default messages are "general purpose" and do not provide much detail about the specific cause of the error.
[
|../../index.htm#lansa/ugub_20011.htm]