VisualAge Generator to Enterprise Generation Language Migration Guide

Redefined records

VisualAge Generator: The redefined record type provides a different data item layout for another record. The redefined record specifies the name of the record it is redefining. For example, RecordA is a REDEFINED record that redefines RecordB. VisualAge Generator determines whether RecordA is really a redefinition of RecordB based on the use of RecordA within the program. If RecordA is used as a called parameter, RecordA is not treated as a redefinition of RecordB.

EGL: RecordA is a basicRecord. Redefinition information is only provided within a program definition -- not in the definition of RecordA.

Associated part needed for migration:


Figure 13. Redefined records

Migrating with the associated part
Migrating without the associated part

When migrating a redefined record, the migration tool does the following:

  • Migrates the redefined record (RecordA) to a basicRecord.
  • Includes a VAGen Info comment in RecordA indicating it redefined RecordB.
  • Issues an informational message that RecordA redefines RecordB.

When migrating a redefined record, the migration tool does the same thing mentioned in the Migrating with the associated part column.

When migrating a program, if RecordA is available, the migration tool does the following:

  • If RecordA is treated as a redefinition of RecordB in VisualAge Generator, the migration tool includes the redefines property in the declaration for RecordA.
  • If RecordA is not treated as a redefinition of RecordB in VisualAge Generator, the migration tool does not include the redefines property in the declaration for RecordA.

When migrating a program, if RecordA is not available, the migration tool does not know that RecordA is a redefined record. The migration tool does not include the redefines property in the declaration for RecordA.

Considerations for new use: A problem only arises if you need to use RecordA and RecordB in a new program. You must remember to include the redefines property for RecordA whenever you want RecordA to be treated as a redefinition of RecordB.

Potential Problem 1: A problem arises if the VAGen program uses RecordA as a redefinition. Immediately after migration, the program will not be a valid EGL program because the definition for RecordA and the import statement will be missing. There will be an error on the Tasks list. If you migrate RecordA and add the import statement to the program, this will convert the program into a valid EGL program. However, there will be two data areas -- one for RecordA and one for RecordB. EGL will not detect this change during validation or preprocessing. The program will not run the same as in VisualAge Generator.

Solution: If you migrate additional records or add import statements to a program, review the record definitions for a VAGen Info comment. If there is a VAGen Info comment specifying that that RecordA is a redefinition for RecordB, update the program to include the redefines property for the declaration of RecordA.

Considerations: The same considerations for new use listed under the Migrating with the associated part column can also occur.


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