DataTable

An EGL DataTable is primarily composed of these components:
A DataTable of error messages, for example, might include these components:

You do not declare a DataTable as if you were declaring a record or data item. Instead, any code that can access a DataTable can treat that part as a variable. For details on part access, see References to parts.

Any code that can access a DataTable has the option of referencing the part name in a Use declaration.

Types of DataTables

Some types of DataTables are for runtime validation; specifically, to hold data for comparison against form input. (You relate the DataTable to the input field when you declare the form part.) Three types of validation DataTables are available:
matchValidTable
The user's input must match a value in the first DataTable column.
matchInvalidTable
The user's input must be different from any value in the first DataTable column.
rangeChkTable
The user's input must match a value that is between the values in the first and second column of at least one DataTable row. (The range is inclusive; the user's input is valid if it matches a value in the first or second column of any row.)
The other types of DataTables are as follows:
msgTable
Contains runtime messages.
basicTable
Contains other information that is used in the program logic; for example, a list of countries and related codes.

DataTable generation

The output of DataTable generation is a pair of files, each named for the DataTable. One file has the extension .java, the other has the extension .tab. The .tab file is not processed by the Java™ compiler, but is included in the root of the directory structure that contains the package. If the package is my.product.package, for example, the directory structure is my/product/package, and the .tab file is in the directory that contains the subdirectory my.

You do not need to generate DataTables if you are generating into a package to which you had previously generated the same DataTables.

To save generation time when you do not need to generate DataTables, assign NO to the build descriptor option genTables.

Properties of the DataTable

You can set the following properties:
  • An alias is incorporated into the names of generated output. If you do not specify an alias, the part name is used instead.
  • The shared property indicates whether multiple users can access the DataTable. The default is no.
  • The resident property indicates whether the DataTable remains in memory even when no program is using the DataTable. (The program goes into memory when first accessed.) The default is no. You can specify yes only if the shared specification is also yes.

Related concepts
References to parts

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.