There are some differences in the precompilers for different IBM relational database systems. The precompiler for DB2 Universal Database differs from the host or AS/400 server precompilers in the following ways:
The DB2 Connect program supports the DB2 database manager blocking bind options:
The DB2 Connect program uses the block size defined in the DB2 database manager configuration file for the RQRIOBLK field. Current versions of DB2 Connect support block sizes up to 32 767. If larger values are specified in the DB2 database manager configuration file, DB2 Connect uses a value of 32 767 but does not reset the DB2 database manager configuration file. Blocking is handled the same way using the same block size for dynamic and static SQL.
Note: | Most host or AS/400 server systems consider dynamic cursors ambiguous, but DB2 Universal Database systems consider some dynamic cursors unambiguous. To avoid confusion, you can specify BLOCKING ALL with DB2 Connect. |
Specify the block size in the DB2 database manager configuration file by using the CLP, the Control Center, or an API, as listed in the Administrative API Reference and Command Reference.
A package has the following attributes:
Each host or AS/400 server system has limitations on the use of these attributes:
Note: | DB2 Connect provides support for the SET CURRENT PACKAGESET command for DB2 Universal Database for OS/390 and DB2 Universal Database. |
The CNULREQD bind option overrides the handling of null-terminated strings that are specified using the LANGLEVEL option.
See Null-terminated Strings in C and C++ for a description of how null-terminated strings are handled when prepared with the LANGLEVEL option set to MIA or SAA1.
By default, CNULREQD is set to YES. This causes null-terminated strings to be interpreted according to MIA standards. If connecting to a DB2 Universal Database for OS/390 server it is strongly recommended to set CNULREQD to YES. You need to bind applications coded to SAA1 standards (with respect to null-terminated strings) with the CNULREQD option set to NO. Otherwise, null-terminated strings will be interpreted according to MIA standards, even if they are prepared using LANGLEVEL set to SAA1.
Standalone SQLCODE and SQLSTATE variables, as defined in ISO/ANS SQL92, are supported through the LANGLEVEL SQL92E precompile option. An SQL0020W warning will be issued at precompile time, indicating that LANGLEVEL is not supported. This warning applies only to the features listed under LANGLEVEL MIA in the Command Reference, which is a subset of LANGLEVEL SQL92E.