VisualAge Generator: For SQL I/O, test and generation expand a single I/O option into multiple SQL statements as needed based on the record definition and the use of Execution Time Statement Build. Test and generation always create the tables clause for the I/O statement from the SQL record definition.
EGL: SQL statements must be explicitly specified in the EGL program. If an SQL statement is modified, all SQL clauses except the into clause are required. Execution Time Statement Build is replaced by the prepare statement followed by an open, get, or execute statement.
Associated part needed for migration: The SQL record and
the record specified as the alternate specification record, if any.
Figure 36. Ambiguous situations for functions--SQL I/O
Migrating with the associated part
| Migrating without the associated part |
---|---|
Based on the first migration of this function, if the SQL record and its
alternate specification record are available, the migration tool creates the
corresponding EGL statement(s) based on the record definition, the SQL
statement within the function, and the use of Execution Time Statement
Build. If the SQL statement in the function was modified, the migration
tool does the following:
| If the SQL record and its alternate specification record are not
available, the migration tool only has the SQL statement modifications and
Execution Time Statement Build information to use in creating the EGL SQL
statements. Because the migration tool does not have a record
definition available, the migration tool does the following:
|
Potential Problem 1: A problem only arises if there are two records with the same name that have different SQL table names or table labels. This might occur in different subsystems or when generating using different tables for test and production. Possible Solution 1A: If the problem is due to changing the qualification for a table name between test and production, change to use unqualified table names and specify the qualification information at BIND time. Possible Solution 1B: If the problem is due to different table names in different subsystems, make a copy of the record and rename it. Then make a copy of the I/O function to use the new record name. Correct the new I/O function to have the proper tables clause. Disadvantage: This has the potential to ripple back into functions that use this I/O function. Possible Solution 1C: If the problem is due to different table names in different subsystems, change the record to use the tableNameVariables property and modify all functions that do I/O for this record to set the table name variable before invoking the I/O function -- possibly in each program's main function. Alternatively, make the change to table name host variables in VisualAge Generator and migrate the program, record and function again. Disadvantage: There are potential performance implications because this changes from static to dynamic SQL. Potential Problem 2: A problem arises if any SQL table name or column name is one of the SQL reserved words that requires special treatment. The migration tool does not enclose these SQL reserved words in double-quotes. There will be an error on the Tasks list. Solution 2A: Edit the function and enclose the SQL table
name or column name in double quotes. See SQL reserved words requiring special treatment for the list of SQL reserved words and an example of the
required syntax.
|
Potential Problem 1: A problem arises for any modified SQL statement or any SQL statement that uses Execution Time Statement Build. Depending on whether the record is missing and which specific SQL clauses are missing from the SQL statement, there might be errors on the Tasks list. Solution: Review the migration log for any messages related to missing SQL clauses or table names. Alternatively, search the workspace for any occurrences of EZE_UNKNOWN. Determine the proper tables clause based on the record definition. See SQL I/O and missing required SQL clauses for information about recreating the SQL clause in EGL. See SQL I/O and !itemColumnName for information about correcting any !itemColumnName variables. Other potential problems: The same potential problems and
solutions as shown for Migrating with the associated part
apply.
|
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.