Previous Topic: Code Table ValuesNext Topic: Error-Handling Criteria


Enabling tables

Built-in Edit or Code Tables

If a record element includes an edit and/or code table in its definition, the table is referred to as a built-in edit or code table. The built-in edit or code table is available to any map data field that uses the record. The built-in table for a field is used for the field if both of the following conditions are met:

Suppressing Built-in Tables

To suppress use of a built-in table without using another table, the developer must disable automatic editing for the field.

The map developer overrides the use of a built-in table (if any) by specifying a stand-alone table for the field. Stand-alone tables are created in the data dictionary by the DDDL TABLE statement.

Specifying a Stand-alone Table

The developer uses the online or batch compiler to specify a stand-alone table:

The Edit table name and Code table name prompts on the Additional Edit Criteria screen can be used to specify the name of a table to be used for the field. For example, the state1 table is specified as an unlinked edit table of valid values in the following sample screen.

Additional Edit Criteria Page 3 of 7 Map name: EYHTST1 Version: 1 Element name EMP-STATE-0415 Subscript In record EMPLOYEE Version 100 Edit table name . . . STATE1 Version 1 Link with map (/) _ Edit type . . . . . 1 1.Valid values 2.Invalid values Code table name . . . ________ Version ____ Link with map (/) _ Error message (specify ID or text) ID. . . . . . . . . Prefix __ Number ______ Text. . . . . . . . ________________________________________ ________________________________________ DC365801 Map options processed successfully F1=Help F3=Exit F4=Prev F5=Next F6=Preview F7=Bkwd F8=Fwd

Suppressing a Stand-alone Table

To suppress use of a specified stand-alone table without specifying another table, the map developer can eliminate the name of the table from the Additional Edit Criteria screen by performing either of the following actions:

Specifying a Stand-alone Table using the Batch Compiler

The EDIT TABLE and CODE TABLE clauses of the batch compiler MFLD statement can be used to specify the name of the table to be used for the field. For example, the DEPTEDIT table is specified as an unlinked edit table of valid values in the following sample MFLD statement:

ADD MFLD DEPT-ID DFLD ID-0410 EDIT TABLE IS DEPTEDIT NOLINK USAGE IS VALIDATE.

Alternate Names

Type of table

Alternate name

Reason

Built-in

Tightly coupled

Because each table is part of the element for which it is defined

Stand-alone

Loosely coupled

Because they are separate from the record elements with which they are associated

Linked VS. Unlinked

When the map developer specifies a stand-alone table for use during automatic editing, the table must be designated either linked or unlinked as described:

If the table is

This happens

Linked

The table is included in the map load module with which it is associated.

Unlinked

The table is loaded at runtime by the map load module with which it is associated.

Enabling a table as an unlinked table eliminates the need to regenerate maps that use the table, should the table definition change. A stand-alone table is specified as linked or unlinked on the same screen or in the same batch MFLD statement that names the table for a field.

Note: For more information about the definition of built-in and stand-alone table, see the appendix “Generating Edit and Code Tables".