Configuring JMP and JBP regions for Db2 for z/OS data access
JMP and JBP applications can access Db2 for z/OS databases. Before your JMP and JBP applications can access Db2 for z/OS databases, you must configure the JMP and JBP region to use either the Db2 Resource Recovery Services attachment facility (RRSAF) or the external subsystem attach facility (ESAF) to attach Db2 for z/OS to IMS.
This topic describes how to set up a JMP or JBP region to access Db2 for z/OS databases. It does not describe how to set up Db2 for z/OS for access from IMS. For information about setting up Db2 for z/OS for Java™ application access, see DB2® for z/OS Application Programming Guide and Reference for Java. You must create a Db2 for z/OS plan for each PSB (typically each Java application) that is used to access Db2 for z/OS.
For JMP or JBP applications to have Db2 for z/OS access, you must either attach Db2 for z/OS to IMS using the Db2 Resource Recovery Services attachment facility (RRSAF) or use the external subsystem attach facility (ESAF). The default for JMP or JBP regions is to use RRSAF.
Db2 for z/OS provides different JDBC drivers:
- JDBC/SQLJ driver for Db2 for z/OS with JDBC 2.0 support (called the Db2 for z/OS JDBC/SQLJ 2.0 driver), which allows access to Db2 for z/OS databases only when IMS is on the same z/OS image as Db2 for z/OS. This is a type 2 JDBC driver.
- JDBC/SQLJ driver for Db2 for z/OS with JDBC 1.2 support (called the Db2 for z/OS JDBC/SQLJ 1.2 driver), which allows access to Db2 for z/OS databases only when IMS is on the same z/OS image as Db2 for z/OS. This is a type 2 JDBC driver.
- Db2 for z/OS Universal JDBC driver, which allows access to Db2 for z/OS databases from IMS systems that are on different z/OS images from Db2 for z/OS when you use the IMS Universal drivers type 4 connectivity. You can also use the type 2 implementation of this driver for access to Db2 for z/OS databases when IMS is on the same z/OS image as Db2 for z/OS.
All these drivers are referred to in this topic as Db2 for z/OS JDBC drivers.
Identifying Db2 for z/OS JDBC drivers
For type 2 JDBC drivers, you must use the default
connection URL in the application program. For example, jdbc:db2os390:
or db2:default:connection
.
For type 4 JDBC drivers, you can use a specific connection URL in the application program.
With RRSAF, the dependent region builds an attachment thread to Db2 for z/OS using z/OS Resource Recovery Services (RRS). RRS coordinates the commits of the updates that the application program makes to both IMS and Db2 for z/OS resources. IMS is a participant, not the coordinator, of these updates and commits.