VisualAge Generator to Enterprise Generation Language Migration Guide

SQL I/O and missing required SQL clauses

VisualAge Generator: VisualAge Generator 4.5 stored all the SQL clauses if you modified any SQL clause. However, some earlier versions of Cross System Product and VisualAge Generator only stored the clause that you modified. If a function from an earlier version was never modified in VisualAge Generator 4.5, then some of the required SQL clauses might be missing.

EGL: If any SQL clause is modified, all SQL clauses for the SQL statement must be specified.

Associated part needed for migration: The SQL record and the record specified as the alternate specification record, if any.

Figure 37. SQL I/O and missing SQL clauses

Migrating with the associated part
Migrating without the associated part

If the SQL record and its alternate specification record are available, and if any SQL clause is present, but some clauses are missing, the migration tool creates the missing clauses as shown in the next rows of this table. Based on the first migration of this function, the migration tool uses the SQL record and its alternate specification record, if any, to create the missing clauses.

If the SQL record and its alternate specification record are not available, and if any SQL clause is present, but some clauses are missing, the migration tool creates the missing clauses as shown in the next rows of this table. Based on the first migration of this function, the migration tool creates intentionally invalid EGL syntax if the SQL record or its alternate specification record is not available.

Missing SELECT clause: The migration tool creates a select clause by listing all the SQL column names from the record in the same order that the items appear in the record.

Missing SELECT clause: The migration tool sets the SQL column names for the select clause to EZE_UNKNOWN_SQL_SELECT and issues an error message.

Missing INTO clause: The migration tool creates the into clause by listing all the item names from the record in the same order that the items appear in the record.

Missing INTO clause: The migration tool sets the item names for the into clause to EZE_UNKNOWN_SQL_INTO and issues an error message.

Missing INSERTCOLNAME clause: The migration tool creates the list of column names to be inserted for a VAGen ADD function by listing the SQL column names from the record in the same order that the items appear in the record. The migration tool omits the SQL column name for any item that is identified as read only.

Missing INSERTCOLNAME clause: The migration tool sets the SQL column names for the list to EZE_UNKNOWN_SQL_INSERTCOLNAME and issues a error message.

Missing VALUES clause: The migration tool creates the values clause for a VAGen ADD function by listing the item names from the record in the same order that the items appear in the record. The migration tool omits the item name for any item that is identified as read only.

Missing VALUES clause: The migration tool sets the item names for the values clause to EZE_UNKNOWN_SQL_VALUES and issues an error message.

Missing FORUPDATEOF clause: The migration tool creates the for update of clause by listing the SQL column names from the record in the same order that the items appear in the record. The migration tool omits the SQL column name for any item that is included in the EGL keyItems property or any item that is identified as read only.

Missing FORUPDATEOF clause: The migration tool sets the SQL column names for the for update of clause to EZE_UNKNOWN_SQL_FORUPDATEOF and issues an error message.

Missing WHERE clause: The WHERE clause is not required. The migration tool never creates a where clause.

Missing WHERE clause: The migration tool does the same thing as mentioned in the Migrating with the associated part column.

Missing ORDERBY clause: The ORDERBY clause is not required. The migration tool never creates an order by clause.

Missing ORDERBY clause: The migration tool does the same thing as mentioned in the Migrating with the associated part column.

Potential Problem: A problem only arises if there are two records with the same name (generally in different subsystems) that have different item names or SQL column names.

Possible Solution: Make a copy of the function for use in the second subsystem and modify the new function to use the correct item names and SQL column names. Disadvantage: This has the potential to ripple back into functions that use this I/O function.

Potential Problem 1: A problem arises for any modified SQL statement or any SQL statement that uses Execution Time Statement Build.

Solution 1A: Review the list of error messages for any messages related to missing SQL clauses. Modify the SQL I/O function to include the missing clauses. The information you need to build the missing clause is in the corresponding row in the Migrating with the associated part column.

Solution 1B: Edit the function in VisualAge Generator and use the SQL Editor to make a trivial change such as adding a blank at the end of a line. Save the SQL clauses and then migrate the function again. Be sure to include the record definition so that the migration tool can include the SQL table information in the EGL I/O statement.

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


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