Sets attributes of the CICS® DB2® connection,
including the pool and command thread attributes.
In the CICS Explorer, the DB2 connections operations view provides
a functional equivalent to this command.
Syntax
Press the Clear key to clear the screen.
You can start this transaction in two ways:
- Type CEMT SET DB2CONN (or suitable abbreviations
for the keywords). The current status is displayed, similar to that
obtained by using the CEMT INQUIRE DB2CONN command.
You can tab to the highlighted or blank fields and overtype them with
the required values.
- Type CEMT SET DB2CONN (or suitable abbreviations
for the keywords), followed by one or more attribute settings that
you want to change.
Typing ? at the beginning of either the
first or second line gives a syntax prompt. Resetting the values takes
effect immediately.
CEMT SET DB2CONN
>>-CEMT SET DB2CONN--------------------------------------------->
.--------------------------. .-----------------------------.
V | V |
>----+----------------------+-+----+-------------------------+-+-><
+-+-UOW--+-------------+ +-+-DB2GROUPID(value)-+---+
| +-TASK-+ | | '-DB2ID(value)------' |
| +-TXID-+ | +-MSGQUEUE1(value)--------+
| '-NONE-' | +-MSGQUEUE2(value)--------+
+-+-AUTHID(value)-+----+ +-MSGQUEUE3(value)--------+
| '-+-GROUP--+----' | +-+-RELEASE---+-----------+
| +-SIGN---+ | | '-NORELEASE-' |
| +-TERM---+ | +-+-PLAN(value)---------+-+
| +-TX-----+ | | '-PLANEXITNAME(value)-' |
| +-OPID---+ | +-+-HIGH--+---------------+
| '-USERID-' | | +-EQUAL-+ |
+-+-COMAUTHID(value)-+-+ | '-LOW---' |
| '-+-CGROUP--+------' | +-PURGECYCLEM(value)------+
| +-CSIGN---+ | +-PURGECYCLES(value)------+
| +-CTERM---+ | +-+-RESYNC---+------------+
| +-CTX-----+ | | '-NORESYNC-' |
| +-COPID---+ | +-REUSELIMIT(value)-------+
| '-CUSERID-' | +-REBUILD-----------------+
+-COMTHREADLIM(value)--+ +-SIGNID(value)-----------+
+-+-ABEND---+----------+ +-+-NOCONNECT-+-----------+
| '-SQLCODE-' | | +-CONNECT---+ |
'-+-CONNECTED----+-----' | '-RECONNECT-' |
+-NOTCONNECTED-+ +-STATSQUEUE(value)-------+
'-FORCENOTCON--' +-TCBLIMIT(value)---------+
+-THREADLIMIT(value)------+
'-+-TWAIT---+-------------'
'-NOTWAIT-'
Options
- ACCOUNTREC
- Specifies the minimum amount of DB2 accounting
required for transactions requiring pool threads. The specified minimum
can be exceeded, as described in the following options.
- UOW
- The CICS DB2 attachment facility causes an accounting
record to be produced for each unit of work (UOW), assuming that the
thread has been released at the end of the UOW.
- TASK
- The CICS DB2 attachment facility causes a minimum of one
accounting record for each CICS task
to be produced.
A transaction containing multiple UOWs can use
a different thread for each of its UOWs (assuming that the thread
is released at sync point). The result can be an accounting record
produced for each UOW.
- TXID
- The CICS DB2 attachment facility causes an accounting
record to be produced when the transaction ID that is using the thread
changes.
Because pool threads are typically used by a number of
different transaction IDs, there is an increased chance that a transaction
containing multiple UOWs will use a different thread for each UOW
(assuming that the thread is released at sync point. In this case
an accounting record can be produced for each UOW.
- NONE
- No accounting records are required for transactions using pool
threads.
DB2 does, however,
produce at least one accounting record for each thread when the thread
is terminated. Additionally, authorization changes cause accounting
records to be produced.
- AUTHID
- Specifies what ID should be used for security checking for pool
threads. If AUTHID is specified, AUTHTYPE is cleared.
- AUTHTYPE
- Specifies the type of ID that can be used for pool threads. If
AUTHTYPE is specified AUTHID is cleared.
- GROUP
- Specifies the 8-character user ID and the connected group name
as the authorization ID. The following table shows how these two
values are interpreted by DB2.
IDs passed to DB2 |
How DB2 interprets
values |
CICS sign-on
user ID (USERID) |
Represents the primary DB2 authorization ID. |
RACF® connected
group name |
If the RACF list
of group options is not active, then DB2 uses
the connected group name supplied by the CICS attachment facility as the secondary DB2 authorization ID. If the RACF list of group options is active, DB2 ignores the connected group
name supplied by the CICS attachment
facility, but the value appears in the DB2 list
of secondary DB2 authorization
IDs. |
To use the GROUP option the CICS system
must have SEC=YES specified in the CICS system
initialization table (SIT).
If no RACF group ID is available for this user ID,
an 8-character field of blanks is passed to DB2 as the group ID.
- SIGN
- Specifies the SIGNID parameter of the DB2CONN should be used as
the resource authorization ID.
- TERM
- Specifies the terminal identification (four characters padded
to eight) as an authorization ID. An authorization ID cannot be obtained
in this manner if a terminal is not connected with the transaction.
If a transaction is started (using a CICS command) and has no terminal associated
with it, AUTHTYPE(TERM) should not be used.
- TX
- Specifies the transaction identification (four characters padded
to eight) as the authorization ID.
- OPID
- The operator identification associated with the user ID that is
associated with the CICS transaction
is used as the authorization ID (three characters padded to eight).
- USERID
- The 8-character user ID associated with the CICS transaction is used as the authorization
ID.
When the DB2 sample
sign-on exit DSN3@SGN is used with AUTHTYPE(USERID), the exit sends
the user ID to DB2 as the primary
authorization ID and the RACF group
ID to DB2 as the secondary ID.
When the sample sign-on exit is used, there is no difference between
AUTHTYPE(USERID) and AUTHTYPE(GROUP).
- COMAUTHID
- Specifies which ID should be used for security checking when using
command threads. If COMAUTHID is specified, COMAUTHTYPE is cleared.
- COMAUTHTYPE
- Specifies the type of ID that can be used for security checking
when using command threads. If COMAUTHTYPE is specified, COMAUTHID
is cleared.
- CGROUP
- Specifies the 8-character user ID and the connected group name
as the authorization ID. The following table shows how these two
values are interpreted by DB2.
IDs passed to DB2 |
How DB2 interprets
values |
CICS sign-on
user ID (USERID) |
Represents the primary DB2 authorization ID. |
RACF connected
group name |
If the RACF list
of group options is not active, then DB2 uses
the connected group name supplied by the CICS attachment facility as the secondary DB2 authorization ID. If the RACF list of group options is active, DB2 ignores the connected group
name supplied by the CICS attachment
facility, but the value appears in the DB2 list
of secondary DB2 authorization
IDs. |
To use the CGROUP option the CICS system must have SEC=YES specified in the CICS system initialization table
(SIT).
If no RACF group
ID is available for this user ID, an 8-character field of blanks is
passed to DB2 as the group ID.
- CSIGN
- Specifies the SIGNID parameter of the DB2CONN should be used as
the resource authorization ID.
- CTERM
- Specifies the terminal identification (four characters padded
to eight) as an authorization ID. An authorization ID cannot be obtained
in this manner if a terminal is not connected with the transaction.
If a transaction is started (using a CICS command) and has no terminal associated
with it, the COMAUTHTYPE(TERM) should not be used.
- CTX
- Specifies the transaction identification (four characters padded
to eight) as the authorization ID.
- COPID
- The operator identification associated with the user ID that is
associated with the CICS transaction
sign-on facility is used as the authorization ID (three characters
padded to eight).
- CUSERID
- The 8-character user ID associated with the CICS transaction is used as the authorization
ID.
When the DB2 sample
sign-on exit DSN3@SGN is used with AUTHTYPE(USERID), the exit sends
the user ID to DB2 as the primary
authorization ID and the RACF group
ID to DB2 as the secondary ID.
When the sample sign-on exit is used, there is no difference between
COMAUTHTYPE(CUSERID) and COMAUTHTYPE(CGROUP).
- COMTHREADLIM
- Specifies the current maximum number of command threads that the CICS DB2 attachment
allows to be active before requests overflow to the pool.
- CONNECTERROR
- Returns a value when CICS is
not connected to DB2 because
the adapter is in standby mode. The value shows how this information
is to be passed back to an application that has issued a SQL request.
- ABEND
- The application is stopped with abend code AEY9.
- SQLCODE
- The application receives a -923 SQLCODE.
- CONNECTST
- Sets the status of the CICS DB2 connection; that is, to start
or to stop the CICS DB2 connection.
- CONNECTED
- This is equivalent to issuing DSNC STRT to start the CICS DB2 attachment.
If the requested DB2 subsystem
is active, control returns when CICS and DB2 have been connected. If the
requested DB2 subsystem is not
active, the response returned is dependent on the setting of STANDBYMODE:
If DB2 is not initialized, and
STANDBYMODE(NOCONNECT) is specified on the DB2CONN, INVREQ and RESP2=39
is returned. If you specify STANDBYMODE(CONNECT) or STANDBYMODE(RECONNECT),
NORMAL with RESP2=38 is returned indicating that the CICS DB2 attachment
is in standby mode and will connect to DB2 as
soon as it becomes active.
- NOTCONNECTED
- CEMT initiates a quiesce stop of the CICS DB2 connection
and implicitly uses the NOWAIT option, meaning that control returns
immediately to CEMT before the quiesce is complete.
- FORCENOTCON
- FORCENOTCON force stops the connection by force purging transactions
currently using DB2. Control
is not returned until the connection is stopped.
- DB2GROUPID
- Specifies the name (up to four characters) of a data-sharing group
of DB2 subsystems. CICS attempts to connect to any active member
of this group, using group attach. With DB2 Version
10, the name can be a subgroup name identifying a subset of the data-sharing
group.
DB2GROUPID can only be changed when CICS is not connected to a DB2 system. Specifying a DB2GROUPID causes the
DB2ID in the installed DB2CONN definition to be blanked out. If an
individual subsystem's DB2ID is specified in a CEMT or EXEC CICS SET DB2CONN command, or in
a DSNC STRT command, this overrides any DB2GROUPID that is set in
the installed DB2CONN definition. The DB2GROUPID is blanked out, and
needs to be set again (using CEDA or a SET DB2CONN command) to use
group attach. Also note that you cannot set a DB2GROUPID and a DB2ID
in the same command, this causes the command to fail.
- DB2ID
- Specifies the name of the DB2 subsystem
that the CICS DB2 attachment should connect to. DB2ID can only
be changed when CICS is not
connected to a DB2 system. Specifying
a DB2ID causes the DB2GROUPID in the installed DB2CONN definition
to be blanked out, and the DB2GROUPID needs to be set again to use
group attach. If a DB2GROUPID is specified in a CEMT or EXEC CICS SET DB2CONN command, this
overrides any DB2ID that is set in the installed DB2CONN definition,
and the DB2ID is blanked out. Also note that you cannot set a DB2ID
and a DB2GROUPID in the same command, this causes the command to fail.
- MSGQUEUE1
- Specifies the first transient data destination to which unsolicited
messages from the CICS DB2 attachment are sent.
- MSGQUEUE2
- Specifies the second transient data destination to which unsolicited
messages from the CICS DB2 attachment are sent.
- MSGQUEUE3
- Specifies the third transient data destination to which unsolicited
messages from the CICS DB2 attachment are sent.
- NONTERMREL
- Specifies whether non-terminal transactions release threads for
reuse at intermediate sync points.
- RELEASE
- Non-terminal transactions release threads for reuse at intermediate
sync points.
- NORELEASE
- Non-terminal transactions do not release threads for reuse at
intermediate sync points.
- PLAN
- Specifies the name of the plan to be used for all threads in the
pool. If PLAN is specified, PLANEXITNAME is cleared.
- PLANEXITNAME
- Specifies the name of the dynamic plan exit to be used for pool
threads. If you change the PLAN and PLANExitname while there are active
transactions for the pool, the next time the transaction releases
the thread, the plan/exit will be determined using the new rules.
If PLANExitname is specified, PLAN is cleared.
- PRIORITY
- Specifies the priority of the pool thread TCBs
relative to the CICS main TCB
(QR TCB). The thread TCBs are CICS open
L8 TCBs.
- HIGH
- Thread TCBs have a higher priority than the CICS QR TCB.
- EQUAL
- Thread TCBs have equal priority with the CICS QR TCB.
- LOW
- Thread TCBs have a lower priority than the CICS QR TCB.
- PURGECYCLEM
- Specifies the number of minutes (in the range 00 - 59) in the
protected thread purge cycle time. Use this parameter in conjunction
with PURGECYCLES.
- PURGECYCLES
- Specifies the number of seconds (in the range 00 - 59) in the
protected thread purge cycle time. Use this parameter in conjunction
with PURGECYCLEM. The minimum protected thread purge
cycle time is 5 seconds and the default is 30 seconds.
A protected thread is not terminated immediately when
it is released. It is terminated only after two completed purge cycles,
if it has not been reused in the meantime. For example, if the protected
thread purge cycle is set to 30 seconds, a protected thread is purged
30 - 60 seconds after that thread is released. An unprotected thread
is terminated when it is released (at sync point or end of task) if
there are no other transactions waiting for a thread on that DB2ENTRY.
- RESYNCMEMBER
- This applies only if you are using group attach, and specifies
the strategy that CICS adopts
if outstanding units of work are being held for the last DB2 data sharing group member to which CICS was connected. (Units of
work which are shunted indoubt are not included in this process, because CICS itself is unable to resolve
those units of work at this time. Resynchronization for those UOWs
will occur when CICS has resynchronized
with its remote coordinator.)
- RESYNC
- CICS connects to the same DB2 data sharing group member to
resynchronize the outstanding units of work.
- NORESYNC
- CICS makes one attempt
to connect to the same DB2 data
sharing group member, and if that attempt fails, CICS connects to any member of the DB2 data sharing group and issues a warning about
the outstanding units of work.
- REUSELIMIT
- Specifies a value in the range 0 - 10000 representing the maximum
number of times a thread can be reused before it is terminated. The
default is 1000. A value of 0 means that there is no limit on the
number of times that a thread can be reused.
The reuse limit applies
to unprotected threads both in the pool and on a DB2ENTRY, and to
protected DB2ENTRY threads.
- SECURITY
- Specifies the security.
- REBUILD
- Specifies that the CICS DB2 attachment should force all
existing threads to sign-on again at the next thread reuse. It should
be used when RACF profiles
have been updated by issuing the following commands:
- CEMT PERFORM SECURITY REBUILD for RACF 1.9.2
or earlier
- TSO SETROP TS RACLIST(xxxxxxxx) REFRESH for RACF 2.1 or later
- SIGNID
- Specifies the authorization ID to be used by the CICS DB2 attachment
when signing on to DB2 for pool
and DB2ENTRY threads specifying AUTHTYPE(SIGN), and command threads
specifying COMAUTHTYPE(CSIGN).
- STANDBYMODE
- Specifies the action to be taken by the CICS DB2 attachment
if DB2 is not active when an
attempt is made to start the connection from CICS to DB2:
- NOCONNECT
- The CICS DB2 attachment should terminate.
- CONNECT
- The CICS DB2 attachment goes into standby mode to wait
for DB2.
- RECONNECT
- The CICS DB2 attachment goes into standby mode and waits
for DB2. Having connected to DB2, if DB2 then fails the CICS DB2 attachment reverts again to
standby mode and later reconnects to DB2 when
it comes up again.
- STATSQUEUE
- Specifies the transient data destination for CICS DB2 attachment
statistics produced when the CICS DB2 attachment is shutdown.
- TCBLIMIT
- Specifies the maximum number of TCBs that can be used to process DB2 requests. When connected to DB2 Version 5 or earlier, the CICS DB2 attachment
facility creates the TCBs in the form of subtasks up to the limit
specified by TCBLIMIT. Each of these subtasks identifies to DB2 and creates a connection into DB2. When connected to DB2 Version 6 or later, CICS uses open TCBs to process DB2 requests. The TCBLIMIT attribute of the DB2CONN
definition governs how many of the open TCBs can be used to access DB2; that is, how many of them can
identify to DB2 and create a
connection into DB2.
- THREADLIMIT
- Specifies the current maximum number of pool threads the CICS DB2 attachment
allows active before requests are made to wait or are rejected according
to the THREADWait parameter.
- THREADWAIT
- Specifies whether transactions should wait for a pool thread or
be abended if the number of active pool threads reach the THREADlimit
number.
The CICS DB2 attachment issues a unique abend
code AD3T, message DFHDB2011 when THREADWAIT=NO is coded and the number
of pool threads is exceeded.
- TWAIT
- If all threads are busy, a transaction must wait until one becomes
available. A transaction can wait as long as CICS allows it to wait, generally until a thread
becomes available.
- NOTWAIT
- If all threads are busy, the transaction is terminated with abend
code AD3T or AD2P.
Note that when you change the value of AUTHId,
AUTHType, COMAUTHId, COMAUTHType or SIgnid, a surrogate user security
check is invoked if security is active. This ensures that the user
ID under which SET is being executed is authorized to act on behalf
of the user ID being set.
Note that when the SET DB2CONN command
is specified all parameters, except the DB2ID (the connected subsystem),
can be set when the CICS DB2 attachment is active. DB2ID
can only be changed by stopping and restarting the attachment.
If
you change the PLAN and PLANEXITNAME while there are active transactions
for that entry, or the pool, the next time the transaction releases
the thread, the plan/exit will be determined using the new rules.