Mapping Table Descriptors to Table Instances

A Program or other executable object instance can read data only when its source Table Descriptors are mapped to the Table instances that contain the source data, and can write data to Table instances only when target Table Descriptors are mapped to the Table instances.

In addition, both the executable instance and the Table instance must be installed in the database. Table Descriptors must be mapped to Table instances at both the Table and Column level.

Mapping Columns: When you map a Table Descriptor to a Table instance, the system may or may not be able to map Columns automatically. If not, you can map them manually; see Mapping Table Descriptors Manually.

However, if a Target Table Descriptor in a Load Set or Program is updated or new columns added, installation automatically upgrades the Table instance and completes the mapping. Note that the Table instance is upgraded only if the changes to the Table Descriptor are non-destructive, such as the addition of a column.

You can supply default values for any Columns that are still unmapped; see Mapping Columns to Constants. In some cases, you can map columns of different data types and lengths; see Mapping Columns of Different Data Types and Lengths).

For source Table Descriptors you do not need to map Table instance Columns that are not used by the Program.

Data Processing Compatibility: Be sure to map target Table Descriptors to Table instances whose data processing type is compatible with your source code:

  • If you have insert, update, and delete statements in your source code, you must map your target Table Descriptors to Table instances with a data processing type of either Transactional or Staging.
  • If you have insert statements only, you must map your target Table Descriptors to Table instances with a data processing type of either Reload or Staging.

This section includes the following topics: