INQUIRE DB2ENTRY

Returns the attributes of the DB2ENTRY that defines resources to be used by a specific transaction or by a group of transactions when accessing DB2®.

INQUIRE DB2ENTRY

Read syntax diagramSkip visual syntax diagramINQUIRE DB2ENTRY( data-value)ACCOUNTREC( cvda)AUTHID( data-area)AUTHTYPE( cvda)CHANGEAGENT( cvda)CHANGEAGREL( data-area)CHANGETIME( data-area)CHANGEUSRID( data-area)DEFINESOURCE( data-area)DEFINETIME( data-area)DISABLEDACT( cvda)DROLLBACK( cvda)ENABLESTATUS( cvda)INSTALLAGENT( cvda)INSTALLTIME( data-area)INSTALLUSRID( data-area)PLAN( data-area)PLANEXITNAME( data-area)PRIORITY( cvda)PROTECTNUM( data-area)PTHREADS( data-area)THREADLIMIT( data-area)THREADS( data-area)THREADWAIT( cvda)

Conditions: NOTAUTH, NOTFND

This command is threadsafe.

Description

The entry is identified by the name it was defined with in the CSD by the DEFINE DB2ENTRY command.

Browsing

You can also browse through all of the DB2ENTRY definitions installed in a CICS® region by using the browse options, START, NEXT, and END, on INQUIRE DB2ENTRY commands. See Browsing resource definitions for general information about browsing, including syntax, exception conditions, and examples.

The resource signature

You can use this command to retrieve the resource signature fields. You can use these fields to manage resources by capturing details of when the resource was defined, installed, and last changed. For more information, see Auditing resources. The resource signature fields are BUNDLE, CHANGEAGENT, CHANGEAGREL, CHANGETIME, CHANGEUSRID, DEFINESOURCE, DEFINETIME, INSTALLAGENT, INSTALLTIME, and INSTALLUSRID. See Summary of the resource signature field values for detailed information about the content of the resource signature fields.

Options

ACCOUNTREC
Returns the minimum amount of DB2 accounting required for transactions using this DB2ENTRY. The specified minimum can be exceeded, as described in the following options. CVDA values are as follows:
UOW
The CICS DB2 attachment facility causes an accounting record to be produced by DB2 for each UOW, assuming that the thread is released at the end of the UOW.
TASK
The CICS DB2 attachment facility causes a minimum of one accounting record to be produced by DB2 for each CICS task.

A transaction containing multiple UOWs can use a different thread for each UOW, assuming that the thread is released at sync point. The result can be the production of an accounting record for each UOW. For example, an accounting record is produced if a thread ends after being released, or if a thread is reused but the primary AUTHID is changed.

TXID
The CICS DB2 attachment facility causes an accounting record to be produced by DB2 when the transid using the thread changes.

This option applies to DB2ENTRY definitions that are used by more than one transaction ID. Because threads are typically released at sync point, a transaction containing multiple UOWs can use a different thread for each UOW. The result can be that an accounting record is produced for each UOW. For example, an accounting record is produced if a thread stops after being released, or if a thread is reused but the primary AUTHID is changed.

NONE
No accounting records are required for transactions using threads from this DB2ENTRY.

DB2 produces. however, at least one accounting record per thread when the thread is ended. Additionally, authorization changes cause accounting records to be produced.

AUTHID
Returns an ID to be used for security checking for threads on this DB2ENTRY. If an AUTHID is returned, AUTHTYPE is not applicable.
AUTHTYPE
Returns the type of ID to be used for security checking for threads on this DB2ENTRY. If an AUTHTYPE is returned, AUTHID is blank. CVDA values are as follows:
GROUP
The 8-character user ID and the connected group name are used 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.

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
The SIGNID parameter of the DB2CONN is used as the resource authorization ID.
TERM
The terminal identification (four characters padded to eight) is used 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, do not use AUTHTYPE(TERM).

TX
The transaction identification (four characters padded to eight) is used 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, AUTHTYPE(USERID) and AUTHTYPE(GROUP) are the same.

