When you are defining the connection between CICS®
and Db2®, you can choose to have
CICS connect to a specific Db2 subsystem. You can specify the
name of this Db2 subsystem in
the DB2ID attribute of the DB2CONN definition. However, if you have multiple Db2 subsystems, you might want to
use the Db2 group attach
facility to make it possible for CICS to connect to any of
your subsystems, rather than just one named subsystem.
About this task
Group attach is a Db2
facility that allows CICS to connect to any one member of a
data-sharing group of Db2
subsystems, rather than to a specific Db2 subsystem. The group attach facility chooses any one member of the group that is active on the local z/OS® image for the connection to CICS (members that are active on other z/OS images are not eligible for selection).
Procedure
To use the group attach facility:
-
Activate the group attach facility using the DB2GROUPID attribute of the DB2CONN definition.
Specify the group attach name for the group of Db2 subsystems, instead of using
the DB2ID attribute to specify the ID of an individual Db2 subsystem.
You can also use a subgroup attach name to identify a subset of the group. Group attach means
that you can use a common DB2CONN definition, specifying a DB2GROUPID, across multiple cloned AORs,
and CICS connects to any active member of that data-sharing
group or subgroup. See
DB2CONN resources for information about how to
define and install a DB2CONN definition.
-
Specify the RESYNCMEMBER attribute of the DB2CONN definition to resolve any indoubt units of
work if the connection between CICS and Db2 is broken.
If the connection is broken, CICS might not reconnect
to the same
Db2 subsystem - it
might choose a different member of the data-sharing group of
Db2 subsystems. This means that if
indoubt UOWs are being held by the first
Db2 subsystem to which CICS connected, they cannot be resolved. See
Resolving indoubt units of work (UOWs) for information about the RESYNCMEMBER attribute and how to set
it.
- After the connection has been established, use the INQUIRE DB2CONN DB2ID() command to find out which member
of the data-sharing group has been chosen for the current connection.
-
If you want CICS to connect to a specific Db2 subsystem, you can override the
group attach.
For example, if you want CICS to connect to the
Db2 subsystem with an ID of “xyz”,
you can specify the DB2ID using:
- A SET DB2CONN DB2ID(xyz) command
- A DSNC STRT xyz command (see DSNC STRT)
Each of the previous methods overrides group attach by setting a DB2ID in the installed
DB2CONN definition.
Results
Specifying a DB2ID in the previous steps causes the DB2GROUPID attribute of the installed DB2CONN
definition to be blanked out. If you want to revert to using group attach, set the DB2GROUPID
attribute again using a SET DB2CONN DB2GROUPID() command. However, specifying a
DB2ID on the INITPARM=(DFHD2INI=db2id) system initialization parameter
does not override group attach. If a DB2GROUPID is set in the DB2CONN definition, the
INITPARM setting is ignored. See INITPARM system initialization parameter for more
information about this parameter.