Reference for CICS-Db2 Attachment Facility modules
CICS-Db2 initialization gate DFHD2IN1
DFHD2IN1 first receives control from DFHSII1 during CICS® initialization by means of a DFHROINM INITIALISE call. When invoked with this function, DFHD2IN1 attaches a system task CSSY to run program DFHD2IN2.
DFHD2IN1 is invoked a second time later by DFHSII1 by means of a DFHROINM WAIT_FOR_INITIALIZATION call for which DFHD2IN1 issues a CICS wait to wait for DFHD2IN2 processing to complete.
CICS-Db2 restart program DFHD2RP
- Adds storage manager subpools for the DFHD2CSB, DFHD2ENT, DFHD2PKG, and DFHD2TRN control blocks.
- Issues lock manager domain ADD_LOCK requests to add the necessary locks required by the CICS-Db2® Attachment facility to manage the dynamic chains of DFHD2LOT and DFHD2CSB control blocks, plus locks to manipulate the DFHD2GLB, DFHD2ENT and DFHD2TRN control blocks.
- Loads CICS-Db2 modules DFHD2CC, DFHD2CO, DFHD2D2, DFHD2RL, DFHD2STR, DFHD2STP and DFHD2TM
- Activates the DFHD2TM and DFHD2RL gates with the kernel.
- Registers the DFHD2RL gate with RL domain for call-backs for PACKAGESET bundle parts.
- Adds D2AC directory.
- For cold and Initial CICS starts, purges the Global catalog of DFHD2GLB, DFHD2ENT and DFHD2TRN control blocks.
- For warm and emergency CICS starts, installs DFHD2GLB, DFHD2ENT and DFHD2TRN blocks found on the global catalog.
CICS-Db2 startup program DFHD2STR
The startup program starts by reading a temporary storage queue to obtain any parameters passed if a DSNC STRT command has been issued. It also retrieves any parameters specified via the INITPARM SIT parameter by linking to program DFHD2INI.
Next DFHD2STR must ensure the necessary DFHD2GLB block is installed. If a DFHD2GLB is already installed, representing an installed DB2CONN, then it is checked to make sure interface is currently shut before startup can proceed.
- Initialize the DFHD2GLB and set the state to 'connecting'.
- MVS load the Db2 program request handler.
- Attach a CICS system task to run the CICS Db2 service task CEX2.
- Call DFHD2CO to connect to Db2 and obtain indoubt.
- Enable the CICS-Db2 TRUE DFHD2EX1.
- Set the status of the connection to 'connected'.
- Post CEX2 to process any indoubts passed from Db2.
- Update state in the temporary storage queue to pass back to a DSNC STRT command.
CICS-Db2 shutdown program DFHD2STP
- If CDB2SHUT is set in the dump table, take a system dump (serviceability aid).
- Post CICS-Db2 service task CEX2 to end all subtasks, then terminate itself. Wait for service task to complete.
- Call DFHD2CO to disconnect from Db2.
- Call DFHD2CC to write out shutdown statistics.
- If the CICS-Db2 attachment is to go into
'standbymode':
- Re-initialize DFHD2GLB and set the state to 'connecting'.
- Post any tasks who are waiting for shutdown to complete.
- Issues Waiting for DB2 attach message.
- If the CICS-Db2 attachment is not to go into
'standbymode':
- Disable the CICS-Db2 TRUE DFHD2EX1.
- MVS delete the program request handler.
- Re-initialize the DFHD2GLB, set the state to 'shut'.
- Issue the shutdown complete message and post any tasks who are waiting for shutdown to complete.
CICS-Db2 task-related user exit DFHD2EX1
Control is passed to the task-related user exit (TRUE) through the CICS RMI. The TRUE manages the relationship between a CICS task (represented by an LOT control block), and a CICS-Db2 thread (represented by a CSB control block). DFHD2EX1 uses parameters set in the DB2CONN and DB2ENTRY definitions to manage use of the CICS Db2 threads, each thread running under a thread TCB.
The thread TCB is any eligible key 8 CICS open TCB: L8, T8, or X8. DFHD2EX1 and DFHD2D2 both run under this TCB.
- EXEC SQL commands and Db2 IFI commands from application programs
- Syncpoint
- End of task
- INQUIRE EXITPROGRAM commands for the Db2 TRUE with the CONNECTST or QUALIFIER keywords (RMI SPI calls)
- EDF when using EDF for EXEC SQL commands
- CICS shutdown
- Switch application environment
CICS-Db2 coordinator program DFHD2CO
The coordinator program runs under the CICS Resource owning (RO) TCB, and handles the overall connection between CICS and a Db2 subsystem.
- by DFHD2STR during startup of the attachment facility to issue the coordinator identify to Db2, that is to establish connection to Db2. Once established, it passes Db2 an ECB to be posted should Db2 terminate, and it also obtains from Db2 a list of units of work (UOWs) that Db2 is indoubt about. This list is anchored off the CICS-Db2 global block (DFHD2GLB) for processing later in startup.
- by DFHD2STP during shutdown of the attachment facility to terminate the identify to Db2 and so disconnect.
- by the CICS-Db2 TRUE DFHD2EX1 during resync processing to pass the resolution of a indoubt unit of work to Db2. Indoubt resolution has to be done under the same TCB that issued the coordinator identify to Db2.
CICS-Db2 thread processor DFHD2D2
The thread processor DFHD2D2 is invoked from the CICS-Db2 TRUE DFHD2EX1 which is enabled as CONCURRENCY(REQUIRED) API(CICSAPI) and so runs on any eligible key 8 open TCB. DFHD2D2 runs on the same eligible key 8 open TCB.
DFHD2D2 issues the identify, sign-on, create thread, terminate thread calls to Db2, plus the api and syncpoint calls to Db2.
DFHD2D2 is called through a subroutine domain call on which the address of the relevant
connection control block (DFHD2CSB) is passed. On the first call of a unit of work, Db2 is called to associate
the connection with the calling TCB. After this is done, calls to Db2 can proceed as normal. When a
Db2 thread is released from a
CICS transaction (typically at syncpoint), the connection is
dissociated
from the open TCB. Hence a connection control block (DFHD2CSB) has an affinity to
an open TCB while it is associated.
CICS-Db2 service task program DFHD2EX2
The CICS-Db2 service task program DFHD2EX2 runs as a CICS system task under transaction CEX2.
- To wait for Db2 to startup if Db2 is down when connection is attempted if STANDBYMODE=RECONNECT or CONNECT is specified in the DB2CONN.
- To initiate shutdown of the CICS-Db2 Attachment facility if posted to do so.
- To perform the protected thread purge cycle.
- To issue EXEC CICS RESYNC to process Db2 indoubts.
CICS-Db2 PLTPI program DFHD2CM0
DFHD2CM0 is used in PLTPI or as a result of DB2CONN=YES being set in the system initialization table. It issues an EXEC CICS SET DB2CONN CONNECTED command to start the CICS Db2 Attachment facility.
CICS-DFHD2CM0 command processor DFHD2CM1
DFHD2CM1 processes commands that are issued through the DSNC command.
- DSNC STRT - EXEC CICS SET DB2CONN CONNECTED command issued
- DSNC STOP - EXEC CICS SET DB2CONN NOTCONNECTED command issued
- DSNC MODIFY DEST - EXEC CICS SET DB2CONN MSGQUEUEn command issued
- DSNC MODIFY TRAN - EXEC CICS SET DB2CONN THREADLIMIT or EXEC CICS SET DB2ENTRY THREADLIMIT command issued.
- DSNC DISC - call passed to DFHD2CC to disconnect threads
- DSNC DISP PLAN - call passed to DFHD2CC to display information on threads for a particular Db2 plan
- DSNC DISP TRAN - call passed to DFHD2CC to display information on threads for a transaction.
- DSNC DISP STAT - call passed to DFHD2CC to write out statistics
- DSNC -db2command - Db2 IFI ccommand issued to send operator command to the connected Db2 subsystem.
CICS-Db2 shutdown quiesce program DFHD2CM2
DFHD2CM2 runs under transaction CDBQ. It issues an EXEC CICS SET DB2CONN NOTCONNECTED WAIT command to shut down the CICS-Db2 Attachment facility.
CICS-Db2 shutdown force program DFHD2CM3
DFHD2CM3 runs under transaction CDBF. It issues an EXEC CICS SET DB2CONN NOTCONNECTED FORCE command to shutdown the CICS-Db2 Attachment facility.
CICS-Db2 table manager DFHD2TM
DFHD2TM handles installs, discards, inquire and set requests for the DFHD2GLB, DFHD2ENT and DFHD2TRN control blocks representing the DB2CONN, DB2ENTRY and DB2TRAN resources. In addition, it handles inquire requests for Db2 Package Sets.
- DFHAMD2 - for CEDA install and EXEC CICS CREATE
- DFHD2EX1 - to complete disablement of a DB2ENTRY or to complete Attachment facility shutdown
- DFHD2RP - to install objects from the Global Catalog during CICS restart
- DFHEIQD2 - for EXEC CICS INQUIRE,SET and DISCARD of Db2 objects
- DFHESE - for inquiry during EXEC CICS QUERY SECURITY processing.
- EYU0NLG4 and EYU0NLX2 - for inquiring on Db2 Package Sets during CICSPlex® SM resource topology processing.
- EYU0NQDP - for inquiring on Db2 Package Sets for CICSPlex SM DB2PKGST requests.
CICS Db2 statistics program DFHD2ST
DFHD2ST is called by AP domain statistics program DFHAPST to process CICS-Db2 statistics for EXEC CICS COLLECT STATISTICS and EXEC CICS PERFORM STATISTICS commands.
CICS Db2 connection control program DFHD2CC
- Start_db2_attachment - request routed on to DFHD2STR
- Stop_db2_attachment - request routed on to DFHD2STP
- Write_db2_statistics - statistics collected from control blocks and are written out to the terminal, to transient data or to SMF.
- disconnect_threads - CSB control blocks searched and marked so that threads are terminated when they are next released.
- display_plan and display_tran - thread information collected from control blocks and output to the terminal.
CICS Db2 EDF processor DFHD2EDF
DFHD2EDF receives control from CICS-Db2 TRUE DFHD2EX1 when the TRUE is invoked for an EDF request. DFHD2EDF uses the RMI provided parameters to format the screen to be output by EDF before and after an EXEC SQL request is issued.