VisualAge Generator to Enterprise Generation Language Migration Guide

Alternate specification records

VisualAge Generator: A record can specify another record as the alternate specification (altspec) record. For example, if RecordA specifies an altspec of RecordB, then RecordB provides the structure for RecordA. For SQL records, RecordB also provides the list of tables and keys for RecordA. If RecordA specifies a key item, that item is merged with the keys from RecordB when determining the default selection condition.

EGL: A record can embed another record to obtain the record structure. Only the record structure is included. Each SQL record must explicitly state its entire set of tables and keys.

Associated part needed for migration: If RecordA is an SQL record, you need the record specified as the altspec record (RecordB).

Figure 15. Alternate specification records

Migrating with the associated part
Migrating without the associated part

If RecordA is an SQL record that specifies an alternate specification of RecordB and RecordB is available, the migration tool does the following for RecordA:

  • Creates the list of table names from the list of tables specified in RecordB.
  • Creates the list of keys by merging the following:
    • The items, if any, in RecordB that specified key=yes.
    • The item, if any, in RecordA that is specified as the key item.

    The order of the keys is the order in which the items appear in the structure of RecordB.

  • Includes the embed statement pointing to RecordB.
  • Migrates any !itemColumnName variables in the default selection conditions of RecordA to the corresponding SQL column names from RecordB.

If RecordA is an SQL record that specifies an alternate specification of RecordB, and RecordB is not available, the migration tool does the following for RecordA:

  • Sets the tableNames property to ###TABLES_NOT_FOUND###
  • Sets the keyItems property to ###KEYS_NOT_FOUND###, followed by the item, if any, that is specified as the key item in RecordA.
  • Includes the embed statement pointing to RecordB.
  • Migrates any !itemColumnName variables in the default selection conditions of RecordA to !itemColumnName without any substitution.
  • Issues error messages that the tables and keys could not be determined.
  • Issues an error message if there are any !itemColumnName variables.

Potential Problem: A problem only arises for SQL if the definition for RecordB differs, generally in different subsystems. There is no problem for non-SQL records.

Solution: Duplicate the definition of RecordA so that each subsystem has its own definition of RecordA. Alternatively, specify containerContextDependent=yes for RecordA.

Problem: EGL validation for RecordA results in messages on the Tasks list.

Solution: Edit RecordA and include the appropriate table and key information based on RecordB. Also replace any !itemColumnName variables in the default selection condition with the corresponding SQL column name from RecordB.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]