IBM IMS DB Control Overview (DBCTL)

4,812 views

Published on

Published in: Technology
  • Be the first to comment

IBM IMS DB Control Overview (DBCTL)

  1. 1. IMS DBCTL IMS User Group November 11-12,2009 Kenny Blackman kblackm@us.ibm.com © 2009 IBM Corporation
  2. 2. What is DBCTL? IMS Database Manager component –IMS control region –DL/I separate address space –Owns DL/I databases –Database Recovery Control (DBRC) address space DBCTL supports interfaces to –Coordinator controller (CCTL) © 2009 IBM Corporation
  3. 3. IMS DBCTL Subsystem Structure IRLM D CCTL A R (optional) A IMS D CCTL B R BMP A D DBRC 1 CCTL C R A DBCTL IMS Services CTL BMP 2 Application DLISAS Address Space (ODBA) DL/I Application FP IMS Recon DEDBs FF Address Space LOGs (ODBA) DBs © 2009 IBM Corporation
  4. 4. DBCTL Region structure The DBCTL region is like the IMS Transaction Manager without the support for terminals or message queues. It controls the IMS log and DEDB (Fast Path Data Entry Databases) The DLISAS (DLI Separate Address Space) region manages DL/I full function databases (HDAM, HIDAM, HISAM, SHISAM, HSAM, SHSAM, and GSAM, PHDAM, PHIDAM, PSINDEX). The DLISAS region provides program isolation locking for all the databases at the segment level (non data sharing) when update requests are received. The DBRC (Data Base Recovery Control) region is used for its DBCTL log and database access control facility: –Maintains control information in the RECON data set –Tracks the status of all IMS logs –Controls recovery if DBs are registered –Controls the use of the Remote Site Recovery feature The IRLM (IMS Resource Lock Manager) is used to implement Block Level Data Sharing from more than one subsystem such as DBCTL and Batch DLI jobs © 2009 IBM Corporation
  5. 5. IMS TM/DB Subsystem Structure + DBCTL D IRLM IMS CCTL A R (optional) A D MPR CCTL B R 1 A D DBRC IMS CCTL C R A MPR DBCTL CTL TM 2 Services Services Application IMS DLISAS Address Space BMP (ODBA) 1 IMS Application DL/I BMP FP IMS Address Space FF Recon 2 DEDBs LOGs (ODBA) DBs © 2009 IBM Corporation
  6. 6. Batch Message Processing (BMP) Non-Transaction Oriented BMP // EXEC PGM=DFSRRC00, PARM='BMP,PGMNAME,PSB,...' Control Region Batch Message Region Application Program: ... ... READ MVS DATA SET ... PSTx ... ACCESS DB(S) ... DATABASE(S) ... CALL 'CHKP' GET NEXT I/P TERMINATE © 2009 IBM Corporation
  7. 7. DRA Interface Task Structure CCTL Address Space DBCTL System Database Resource CCTL Main TCB Adapter D.R.A. TCB Program A Thread TCB PST1 Program B Thread TCB PST2 ... ... Program n Thread TCB PSTn Partition Specification Table (PST) PST is used to control each thread and region © 2009 IBM Corporation
  8. 8. CICS DRA Interface Task Structure CICS/ESA Address Space DBCTL System Database Resource Adapter CICS/ESA Main TCB D.R.A. TCB Transaction Thread TCB PST1 Transaction Thread TCB PST2 ... ... PSTn Transaction Thread TCB The DRA is IMS code shipped with IMS © 2009 IBM Corporation
  9. 9. Define DB Resource Adapter Startup table . . EJECT DFSPRP DSECT=NO, X FUNCLV=2, X CCTL FUNCTION LEVEL X DDNAME=CCTLDD, XXXXXXXX DDN FOR CCTL RESLIB DYNALOC X DSNAME=IMS.SDFSRESL, X DBCTLID=IMSX, XXXX NAME OF DBCTL REGION IMSID X USERID=CCTL, XXXXXXXX NAME OF USER REGION X MINTHRD=001, XXX MINIMUM THREADS X MAXTHRD=030, XXX MAXIMUM THREADS X TIMER=60, XX IDENTIFY TIMER VALUE - SECS X FPBUF=001, XXX FP FIXED BFRS PER THREAD X FPBOF=001, XXX FP OVFLW BFRS PER THREAD X SOD=V, X SNAP DUMP CLASS X TIMEOUT=060, XXX DRATERM TIMEOUT IN SECONDS X CNBA=001 XXX TOTAL FP NBA BFRS FOR CCTL END © 2009 IBM Corporation
  10. 10. RAS PSB Security ISIS=R or A ACEE - Authenticated USERID The IMS application group resource class (IIMS or Ixxxxxxx) IMS CCTL DFSPRP Address Space Userid USERID PSB Schedule Time DFSPRP Userid PSB 1 Userid © 2009 IBM Corporation
  11. 11. SAF APSB Security ODBASE=Y ACEE - Authenticated USERID The IMS application group resource class (AIMS or Axxxxxxx) IMS z/OS PSB Schedule Time Address Space ASCB/ TCB PSB 1 Userid ACEE Userid © 2009 IBM Corporation
  12. 12. Open Database Access (ODBA) Callable interface to IMS DB: – Similar to CCTL connection to IMS DBCTL – Caller is in address space outside of IMS or CCTL • Calls IMS DBCTL or IMS TM/DB Benefits – IMS DB capabilities outside of IMS • May be used with DB2 Stored Procedures © 2009 IBM Corporation
  13. 13. ODBA Interface Interface – Uses DBCTL interface: • Database Resource Adapter (DRA) • Similar to a CCTL connector to DBCTL • Multiple threads are supported – Resource Recovery Services of MVS is required: • Two-phase commit is supported • Distributed sync point is supported © 2009 IBM Corporation
  14. 14. ODBA is the IMS DB callable interface that provides access to IMS databases for z/OS applications IMS z/OS WebSphere Control Services Database manager Application Server ODBA Client ODBA z/OS DB2 Stored Procedures ODBA Database Client z/OS © 2009 IBM Corporation
  15. 15. Defining the connection A connection is defined with a DRA startup table: – Like DBCTL connections from CICS – DFSPRP macro is assembled • Parameters for IMSID, minimum threads, maximum threads, AGN, etc. – Startup table module name is: DFSxxxx • xxxx is recommended to be the IMSID © 2009 IBM Corporation
  16. 16. Execution requirements Application program must be linked with DFSCDLI0 or load it – Language interface module for ODBA • Invokes DRA interface IMS modules must be available to address space – May be in STEPLIB or JOBLIB • DFSAERG0 • DFSAERM0 • DFSAERA0 • DRA Startup Table (DFSxxxx0) © 2009 IBM Corporation
  17. 17. ODBA Setup Process Defining the Connection ƒDFSPRP macro defines DRA Startup parms ƒAssemble DFSnnnn0 nnnn = Any 1-4 alphanumeric characters ƒPut in PDS accessable by ODBA application address space ƒWhere can you find the Parm Descriptions IMS Install Volume 2 DFSPRP DSECT=YES DFSPRP parms ƒDBCTLID 1-4 IMSID value ƒCNBA Total number of FastPath buffers – FPBUF x MAXTHRD <= CNBA – Needed for FP DEDB access ƒMINTHRD & MAXTHRD 1 <= MINTHRD => 999 1 <= MAXTHRD => 999 –If MAXTHRD < MINTHRD then MAXTHRD = MINTHRD © 2009 IBM Corporation
  18. 18. ODBA MVS Caller with IMS Address Spaces Caller Multiple Threads with Single TCB PST Thread TCB PST TCB PST PST TCB ... IMS Databases • Multiple concurrent connections – Connectors may have multiple threads: Each thread requires a TCB in caller Each thread uses a PST in the control region © 2009 IBM Corporation
  19. 19. ODBA MVS Caller with IMS A Multiple Connections IMS B TCB PST PST TCB TCB PST PST TCB TCB PST ... ... IMS Databases IMS Databases • Connectors may connect to multiple IMS systems – Connections may be concurrent © 2009 IBM Corporation
  20. 20. ODBA calls IMS calls must use AIB interface with AERTDLI – CIMS • Establishes and terminates the connection – APSB • Allocates a PSB – DPSB • Deallocates a PSB – DLI calls • Usual access to databases (GU, GN, ISRT, ...) Synchronization done with SRRCMIT or ATRCMIT © 2009 IBM Corporation
  21. 21. Coding requirements Calls for one unit of recovery must use the same AIB: – APSB – DL/I calls – DPSB Each thread must have its own TCB – Sync points are invoked for a TCB Sync points must be created by RRS call – SRRCMIT or ATRCMIT © 2009 IBM Corporation
  22. 22. ODBA example – One thread CIMS INIT call for IMSA Connector example: APSB call for PSBX – Establishes a connection Database calls – Schedules a PSB – Does some DLI calls CALL AERTDLI(GU,AIB,IOAREA,...) ... – Commits the work SRRCMIT – Terminates the PSB DPSB call – Terminates the connection CIMS TALL call © 2009 IBM Corporation
  23. 23. ODBA example – Multiple threads Main task CIMS INIT call for IMSA Connector example: Attach task 1 and task 2 – Establishes a connection – Creates two threads Task 1 – Schedules multiple PSBs in task 1 Task 2 APSB call APSB call – Commits multiple times in both Database calls Database calls tasks SRRCMIT SRRCMIT DPSB call – Terminates the connection ... ... Database calls APSB call SRRCMIT Database calls ... SRRCMIT DPSB call DPSB call CIMS TALL call © 2009 IBM Corporation
  24. 24. ODBA DB2 stored procedure example DRDA Client z/OS DB2 WLM Addr. Space IMS CIMS INIT EXEC SQL CALL PGMA PGMA APSB DL/I SQL DPSB PREP CIMS TALL SRRCMIT ... ... DB2 Databases IMS Databases • DB2 stored procedure example: – DRDA Client issues SQL for stored procedure – DB2 invokes stored procedure – Stored procedure does SQL and DL/I calls – Client program does commit when stored procedure returns © 2009 IBM Corporation
  25. 25. IMS DBCTL benefits Increased system availability: – Easier maintenance via release independent DRA interface – More operational flexibility – Online change of PSBs, DBDs, and security definitions – Failure isolation through the use of independent components Improved logging facility: – All data base and DBCTL systems changes recorded on DBCTL log: • DBRC controls log archiving and reuse • Logs used for automatic DB backout after BMP or DBCTL failure – Dual logging option available – User specifies number of log data sets © 2009 IBM Corporation
  26. 26. Resource Recovery Services ODBA requires RRS RRS is syncpoint manager: – Supports two-phase commit – Supports distributed coordinated commit – Syncpoints are initiated by SRRCMIT or ATRCMIT RRS uses MVS logging services – Coupling facility or DASD-only log streams © 2009 IBM Corporation
  27. 27. DBCTL Summary To fully utilize the DBCTL environment some application program changes may be required "DLI" type batch jobs must be modified to work in the "BMP" environment. A typical program might require changes as follows: –PSBGEN - COMPAT=Y - GETS "DUMMY" IOPCB –PROGRAM CODE PROGRAM ENTRY - IOPCB CALL "CBLTDLI" USING CHKP... © 2009 IBM Corporation
  28. 28. DBCTL Summary … Performance –Up to 999 concurrent applications Separate subsystems and address-spaces provide VSCR Common logging facility: –Dual logging option –User-specified number of log data sets –Automatic archiving under DBRC control –Combined logging versus separate off-line batch job logging © 2009 IBM Corporation
  29. 29. DBCTL Summary … Increased data availability: –Concurrent Image Copy (CIC) of DB Datasets –DB data available after DBCTL restart WRITE I/O virtual buffers are logged –Backout failure: Stop only those DBs not backed-out –Successful PSB schedule even when some DBs are Not Available Fast Path DEDB access: –High availability (Area concept) –Potential performance benefits –Larger databases © 2009 IBM Corporation

×