Binding DBRMs to create packages

You can bind database request modules (DBRMs) to create packages that use different isolation levels or default options.

About this task

Use the online bind sample, DSN1210.SDSNSAMP(DSNTIJCL), for guidance.

Before an application can access data sources using Db2 ODBC, you must bind all required IBM® DBRMs (which are shipped in DSN1210.SDSNDBRM) to all data sources. These data sources include the local Db2 for z/OS® subsystem and all remote (DRDA) data sources.

To call stored procedures that run under Db2 ODBC, bind each of these procedures into packages at the data sources that use them. You do not need to bind a stored procedure that runs under Db2 ODBC into the Db2 ODBC plan.

Procedure

To bind the required DBRMs:

  • Bind the following DBRMs to all data sources:
    • DSNCLINF
    • DSNCLICR

    You do not need to specify the ISOLATION bind option for DSNCLINF or DSNCLICR, because this option has no effect on the isolation level that the ODBC driver uses for the application. Instead, specify the isolation level in the ODBC initialization file with the keyword TXNISOLATION. The default value for this keyword is 2 for cursor stability (CS). Alternatively, you can use SQLSetConnectAttr() and SQLSetStmtAttr() to set the attribute SQL_ATTR_TXN_ISOLATION at the connection or statement level. This attribute overrides the keyword value.

  • Bind the following DBRMs with default options to all z/OS servers:
    • DSNCLIC1
    • DSNCLIC2
    • DSNCLIMS
    • DSNCLIF4
  • Bind DSNCLIVM with default options to Db2 server for VSE and VM servers.
  • Bind DSNCLIAS with default options to Db2 for i servers.
  • Bind DSNCLIV1 and DSNCLIV2 with default options to all Db2 for Linux®, UNIX, and Windows servers.
  • Bind DSNCLIQR to any site that supports DRDA query result sets.