2.6.3 Code Table Lookup Check Examples

These examples are provided to illustrate the use of the code table lookup rule facility:

Example 1

Column being checked:

Name Type Len Dec

PRODNO

A

10

 

 

Table details:

Name Actual Keys Keys Supplied Comments

PRODMST

Product number

PRODNO

Check product is in product master

 

Example 2

Column being checked:

Name Type Len Dec

TAXCDE

A

3

 

 

Table 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

Column being checked:

Name Type Len Dec

PARTNO

P

7

0

 

Table 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

Column being checked:

Name Type Len Dec

INVNUM

A

8

 

 

Table 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.