VisualAge Generator to Enterprise Generation Language Migration Guide

FIND statement

VisualAge Generator: The search column in the FIND statement is optional. The default is the first column of the table.

EGL: The FIND statement is replaced by an if statement. The search column is required.

Associated part needed for migration: The table.

Figure 43. FIND statement

Migrating with the associated part
Migrating without the associated part
Based on the first migration of this function, if the search column is not explicitly specified and the table is available, the migration tool expands the table to get the name of search column from the first column of the table. If the search 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
    
  • Issues an error message that the function will need to be modified with the proper column name.

Potential Problem: A problem only arises if two tables, probably in different subsystems, have the same table name, but different search 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. This technique enables you to share the common function without changing any code in the second subsystem.

Potential Problem 1: The search column name must be provided. There will be an error on the Tasks list.

Solution: Edit the function and specify the correct column name 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 ]