Restriction: This topic applies to Windows environments only.
As your application progresses from being a mainframe DB2 application to being a SQL Server application with no residual dependencies
on mainframe characteristics, the combination of DIALECT settings and statement prefixes required when compiling and binding
change, depending on the stage of the progression, to ensure optimal DB2 to SQL Server 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 HCOSS does not recognize as a valid DB2 statement, but that is otherwise compatible with SQL Server. Only statements
that compile without DB2 compatibility warnings are qualified by the QUALIFIER compiler directive or BIND parameter.
- Stage 2 - Some statements are SQL Server specific; most are mainframe compatible
- Recommended settings:
DIALECT Setting
|
Statement Prefix
|
MAINFRAME
|
[NODIALECT] on statements you want to flag as SQL Server compatible
|
The [NODIALECT] prefix suppresses the DB2 compatibility warning on statements that are only compatible with SQL Server. Since.
due to the DIALECT=MAINFRAME setting, these statements are not qualified by the QUALIFIER compiler directive option or the
BIND QUALIFIER parameter, ensure that the statements are either explicitly qualified in the source code or that the default
schema for the connection points SQL Server to the correct schema.
- Stage 3 - Most statements are SQL Server compatible
- Recommended settings:
DIALECT Setting
|
Statement Prefix
|
MIXED
|
[MAINFRAME] on statements that fail with SQL(CHECK) and that are not ready for conversion to SQL Server
|
You may remove [NODIALECT] prefixes at this stage if you want, but it is not required.
- Stage 4 - First class SQL Server 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. However, you can specify the [NOPLAN] prefix on statements of your choice.