VisualAge Generator to Enterprise Generation Language Migration Guide

RETR statement

VisualAge Generator: The search and return columns for the RETR statement are optional. The search column defaults to the first column of the table. The return column defaults to the second.

EGL: The RETR statement is replaced by an if statement. The search and return columns are required.

Associated part needed for migration: The table.

Figure 44. RETR statement

Migrating with the associated part
Migrating without the associated part
Based on the first migration of this function, if the search or return column is not explicitly specified and the table is available, the migration tool expands the table to get the following:
  • The name of search column from the first column of the table.
  • The name of the return column from the second column of the table.
If the search column or return column is not explicitly specified and the table is not available, the migration tool does the following:
  • Sets the search column to
    EZE_UNKNOWN_SEARCH_COLUMN 
    
  • Sets the return column to
    EZE_UNKNOWN_RETURN_COLUMN
    
  • Issues an error message that the function will need to be modified with the proper column names.

Potential Problem: A problem only arises if two tables, probably in different subsystems, have the same table name, but different search and/or return column names.

Solution: For the second subsystem, add a data item as a substructure for the first column in the table. The name of this new data item should be the same as the search column in the first subsystem. Substructure the second column of the table with the name of the return column in the first subsystem. This technique enables you to share the common function without changing any code in the second subsystem.

Potential Problem 1: The search and return column names must be provided. There will be an error on the Tasks list for each missing column.

Solution: Edit the function and specify the correct column names for the table.

Potential Problem 2: The same potential problem and solution as shown for Migrating with the associated part apply.


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