VisualAge Generator to Enterprise Generation Language Migration Guide

Pack data items with even length

VisualAge Generator: The length for pack data items is specified as the number of digits, up to a maximum of 18. Even lengths are recorded within the shared data item definitions and for nonshared data items within record definitions. However, in most editors, and in test and generation, the length that is used is the next higher odd length, with a maximum of 18. Only the SQL Record Editor displays the even length. For even length items used as host variables in SQL WHERE clauses or in SQL statements that specify Execution Time Statement Build, test and generation create a temporary variable with the even length.

EGL: In VisualAge Generator Compatibility mode, EGL test and generation provide the same support as in VisualAge Generator. For decimal items with even precision, test and generation increase the precision by one in all records and use a temporary variable with the even precision in SQL where clauses or prepare statements. If VisualAge Generator Compatibility mode is not specified, EGL uses the precision specified for the data item.

Associated part needed for migration: Not applicable.

Figure 9. Pack data items with even length

Migrating with the associated part
Migrating without the associated part

The migration tool migrates pack data items with even lengths as follows:

  • Uses the even or odd length specified in VisualAge Generator for shared data item definitions, regardless of whether the item is ever used in an SQL row record.
  • Uses the even or odd length specified in VisualAge Generator for nonshared items in all record definitions, because the item might be used as a host variable in an SQL where clause or prepare statement.
  • Uses an odd length (or 18 if the item is the maximum length) for nonshared items in tables, function parameters, function return values, and function local storage because the information to determine an even number of digits was not recorded in VisualAge Generator in these situations.

The migration tool does the same things as mentioned in the Migrating with the associated part column.

Potential Problem: A problem only arises if you eliminate the use of VisualAge Generator Compatibility mode. In this situation, overflow might occur due to having fewer significant digits than in VisualAge Generator Compatibility mode.

Potential Solution: Before eliminating VisualAge Generator Compatibility mode, do the following:

  • Review your SQL table and view definitions to determine if you have any SQL columns that require even precision. If so, assess the SQL performance impact of using host variable lengths that do not match the SQL column definition.
  • Review all decimal data item definitions and primitive data item definitions in EGL records for even length items. Assess whether overflow might occur for any of these items.

Potential Problem: The same potential problem and solution as listed in the Migrating with the associated part column apply.


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