CHANGEAGENT(cvda)
Returns a CVDA value that identifies the agent that made the last change to the resource definition. The possible values are as follows:
CREATESPI
The resource definition was last changed by an EXEC CICS CREATE command.
CSDAPI
The resource definition was last changed by a CEDA transaction or the programmable interface to DFHEDAP.
CSDBATCH
The resource definition was last changed by a DFHCSDUP job.
DREPAPI
The resource definition was last changed by a CICSPlex SM BAS API command.
CHANGEAGREL(data-area)
Returns a 4-digit number of the CICS release that was running when the resource definition was last changed.
CHANGETIME(data-area)
Returns an ABSTIME value that represents the time stamp when the resource definition was last changed. For more information about the format of the ABSTIME value, see FORMATTIME.
CHANGEUSRID(data-area)
Returns the 8-character user ID that ran the change agent.
DEFINESOURCE(data-area)
Returns the 8-character source of the resource definition. The DEFINESOURCE value depends on the CHANGEAGENT value. For more information, see Summary of the resource signature field values.
DEFINETIME(data-area)
Returns an ABSTIME value that represents the time stamp when the resource definition was created.
DISABLEDACT
Returns what CICS is to do with new transactions accessing the DB2ENTRY when it has been disabled or is disabling. If DISABLEDACT is not specified, and DB2ENTRY is disabled, new requests are routed to the pool by default. CVDA values are as follows:
POOL
The CICS DB2 attachment facility routes the request to the pool. Message DFHDB2072 is sent to the transient data destination specified by MSGQUEUEn on the DB2CONN for each transaction routed to the pool.
ABEND
The CICS DB2 attachment facility stops the transaction. The abend code is AD26.
SQLCODE
An SQLCODE is returned to the application indicating that the DB2ENTRY is disabled.
DROLLBACK
Returns whether the CICS DB2 attachment initiates a sync point rollback if a transaction being selected as victim of a deadlock resolution. CVDA values are as follows:
ROLLBACK
The attachment facility issues a sync point rollback before returning control to the application. An SQL return code of -911 is returned to the application.
NOROLLBACK
The attachment facility is not to initiate a rollback for this transaction. An SQL return code of -913 is returned to the application.
ENABLESTATUS
Returns a cvda indicating whether the DB2ENTRY can be accessed by applications. CVDA values are as follows:
ENABLED
The DB2ENTRY can be accessed by applications. DB2ENTRY is installed in an ENABLED state.
DISABLED
The DB2ENTRY cannot be accessed by applications.
DISABLING
The DB2ENTRY is in the process of being disabled. New transactions cannot access the DB2ENTRY. Existing transactions using the DB2ENTRY are allowed to complete unless the DB2ENTRY is being disabled with the FORCE option.
INSTALLAGENT(cvda)
Returns a CVDA value that identifies the agent that installed the resource. The possible values are as follows:
CREATESPI
The resource was installed by an EXEC CICS CREATE command.
CSDAPI
The resource was installed by a CEDA transaction or the programmable interface to DFHEDAP.
GRPLIST
The resource was installed by GRPLIST INSTALL.
INSTALLTIME(data-area)
Returns an ABSTIME value that represents the time stamp when the resource was installed.
INSTALLUSRID(data-area)
Returns the 8-character user ID that installed the resource.
PLAN
Returns the name of the plan to be used for this DB2ENTRY. If PLAN is returned, PLANEXITNAME is blank.
PLANEXITNAME
Returns the name of the dynamic plan exit (if any) to be used for this DB2ENTRY. If PLANEXITname is returned, PLAN is blank.
PRIORITY
Returns the priority of the thread TCBs for this DB2ENTRY relative to the CICS main TCB (QR TCB). The thread TCBs are CICS open L8 TCBs. CVDA values are as follows:
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.
PROTECTNUM
Returns the maximum number of protected threads allowed for this DB2ENTRY.
PTHREADS
Returns the current number of protected threads for this DB2ENTRY. A protected thread is an inactive thread available for reuse by a new transaction. If no transaction has reused the thread by the time it has been processed by two purge cycles, the thread is ended.
THREADS
Returns the current number of threads active for this DB2ENTRY.
THREADLIMIT
Returns the current maximum number of threads for this DB2ENTRY that the CICS DB2 attachment allows active before requests are made to wait, overflow to the pool, or are rejected. See the THREADWAIT option.
THREADWAIT
Returns whether transactions wait for a DB2ENTRY thread be stopped, or to overflow to the pool if the number of active DB2ENTRY threads reaches the Threadlimit number. CVDA values are as follows:
TWAIT
If all threads are busy, a transaction waits until one becomes available.
NOTWAIT
If any threads are busy, a transaction is stopped with an abend code AD2P.
TPOOL
If all threads are busy, a transaction is diverted to use a pool thread. If the pool is also busy, and NOTWAIT has been specified for the THREADWAIT parameter on the DB2CONN, the transaction is stopped with an abend code AD3T.

Conditions

NOTAUTH
RESP2 values:
100
Command authorization failure
101
Resource authorization failure
NOTFND
RESP2 values:
1
The DB2ENTRY cannot be found.