Start of change

OVRDBF does not apply to CREATE TABLE AS (select)

In IBM® i 7.3 with SI60199, the CREATE TABLE statement with an AS clause is changed such that it is no longer affected by the Override with Data Base File (OVRDBF) command.

Data Definition Language (DDL) statement documentation correctly describes this behavior, but the CREATE TABLE statement was mistakenly honoring the override.

Any CREATE TABLE AS statements that depend on an override need to be redesigned in order to reference the intended tables. Using an SQL Alias is an alternative technique for implementing redirection.

Previous Behavior:

OVRDBF FILE(MYTABLE) TOFILE(LIB2/YOURTABLE)
CREATE TABLE TEST1 AS (SELECT * FROM MYTABLE) WITH DATA;
TEST1 incorrectly referenced LIB2/YOURTABLE.

Alternative Solution:

CREATE OR REPLACE ALIAS MYTABLE FOR LIB2/YOURTABLE;
CREATE TABLE TEST1 AS (SELECT * FROM MYTABLE) WITH DATA;
With the Alias established, TEST1 uses LIB2/YOURTABLE.
End of change