Compatibility features for migration
The Db2® database manager provides features that facilitate the migration of embedded SQL C applications from other database systems.
You can enable these compatibility features by setting the precompiler
option COMPATIBILITY_MODE to ORA. For example, the following command
enables the compatibility features when you compile the file named tbsel.sqc:
$ db2 PRECOMPILE tbsel.sqc BINDFILE COMPATIBILITY_MODE ORA
The
following features are supported when the COMPATIBILITY_MODE
ORA precompile option is specified:
- Ability to specify the RELEASE option with EXEC SQL ROLLBACK and EXEC SQL COMMIT statements.
- Enhanced CONNECT statement syntax.
- Simple type definition for the VARCHAR type.
- Suppression of unspecified indicator variable error when the required NULL indicator is not specified and the UNSAFENULL YES option of the PRECOMPILE command is not set.
- Use of anonymous block to call a stored procedure.
- Use of C and C++ host variable arrays for FETCH INTO, INSERT, UPDATE, and DELETE statements that are non-dynamic.
- Use of double quotation marks to specify file names with the INCLUDE statement.
- Use of INDICATOR variable arrays for FETCH INTO, INSERT, UPDATE, and DELETE statements that are non-dynamic.
- Use of structure type, structure arrays, and structure indicator arrays.
- Use of the STATICASDYNAMIC string for the GENERIC parameter of the BIND command to provide true dynamic SQL behavior for the package that is bound in a session.
- Use of a string literal with the PREPARE statement.
- Use of three-part name to call a stored procedure.
- Use of WHENEVER condition DO action statement.