2.5.3 Code File/Table Lookup Check Examples
These examples are provided to illustrate the use of the code/table file lookup rule facility:
Example 1
Field being checked:
Name
|
Type
|
Len
|
Dec
|
PRODNO
|
A
|
10
|
|
|
File details:
Name
|
Actual Keys
|
Keys Supplied
|
Comments
|
PRODMST
|
Product number
|
PRODNO
|
Check product is in product master
|
|
Example 2
Field being checked:
Name
|
Type
|
Len
|
Dec
|
TAXCDE
|
A
|
3
|
|
|
File details:
Name
|
Actual Keys
|
Keys Supplied
|
Comments
|
TAXTABL
|
Tax code type
|
INCOME
|
Check TAXCDE is a valid income tax code using alpha literal 'INCOME' in the key list.
|
|
Tax code
|
TAXCDE
|
|
|
Example 3
Field being checked:
Name
|
Type
|
Len
|
Dec
|
PARTNO
|
P
|
7
|
0
|
|
File details:
Name
|
Actual Keys
|
Keys Supplied
|
Comments
|
INVENT
|
Part number Warehouse number
|
PARTNO
|
Check PARTNO exists. This is a "partial" key validation check.
|
|
Example 4
Field being checked:
Name
|
Type
|
Len
|
Dec
|
INVNUM
|
A
|
8
|
|
|
File details:
Name
|
Actual Keys
|
Keys Supplied
|
Comments
|
INVNUM
|
Invoice number
|
INVNUM
|
Check INVNUM does not already exist. Reverse default error logic to get ERROR if key match is found, NEXT if key match is NOT found.
|
|
Ý 2.5 Code File/Table Lookup Checks