DB2 connection in CICS TS 최종 - DBGuide.net · 2008-11-10 · 1 shows CICS using a thread to access DB2 in the open transaction environment. The CICS DB2 task-related user exit
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
A task with SQL requests canreuse an existing thread that another task used previouslyor allocate a new thread.
In order to reuse a thread1. both tasks must be on the same DB2ENTRY2. both tasks must use the same plan.
A thread is released for reuseafter SYNCPOINTs for terminal driven transactions (& non terminal transactions if NONTERMREL(YES)) that do not have open cursors using the HOLD option and special registers are in the initial state.at EOT (end of task ) for all transactions.
Avoiding signons where ever possible will improve the performance of transactions within a DB2ENTRY
Sign on always occurs when a thread is used for the first time. A thread is signed on again when the thread is reused and any of thefollowing occur:
Primary authorization ID 가변경될경우• Best choice : AUTHID(string) or AUTHTYPE(SIGN).
• Worst choice : AUTHTYPE(TERM) or AUTHTYPE(USERID).
ACCOUNTING RECORD 가새로생성될경우• 동일 Task 내에서도 Accountrec(uow) 에의해 Accounting record 가두개이상만들어지는경우
• TXID 가변경된경우
Partial sign on :Signons done for accounting purposes only are called partial signons. Whereas DSNC DISPLAY STATISICS only has an AUTHScolumn which will include both full and partial signons, the enhanced CICS-DB2 statistics available via DFH0STAT or DFHSTUP will show the a Signon count (ie full and partial signons) and a partial signon count.
1 shows CICS using a thread to access DB2 in the open transaction environment. The CICS DB2 task-related user exit has been invoked by the Resource Manager Interface (RMI), and it is operating on an open TCB. The CICS DB2 attachment facility has associated a CSUB and a DB2 connection control block with the open TCB. The DB2 connection control block has a thread into DB2. The plan associated with the thread is held in DB2. Situation
2 shows a thread that is not currently in use, but is protected. The CSUB and DB2 connection control block are still linked to each other and have a thread, but no open TCB is attached to them. The thread is available for reuse. Situation
3 shows an assembly that is left after a thread was terminated. The CSUB and DB2 connection control block are available for reuse. They need a new thread. Situation
4 shows open TCBs that are available for reuse. The CICS DB2 attachment facility can use these open TCBs and associate CSUB and DB2
QUASIRENT applications with DB2 V6 and higherSame amount of TCB switching occursSwitches between QR and the L8 TCB rather than QR and a CICS-DB2 subtaskSome customers experienced performance problems and cpu increases
• Apply apars PQ67351, PQ72112, PQ75405 and PQ78987
THREADSAFE applications with DB2 V6 and higherReturn to the application on the 'L8' open TCBApplication logic run on open TCBNo TCB switch for next DB2 requestCICS requests may force switch back to QR or be run on the open TCB
Global User Exits (GLUEs) should be made THREADSAFE else unwanted TCB switching will occur
CICS will be forced to switch to QR TCB from an open TCB to invoke a non threadsafeGLUE
Particularly important for XRMIIN and XRMIOUT exits else CICS-DB2 benefits will be lost.
eg Apply Omegamon fix QC26070
Use DFH0STAT statistics programGlobal user exits report shows which programs are enabled at which exit points and whether they are defined as threadsafe
New XPI ENQUEUE and DEQUEUE function provided
Make exit threadsafe. Define exit program to CICS as threadsafe
TCBLIMIT in DB2CONN definitionSpecifies the maximum number of TCBs that can be used to process DB2 requestsWhen connected to DB2 5.1 or below, the Attach creates TCBs up to the limit of TCBLIMITWhen connected to DB2 6.1 or above, CICS creates TCBs (up to a limit of MAXOPENTCBs in the SIT).
• TCBLIMIT specifies how many of these may be used to access DB2.
MAXOPENTCBS should always be equal or greater than TCBLIMIT
With TRANISO: MAXOPENTCBS should also be equal or greater than MXT.Apply apar PQ75405
DB2GROUPID parameter added to DB2CONN and INQUIRE/SET DB2CONN commands
Mutually exclusive to DB2ID parameterCICS will connect to any member of the group
• DB2 searches list of subsystems defined to this MVS
RESYNCMEMBER(YES¦NO) parameter added to DB2CONNYES (default) means if CICS thinks indoubts are outstanding then ignore group attach and attach to the specific DB2 member last used
NO means use group attach regardless of indoubtsCICS will nevertheless try a specific attach to the last used group member first. If that fails it will use group attach to connect to any group member.
DSNC STRT yyyy or CEMT/EXEC CICS SET DB2CONN DB2ID(yyyy)yyyy specifies a specific DB2ID, not groupidforces non group attach, blanks out DB2GROUPID
INITPARM=(DFHD2INI='yyyy')yyyy specifies a specific DB2ID, not groupidforces non group attach, blanks out DB2GROUPIDRemove INITPARM setting if group attach required
DB2 V7 is a prerequisite, new DB2 group attach function:Wait for any member of the group to initialiseNew Connect types for CICSRequires maintenance to DB2 V7 ERLY code in LPA & MVS IPL