ims fundamentals - connecting to other subsystems
TRANSCRIPT
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1
© Copyright IBM Corporation 2008
Connecting IMS to Other Subsystems
© Copyright IBM Corporation 2008
Objectives
• Learn about IMS Multiple Systems Coupling (MSC)• Learn about IMS/CICS/VTAM Inter System Communication
(ISC)• Understand how IMS TM Transactions can access DB2 as an
external Database manager• Understand how CICS Transactions can access IMS as an
external Database manager• Learn how a Two Phase commit process is used when IMS
Databases are accessed by CICS transactions
© Copyright IBM Corporation 2008
IMS ( A )
San Francisco
IMS ( B )
Chicago
IMS ( C )
New York
Local Databases
Local Databases
Local Databases
Distributed Databases
© Copyright IBM Corporation 2008
IMS ( A )
Head Office
IMS ( B )
Sales Office
IMS ( C )
Plant Office
Distributed Applications
© Copyright IBM Corporation 2008
Multiple Systems Coupling (MSC)
• Allows for the distribution of IMS transactions between IMS subsystems– Transactions entered from one IMS subsystem may be processed on
another IMS subsystem• IMS-to-IMS configuration only
– Each system is a complete IMS subsystem• Transactions may be "routed" via:
– SNA VTAM SDLC Link– Channel-to-Channel (CTC) Adapter– Main Storage-to-Main Storage (MTM) Link (within one z/OS image)
• Routing is automatic via IMSGEN process– No application program or end-user need be involved
© Copyright IBM Corporation 2008
IMS ( A )
MSGQ
VTAM
SystemLog
MessageQueue
IMS ( B )
MSGQ
VTAM
SystemLog
MessageQueue
MSC Message Routing
• Destinations are modifiable via user exits:– Too many, or duplicate names– Destinations chosen dynamically
• Each subsystem has its own MTO and OLDSs
© Copyright IBM Corporation 2008
IMS ( A )
VTAM
N C P
IMS ( B )
VTAM
N C P
User-written Program
VTAM
N C P
CICS/TS
VTAM
N C P
CICS/VSE
VTAM
ICA
SNA
Inter-System Communication (ISC)
© Copyright IBM Corporation 2008
IMS ( A )
TRAN1
GU
ISRTALT-PCB
ISRT
IMS ( B )
TRAN2
GU
TRAN1
MSGQ MSGQ
DL/IDB( S )
ISC Message Routing (1 of 2)
© Copyright IBM Corporation 2008
IMS ( A )
TRAN1
GU
ISRTTRAN2
IMS ( B )
TRAN2
GU
ISRT
TRAN1
MSGQ MSGQ
DL/IDB( S )
ISC Message Routing (2 of 2)
© Copyright IBM Corporation 2008
CICS
TRAN1
EXEC CICSSTART
TRAN2...
EXEC CICSRETRIEVE..
TRAN3
EXEC CICS SEND..
EXEC CICSRETRIEVE..
TRAN4
IMS
TRAN2
GU
ISRT
TRAN5
GU
ISRT
DL/IDB( S )
CICS-IMS Connectivity
• CICS-to-IMS scenarios:
© Copyright IBM Corporation 2008
IMS ( A ) IMS ( B )
RYO VTAMPROGRAM
MULTIPLE SYSTEMS COUPLING (MSC):
COMMUNICATIONS LINE
CHANNEL-TO-CHANNEL
MEMORY-TO-MEMORY
CICSIMS ( C )
INTER-SYSTEM COMMUNICATION (ISC):DATABASES DATABASES
MSGQMSGQ
MSC / ISC Summary
© Copyright IBM Corporation 2008
DCCTL Region Type
• Like an IMS Transaction Manager Region without the databases
• Two primary uses:– Use as a router in a multiple system configuration such as MSC– A system in which no database activity is IMS/DB
© Copyright IBM Corporation 2008
CICSIMSDL/I BATCH
VSAM DataClusters
HierarchicDatabases
Relational Databases
DB2 DL/I VSAM
Multiple Database & Transaction Managers
• Data is accessible from multiple environments
© Copyright IBM Corporation 2008
IMS CTL
TransactionManager
orDCCTL
SSM = .........
DB2 ADB2 B
( all DB2s )Application
EXEC SQL Thread
MPP
TX
LTERM
DB2 B
DRDA
DB2 A
ƒ Thread from MPP to DB2 necessary for:
1 Process SQL requests
2 Give back the results
IMS/TM Connections to DB2
• IMS Transactions can use DB2 as an External Database Manager
© Copyright IBM Corporation 2008
IMS Control Region
TransactionManager
orDCCTL
DB2 B
Attachment
SSM = .........
DB2 ADB2 B
( all DB2s )
DB2 A
ƒ Attachment from CTL to DB2 necessary for:
1 2 Phase Commit (serializing of Sync Point Processing) or Single Cycle Commit
2 Commands from IMS to DB2
IMS/TM Connections to DB2...
© Copyright IBM Corporation 2008
IMS Attachment Facility Supports …
• Connection between IMS Subsystems and one or more DB2 Subsystems
• Communication between IMS Users and DB2– Command Thread– Transaction Threads
• Application Programming Interface– DB2 Precompiler– Language Interface
• Coordinated Recovery/Restart– Unit of Work/Unit of Recovery– Two-Phase Commit Protocol– Indoubt Thread Resolution
© Copyright IBM Corporation 2008
IMS
z/OS
IRLM DB2
IMS/TM
DL/ISAS DBRC MSG IFP BMP IRLM
DL/IBATCH IRLM SSAS DBSAS
DB2LOG
DB2CATLG
DB2TABLE
BSDS DIR
IMSLOG
IMSDB (S)
RECON
z/OS Environment
• IMS and DB2 must be on same z/OS• One DB2 S/S can be connected to multiple IMSs• One IMS S/S can connect to multiple DB2s• One IMS dependent region can connect to multiple DB2s• One application program can access only one DB2 per schedule
© Copyright IBM Corporation 2008
IMS DB2-Related Commands
• Subsystem Commands:/DISPLAY SUBSYS xxxx
displays status of connections/STOP SUBSYS xxxx
disconnects DB2 from IMS/START SUBSYS xxxx
reconnects DB2 to IMS after /STOP
• Subsystem Request Command:/SSR-Display ....
DB2 Command "DISPLAY ...." sent to DB2
© Copyright IBM Corporation 2008
IMS-DB2 System Definition
• No specific IMSGEN or DB2 Installation requirements, except defining Programs and Transactions to IMS
APPLCTN PSB=PRGMA TRANSACT CODE=TRANA
• Must Define the IMS-DB2 Connections– Subsystem Member (SSM) in IMS.PROCLIB
• DB2 Pre-compiler:– Checks syntax of SQL calls– Replaces EXEC SQL with CALL DSNHLI– Creates DB Request Module (DBRM)– Includes timestamp in source and DBRM
• Compile "Modified" Source– CALL DSNHLI
• Link-Edit with IMS call interface module (DFSLI000)– Entry point is DSNHLI
© Copyright IBM Corporation 2008
z/OS
IMS/DBCTL
DBRC DLISAS
IMS BATCHBMP (S)
RECON
CORPORATEDATA
IMS BATCHBMP (S)
FPDEDB
OLDS
WADS
DL/IDB(S)
BATCHDB(S)
CICSDL/I
DB(S)
DBCTL Subsystem CICS Subsystem
APPL
APPL
DL/I
CICS User
Database Control (DBCTL) Subsystem
• CICS Transactions can use IMS as an External Database Manager
© Copyright IBM Corporation 2008
Database Control (DBCTL) Subsystem
• An IMS/DB stand-alone subsystem• Supports Full-Function databases and Fast Path DEDBs• Maximum 4095 concurrent BMP Address-spaces
– Total BMPs + CICS transaction "threads"• BMP address-spaces may contain:
– Batch programs (converted DBBBATCH/DLIBATCH)– Online Image Copy (OLIC) jobs– Fast Path DEDB utilities
• z/OS Console for operator control:– START, SHUTDOWN, RESTART of DBCTL– Connection from CICS to DBCTL
• Concurrent connections from multiple CICS subsystems
© Copyright IBM Corporation 2008
z/OS
S/S IMS DB/DC Sub-system
CICS
TRANSACTION
MANAGER
MSDB (S)
IMS/TM DLISAS DBRC
MPR(S) IFP(S)
DEDBDB(S)
DL/I
DB(S)RECONOLDS
WADS
IMS DB/DC used for DBCTL Services
• IMS DB/DC subsystem provides DBCTL Services– Connected CICS(s) have concurrent database access without Data
Sharing (IRLM not needed)– MSDBs are only known to IMS TM transactions
© Copyright IBM Corporation 2008
CONNECT
DRA
CICSCICS
PST 1
.
.
.
.
PST 4
PST 3
PST 2
PST nPST n
.
.
.
.
.
.
.
PST 4
PST 3
PST 2
IMS - CONTROL - REGION& CHECKPOINT RESTART
T h r e a d - T C B
T h r e a d - T C B
BMP
CICS / IMS Interface Structure
© Copyright IBM Corporation 2008
Two PhaseCommit
C I
C S
CICS-Syslog
CICS relatedInformation
D
B C
T
L
O L D S
DBCTL relatedInformation
Logstreams defined toz/os - Logger as - CF structure or - Dasd Datasets
CICS/DBCTL Two Phase Commit Overview
© Copyright IBM Corporation 2008
Phase 2Phase 1
Phase 2Phase 1
CICSCICS
IMSIMS
10
11
1
old point ofconsistency
4
Syncpoint
5
6
Begin ofcommit
9
Instant ofcommit
14
new point ofconsistency
3
2
DATA
aabacked
outat
restart
bbbacked
outat
restart
ccindoubt at
restart;either
backed outor
commited
ddcommitted
atrestart
Unit of RecoveryUnit of Recovery
x'5607'
Sched
x'5610'
Prepare
x'3730'
Commit
12
13
x'5612'
End Phase 2
8
7
x'5611'
End Phase 1
CICS/DBCTL Two Phase Commit Process
© Copyright IBM Corporation 2008
CICS-DBCTL Summary (1 of 2)
• Performance– Up to 999 concurrent applications
• Separate subsystems and address-spaces provide VSCR• Common logging facility over CICS journal:
– Dual logging option– User-specified number of log data sets– Automatic archiving under DBRC control– Combined logging versus separate off-line batch job logging
• 2 Phase Commit Process is needed to insure data integrity– this process is managed by CICS
© Copyright IBM Corporation 2008
CICS-DBCTL Summary (2 of 2)
• 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
© Copyright IBM Corporation 2008
Application using RRS
ODBA
Application using RRS
ODBA DL/I
IMS DBCTL or
IMS/DB/TMDBRC
ODBA Services
Managed by z/OS RRS
Open Database Access
• Callable Interface used to issue DL/I calls to an IMS DB subsystem
© Copyright IBM Corporation 2008
Unit Summary
• MSC (Multiple Systems Coupling) supports distributing transaction processing among many IMS subsystems
• ISC (Inter System Communications) supports distributing application flows among IMS and non-IMS subsystems (for example, CICS)
• IMS TM Transactions can access DB2 as an external Database manager
• CICS Transactions can access IMS as an external Database manager
• When IMS is accessed by CICS transactions, a 2 phase commit process is usually required for data integrity reasons– a 2 phase commit process is also used when IMS transactions
access DB2 data