[
|../../index.htm#lansa/ugub_20012.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. |
Name |
Description |
|---|---|
Return code |
Alphanumeric length 1. Returned by the program as '1' (good return) or '0' (bad return). Used by the program to indicate to LANSA the success or failure of the complex logic rule. |
Name of field |
Alphanumeric length 10. Passed to the program. Contains the name (as opposed to the value) of the field that is passed in the third parameter. |
Value of field |
Length and type depend upon the data dictionary definition of the field. Alphanumeric fields are passed with same type and length as their data dictionary definition. All numeric fields (type P or S) are passed as packed (type P) and the same length and number of decimal positions as their data dictionary definition. Note that the value of the field is passed in a work area, thus it is not possible to change the value of the field by changing the value of the parameter in the validation program. |
The type and length of the parameter(s) passed depends upon the type and length of the parameter value supplied.
For alphanumeric fields (alpha literals, alpha fields, alpha system variables or alpha process parameters) the parameter is passed as alpha (256) with the parameter value left aligned into the 256 byte parameter.
For numeric fields (numeric literals, numeric fields, numeric system variables or numeric process parameters) the parameter is passed as packed 15 with the same number of decimal positions as the parameter value. For numeric literals this means the same number of decimal positions as specified in the literal (e.g.: 1.12 will be passed as packed 15,2. 7.12345 will be passed as packed 15,5. 143 will be passed as packed 15,0. etc). For all other types of numeric parameters this means the same number of decimal positions as their respective definitions.
As with the standard parameters, the actual value is passed in a work area so it is not possible to change the value of a field by changing the parameter value in the validation program.
Note 1: Additional parameters may only be used when a 3GL program is called, and cannot be used when a validation function is called.
Note 2: LANSA does not check that the 3GL program being called has the correct parameter list. This is a user responsibility.
If the Program Gives a Good Return Code
Mandatory. Prefilled to NEXT. Specifies what is to happen if the return code parameter is returned as '1' (a "good" return). 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 Program Gives a Bad Return Code
Mandatory. Prefilled to ERROR. Specifies what is to happen if the return code parameter is returned as something other than '1' (a "bad" return). 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 (see following), 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 facility 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 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_20012.htm]