Error handling for table space name mapping file
In addition to the standard script errors in 'create schema', and the new tablespace_name_mapping_file command-line argument, the mapping file errors are validated.
The following mapping file errors are validated:
- If the mapping file does not exist, the system returns this error:The tablespace name mapping file 'file_name' does not exist.If this output happens, the script stops.
- If the mapping file is not a readable text file or invalid, the
system returns this error:The tablespace name mapping file 'file_name' is invalid.If this output happens, the script stops.
- If a line in the mapping file is not formatted as required, the
system returns this error:The following line in the tablespace nameIf this output happens, the script continues.
mapping file 'file_name' is invalid and
will be ignored: the_line. - If a table name in a line in the mapping file does not exist or
is not a valid IBM® Product Master table,
the system ignores the line and return this error:Invalid table name: table_name.If this output happens, the script continues.
- If a table name or the whole line is duplicated, ignore the line
and report warning to user:Duplicated table name: table_name.If this output happens, the script continues.
The table_tablespace_name and index_tablespace_name are optional. If any of them are missing, create_schema.sh script uses the default table space names. No error message or warning is returned.
If the table space name mapping is completed successfully, the system returns this message:
The system has applied the tablespace name(s) for each table successfully.
If
any error reported, the system returns this message:The system failed to apply the tablespace name(s) for each tables
All
of these message strings are localized.