Based on the first migration of this function, if the record is
available, the migration tool does the following:
- If the record is non-SQL, the migration tool changes DUP to
duplicate and UNQ to unique.
- If the record is SQL, the migration tool changes both DUP and UNQ to
unique.
| If the record is not available, the migration tool tries to determine the
type of the record as follows:
|
Potential Problem: A problem only arises if the same
record name has different definitions, one for SQL and one for non-SQL, most
likely in different subsystems. If the non-SQL record is available when
the function is migrated, then there will be an error if the function is used
with an SQL record and checks for duplicate. If the SQL record is
available when the function is migrated, then the additional information
conveyed by the duplicate check will not be available for the non-SQL
record.
Possible Solution: Copy the function and use the original
function for SQL and the new function for non-SQL. Disadvantage:
This has the potential to ripple back into functions that use the original
function that checked for UNQ or DUP.
Potential Problem for SQL: None. DUP and UNQ were
always set the same way and unique continues to be a hard
error.
Potential Problem 1 for non-SQL: A problem arises if you
do not set handleHardIOErrors (EZEFEC) = 1 for the program.
In this case, because unique is now a hard error, the onException
statement will not get control and the program will end.
Solution: Make sure your programs specify
handleHardIOErrors = 1;
Potential Problem 2 for nonSQL: A problem also arises if
you are explicitly testing for hardIOError (HRD). In this case, because
unique is now a hard error, hardIOError will test true in WSED in
some cases, even though it did not test true in the past on VisualAge
Generator. Validation and preprocessing will not detect an
error. However, the program might not run the same as it did in
VisualAge Generator.
Possible Solution: You might need to reorder the testing
of the I/O error values in your program logic.
|
Potential Problem 1: EZE_DUPLICATE is not valid in
EGL.
Solution: Edit the function and change EZE_DUPLICATE to
duplicate or unique based on the record type.
Other Potential Problems: The same potential problems and
solutions as shown for Migrating with the associated part
apply.
|