29
© 2009 IBM Corporation IMS DBCTL IMS User Group November 11-12,2009 Kenny Blackman [email protected]

IBM IMS DB Control Overview (DBCTL)

  • Upload
    ibm-ims

  • View
    3.095

  • Download
    10

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

IMS DBCTL

IMS User Group November 11-12,2009

Kenny [email protected]

Page 2: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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)–Uses interface to pass DL/I calls to

Page 3: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

IMS DBCTL Subsystem Structure

DBRC

DLISAS

CTLIMSBMP

2

IMSBMP

1

FP DEDBs

DL/IFF

DBs

IRLM(optional)

ApplicationAddress Space

(ODBA)

DBCTLServices

CCTL CDRA

CCTL BDRA

CCTL ADRA

ApplicationAddress Space

(ODBA)

IMSLOGs

Recon

Page 4: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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

Page 5: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

IMS TM/DB Subsystem Structure + DBCTL

DBRC

CTL

IMSBMP

2

IMSBMP

1

DL/IFF

DBs

FP DEDBs

IRLM(optional)

IMSMPR

2

IMSMPR

1

ApplicationAddress Space

(ODBA)

DBCTLServices

CCTL CDRA

CCTL BDRA

CCTL ADRA

ApplicationAddress Space

(ODBA)

IMSLOGs Recon

TMServices

DLISAS

Page 6: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

Batch Message Processing (BMP) Non-Transaction Oriented BMP

Control Region

PSTx

DATABASE(S)

Batch Message Region

Application Program:. . .. . .

READ MVSDATA SET

. . .. . .

ACCESS DB(S). . . . . .

CALL 'CHKP'GET NEXT I/PTERMINATE

// EXEC PGM=DFSRRC00, PARM='BMP,PGMNAME,PSB,...'

Page 7: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

CCTL Address SpaceDBCTL System

CCTL Main TCB

Program B

Program n

...

D.R.A. TCB

Program A Thread TCB

Thread TCB

Thread TCB

...

DRA Interface Task Structure

PST1

PST2

PSTn

Database ResourceAdapter

Partition Specification Table (PST)PST is used to control each thread and region

Page 8: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

CICS/ESA Address Space

DBCTL System

CICS/ESA Main TCB

Transaction

Transaction

Transaction

...

D.R.A. TCB

Transaction Thread TCB

Thread TCB

Thread TCB

...

CICS DRA Interface Task Structure

PST1

PST2

PSTn

Database ResourceAdapter

The DRA is IMS code shipped with IMS

Page 9: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

.

.EJECTDFSPRP DSECT=NO, X

FUNCLV=2, X CCTL FUNCTION LEVEL XDDNAME=CCTLDD, XXXXXXXX DDN FOR CCTL RESLIB DYNALOC XDSNAME=IMS.SDFSRESL, XDBCTLID=IMSX, XXXX NAME OF DBCTL REGION IMSID XUSERID=CCTL, XXXXXXXX NAME OF USER REGION XMINTHRD=001, XXX MINIMUM THREADS XMAXTHRD=030, XXX MAXIMUM THREADS XTIMER=60, XX IDENTIFY TIMER VALUE - SECS XFPBUF=001, XXX FP FIXED BFRS PER THREAD XFPBOF=001, XXX FP OVFLW BFRS PER THREAD XSOD=V, X SNAP DUMP CLASS XTIMEOUT=060, XXX DRATERM TIMEOUT IN SECONDS XCNBA=001 XXX TOTAL FP NBA BFRS FOR CCTL

END

Define DB Resource Adapter Startup table

Page 10: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

CCTL

Address Space

RAS PSB Security

DFSPRPUserid

DFSPRPUserid

PSB Schedule Time

PSB 1 Userid

ISIS=R or A ACEE - Authenticated USERIDThe IMS application group resource class (IIMS or Ixxxxxxx)

IMS

USERID

Page 11: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

z/OS

Address Space

SAF APSB Security

ASCB/TCB

ACEEUserid

PSB Schedule Time

PSB 1 Userid

ODBASE=Y ACEE - Authenticated USERIDThe IMS application group resource class (AIMS or Axxxxxxx)

IMS

Page 12: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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

Page 13: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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

Page 14: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

ODBA is the IMSDB callable interface that provides access to IMS databases for z/OS applications

z/OSDB2StoredProceduresODBAClient

IMS

Database

Control Services Database manager

OD

BA

z/OSWebSphere ApplicationServerODBAClient

z/OS

Page 15: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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

Page 16: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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)

Page 17: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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

ODBA Setup Process

DFSPRP parmsƒDBCTLID

1-4 IMSID valueƒCNBA

Total number of FastPath buffers– FPBUF x MAXTHRD <= CNBA– Needed for FP DEDB access

ƒMINTHRD & MAXTHRD1 <= MINTHRD => 9991 <= MAXTHRD => 999

–If MAXTHRD < MINTHRD then MAXTHRD = MINTHRD

Page 18: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

• Multiple concurrent connections– Connectors may have multiple threads:

Each thread requires a TCB in callerEach thread uses a PST in the control region

...IMS Databases

IMS Address Spaces Callerwith

SingleThread

Caller withMultiple Threads

TCB

TCB

TCB TCB

PST

PST

PST PST

MVS

ODBA

Page 19: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

• Connectors may connect to multiple IMS systems– Connections may be concurrent

...IMS Databases

IMS BCaller with

Multiple Connections

TCB

TCB

TCB

PST

PST

PST

TCB

TCB

...IMS Databases

IMS A

PST

PST

MVS

ODBA

Page 20: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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

Page 21: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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

Page 22: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

CIMS INIT call for IMSA

APSB call for PSBX

Database calls

CALL AERTDLI(GU,AIB,IOAREA,...)...

SRRCMIT

DPSB call

CIMS TALL call

ODBA example – One thread

Connector example:

– Establishes a connection

– Schedules a PSB

– Does some DLI calls

– Commits the work

– Terminates the PSB

– Terminates the connection

Page 23: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

Main taskCIMS INIT call for IMSAAttach task 1 and task 2

CIMS TALL call

Task 1APSB callDatabase callsSRRCMITDPSB call...APSB callDatabase callsSRRCMITDPSB call

Task 2APSB callDatabase callsSRRCMIT...Database callsSRRCMIT...DPSB call

ODBA example – Multiple threads

Connector example:

– Establishes a connection

– Creates two threads

– Schedules multiple PSBs in task 1

– Commits multiple times in both tasks

– Terminates the connection

Page 24: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

• 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

...IMS Databases

IMSWLM Addr. Space

...DB2 Databases

DB2

PGMAAPSBDL/ISQL

DPSB PREP

CIMS INIT

CIMS TALL

z/OSDRDA Client

EXEC SQL CALL PGMA

SRRCMIT

ODBA DB2 stored procedure example

Page 25: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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

Page 26: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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

Page 27: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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 CODEPROGRAM ENTRY - IOPCBCALL "CBLTDLI" USING CHKP...

Page 28: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

DBCTL Summary …

Performance

–Up to 999 concurrent applicationsSeparate 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

Page 29: IBM IMS DB Control Overview (DBCTL)

© 2009 IBM Corporation

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