Application Progression from DB2 to PostgreSQL

As your application progresses from being a mainframe DB2 application to being a PostgreSQL application with no residual dependencies on mainframe characteristics, the combination of DIALECT settings and statement prefixes required when compiling changes, depending on the stage of the progression, to ensure optimal DB2 to PostgreSQL conversion results. The following scenario suggests each stage of application progression along with the combination of DIALECT and statement prefix settings recommended for each stage:
Stage 1 - All statements are DB2 compatible
Recommended settings:
DIALECT Setting Statement Prefix
MAINFRAME None
The preprocessor attempts to process all statements as DB2 statements and issues a DB2 compatibility warning on each statement that HCOPG does not recognize as a valid DB2 statement, but that is otherwise compatible with PostgreSQL. Only statements that compile without DB2 compatibility warnings are qualified by the QUALIFIER compiler directive.
Stage 2 - Some statements are PostgreSQL specific; most are mainframe compatible
Recommended settings:
DIALECT Setting Statement Prefix
MAINFRAME [NODIALECT] on statements you want to flag as PostgreSQL compatible

The [NODIALECT] prefix suppresses the DB2 compatibility warning on statements that are only compatible with PostgreSQL. Since. due to the DIALECT=MAINFRAME setting, these statements are not qualified by the QUALIFIER compiler directive option, ensure that the statements are either explicitly qualified in the source code or that the default schema for the connection points PostgreSQL to the correct schema.

Stage 3 - Most statements are PostgreSQL compatible
Recommended settings:
DIALECT Setting Statement Prefix
MIXED [MAINFRAME] on statements that fail with SQL(CHECK) and that are not ready for conversion to PostgreSQL

You may remove [NODIALECT] prefixes at this stage if you want, but it is not required.

Stage 4 - First class PostgreSQL Application
Recommended settings:
DIALECT Setting Statement Prefix
NONE None

Remove all [MAINFRAME] and [NODIALECT] statement prefixes specified for previous stages. These prefixes cause compilation errors when DIALECT is set to NONE.