la ims 11-odbm

36
© 2009 IBM Corporation IMS V11 Open Database IMS User Group November 11-12,2009 Kenny Blackman [email protected]

Upload: ibm-ims

Post on 18-Nov-2014

1.009 views

Category:

Documents


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: La ims 11-odbm

© 2009 IBM Corporation

IMS V11 Open Database IMS User Group November 11-12,2009

Kenny [email protected]

Page 2: La ims 11-odbm

© 2009 IBM Corporation2

DB2 SPAppl Pgm

JDBCAddress Space

Using RRS

CCTL BAppl Pgm

DRA

CICS AAppl Pgm

JDBC

DRA

WAS z/OSAppl Pgm

JCAAddress Space

Using RRS

ODBA

ODBA

CCTL ODBA and DRA Application Review

IMS

Database

DBServices

DR

A

Application ProgramCTL

ServicesRRS=Y|N

TMServices

Thread 1

Thread 2

Thread 1

Thread 2

z/OS LPAR

Page 3: La ims 11-odbm

© 2009 IBM Corporation3

IMS Open Database

Solution Statement– Offer scalable, distributed, and high-speed local access to IMS database resources

Value– Business growth

• Allow more flexibility in accessing IMS data to meet growth challenges– Market positioning

• Allow IMS databases to be processed as a standards-based data server

Key differentiators– Standards-based approach (Java Connector Architecture, JDBC, SQL, DRDA)– Solution packaged with IMS

Enables new application design frameworks and patterns– JCA 1.5 (Java EE)– JDBC

Page 4: La ims 11-odbm

© 2009 IBM Corporation4

Open Database consists of three components:– Open Database Manager – CSL component– IMS Connect – Open Database API

Open Database Topics

Page 5: La ims 11-odbm

© 2009 IBM Corporation5

Open Database Manager functions– Common Service Layer address space

• Can be used to reduce ODBA Client action U113 abends – Implements the DRA interface – Supports Two-phase commit semantics

• RRS=Y RRS provides sync point coordinator role – Supports Single-phase commit semantics

• RRS=N ODBM provides CCTL sync point coordinator role

Open Database Manager

Page 6: La ims 11-odbm

© 2009 IBM Corporation6

ODBM

IMS

Database

Control Services Database manager

DR

A

z/OS

ODBMODBMSCIClient

SCI

SCI

API

SCI

API

OM

Page 7: La ims 11-odbm

© 2009 IBM Corporation7

CSL ODBM CCTL ODBA and DRA

IMSplex

Database

DBServices

DR

A

Application ProgramCTL

ServicesRRS=Y|N

TMServices

Thread 1

Thread 1

ODBMCCTL

RRS=N

DRA

ODBMRRS=Y

ODBA

SCIOM

z/OS LPAR

SCI

API

SCI

API

Page 8: La ims 11-odbm

© 2009 IBM Corporation8

ODBM auto-(re) connect

IMS2

OD

BA

IMS1

SCI

ODBM

IMS4

LPAR 1

IMSPLEX(NAME=PLEX1)

PLEX1

PLEX1

PLEX1

PLEX1

SCI notification for IMS2ODBM re-connects

No notification for IMS4 ODBM does not re-connectmust use an ODBM command

Page 9: La ims 11-odbm

© 2009 IBM Corporation9

ODBM – Security

ODBM does not perform any user authentication or authorization– Assumes the end Client Userid associated with an allocate PSB request has been

authenticated.

For ODBA DRA DFSPBxxx– ODBASE= APSB security and ISIS= IMS RAS security

• ODBM creates ACEE for ODBM Thread TCB

For CCTL DRA DFSPBxxx– ISIS= IMS RAS security

• ODBM passes Client UserID/GroupName to access the PSBs

Page 10: La ims 11-odbm

© 2009 IBM Corporation10

ODBM

RRS=Y

SAF APSB Security

ACEEUserid

PSB Schedule Time

PSB 1 Userid

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

IMS

Connect

ODBM

Client

Open DB API Type 4

TCP/IPConnectionUSERIDPassword

IMS

AuthenticatedUSERID

Page 11: La ims 11-odbm

© 2009 IBM Corporation11

ODBM

RRS=N

RAS PSB Security

ACEEUserid

ACEEUserid

PSB Schedule Time

PSB 1 Userid

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

IMS

Connect

ODBM

Client

Open DB API Type 4

TCP/IPConnectionUSERIDPassword

IMS

AuthenticatedUSERID

USERIDGroup

Page 12: La ims 11-odbm

© 2009 IBM Corporation12

ODBM ODBA Compatibility Support

IMS2

V10

OD

BA

ODBM

03

IMS1

V9

•WAS•z/OS•ODBA•Client

SCI

ODBM

02

OD

BA

•DB2•SP•ODBA•Client

IMS3

V11

ODBM

01

OD

BA

LPAR 1

PK66020

PK66022

ODBMNAME=ODBM03

IMSPLEX NAME=PLEX1

IMSPLEX NAME=PLEX1

IMSPLEX(NAME=PLEX1)

Page 13: La ims 11-odbm

© 2009 IBM Corporation13

Timeouts

ODBMTMOT= Defines the amount of time that IMS Connect waits:: – A response message on connections with ODBM– An initial input message from TCP/IP client applicationType 4TCP/IPDRDA

ApplicationProgram

Requestor

TCP/IP

DRDA

IMS

Connect

DRDA

PORT

ODBM

Type 4TCP/IPDRDA

ApplicationProgram

Requestor

TCP/IP

DRDA

HWSJ2530W

Back out In-Flight work

IMS

DR

A

Page 14: La ims 11-odbm

© 2009 IBM Corporation14

IMS Connect and ODBM as DRDA Application Server

IMS

Database

Control Services Database manager

DR

AODBM

IMS

Connect

DRDA

PORT

Open DB APIType 4TCP/IPDRDA

ApplicationProgram

Requestor

TCP/IP

DRDA

z/OS

Page 15: La ims 11-odbm

© 2009 IBM Corporation15

IMS Connect HWSCFGxx Configuration Member . . .

HWS=(ID=HWS1,XIBAREA=100,RACF=N)TCPIP=(HOSTNAME=TCPIP,PORTID=(9999,9998,LOCAL),

EXIT=(HWSSMPL1,HWSCSLO1,HWSSOAP1))DATASTORE=(ID=IMS1,GROUP=XCFGRP1,MEMBER=HWS1,

TMEMBER=IMS1,DRU=HWSYDRU0,APPL=APPLID1,RRNAME=RTPIPE)

IMSPLEX=(MEMBER=IMSPLEX1,TMEMBER=PLEX1)ADAPTER=(XML=Y)

Example of ODACCESS statement

ODACCESS=(ODBMAUTOCONN=Y,ODBMTMOT=6000,DRDAPORT=(ID=1111,KEEPAV=5,PORTTMOT=50),

IMSPLEX=(MEMBER=ICON1,TMEMBER=PLEX2))

OTMA

OM

ODBM

Page 16: La ims 11-odbm

© 2009 IBM Corporation16

IMSPLEX = CSLPLEX1 and CSLPLEX2

IMS

CTL

DR

A/O

DB

A

ODBM

OM

9999

9998

IMS

CONNECT

DRDA

PORT

1111

SCI

DR

A/O

DB

A

OTMA

•ODBM01OD•PLEX2

•B1OM•PLEX1

•IMSPLEX1•PLEX1

•IMS2•PLEX2

•HWS1•XCFGRP1

•ICON1•PLEX2

z/OS B

ODBM

OM

SCI

•SCB1SC•PLEX1

IMS

CTL

•IMS1•PLEX1•XCFGRP1

•SCB2SC•PLEX2

OM

•B2OM•PLEX2

Page 17: La ims 11-odbm

© 2009 IBM Corporation17

IMS Solutions for Java DevelopmentIMS 11 Open Database APIs JDBC 3.0

– IBM SDK V5 z/OS •CICS,DB2,WebSphere

– IBM SDK V6 z/OS•IMS TM

IMS 9,10 Java Drivers JDBC 2.1 IBM SDK V1.3.1 IMS 9IBM SDK V1.4.2 IMS 9IBM SDK V5 z/OS IMS 10

MPP

BMP

IFP

CEETDLI Interface

JNI

Base

App

DB

JDBC / SQL

IMS JavaApp

DLIDatabase

View

CEETDLI Interface

JNI

Base

App

DB

JDBC / SQL

IMS JavaApp

DLIDatabase

View

JMP JBP

CEETDLI Interface

JNI

Base

App

DB

JDBC / SQL

IMS JavaApp

DLIDatabase

View

CEETDLI Interface

JNI

Base

App

DB

JDBC / SQL

IMS JavaApp

DLIDatabase

View

Stored Procedure EJB

IMS DB

DRA

ODBA

JCICSCEETDLI Interface

JNI

Base

App

DB

JDBC / SQL

IMS JavaApp

DLIDatabase

View

Java Virtual Machine

Java Virtual Machine Java Virtual

Machine

Java Virtual Machine

IMS DB Resource Adapter and DistributedUniversal DB Resource AdapterType 2 and Type 4

IMS DB Resource AdapterUniversal JDBC and DL/IType 2 and Type 4

IMS DB Resource AdapterUniversal JDBC and DL/IType 2 and Type 4

IMS Java Dependent Region Resource AdapterUniversal JDBC and DL/IType 2 and Type 4

Page 18: La ims 11-odbm

© 2009 IBM Corporation18

AERTDLI Interface CEETDLI Interface AIBTDLI Interface

JNI

Base

TM API

DB API

Java Class Libraries for IMS

Assembler Layer Interfaces to IMS

Java class libraries for IMSIMS uses JNI to interoperate between Java and IMS DL/I

SQL XML-DB XQuery

Application

JDBC Driver

JCA resource adapter

Application

Only AIBInterface

Page 19: La ims 11-odbm

© 2009 IBM Corporation19

IMS JavaMetadata classes

COBOLcopybooks

Control statements

DLIModel Utility

PSB

DBD

package samples.dealership;

import com.ibm.ims.db.*;

import com.ibm.ims.base.*;

public class AUTPSB11DatabaseView extends DLIDatabaseView {

// The following DLITypeInfo[] array describes Segment: DEALER in PCB: AUTOLPCB

static DLITypeInfo[] AUTOLPCBDEALERArray= {

new DLITypeInfo("DealerNo", DLITypeInfo.CHAR, 1, 4, "DLRNO"),

new DLITypeInfo("DealerName", DLITypeInfo.CHAR, 5, 30, "DLRNAME"),

new DLITypeInfo("DealerCity", DLITypeInfo.CHAR, 35, 10, "CITY"),

new DLITypeInfo("DealerZip", DLITypeInfo.CHAR, 45, 10, "ZIP"),

new DLITypeInfo("DealerPhone", DLITypeInfo.CHAR, 55, 7, "PHONE")

};

static DLISegment AUTOLPCBDEALERSegment= new DLISegment

("DealerSegment","DEALER",AUTOLPCBDEALERArray,61);

...

// An array of DLISegmentInfo objects follows to describe the view for PCB: AUTOLPCB

static DLISegmentInfo[] AUTOLPCBarray = {

new DLISegmentInfo(AUTOLPCBDEALERSegment,DLIDatabaseView.ROOT),

new DLISegmentInfo(AUTOLPCBMODELSegment,0),

new DLISegmentInfo(AUTOLPCBORDERSegment,1),

new DLISegmentInfo(AUTOLPCBSALESSegment,1),

new DLISegmentInfo(AUTOLPCBSTOCKSegment,1),

new DLISegmentInfo(AUTOLPCBSTOCSALESegment,4),

new DLISegmentInfo(AUTOLPCBSALESINFSegment,5)

};

...

}

If you can read this you do not need glasses;

however this is just silly writting to represent the control statements that

are the input to the utility.

XML schemas

DBD metadata

PSB metadata

DAS commandsDeployable IMS

DB Web Service artifacts

IMS Enterprise Suite DLIModel Utility

EARWSDL

Page 20: La ims 11-odbm

© 2009 IBM Corporation20

IMS Enterprise Suite DLIModel Utility Plug-in IMS database visualization tool

– Visualize an entire IMS PSB• Can view and print each PCB individually

Hierarchy, segments, fields, types, etc

IMS database metadata generation tool– Generates the necessary metadata that is

consumed at runtime by IMS JDBC driver and XML-DB support

• Database metadata• XML schema• EAR and WSDL for IMS DB Web Services

Bottom-up tooling approach– Parses PSB and DBD source

• Optionally handles COBOL copybook definitions of segments

An Eclipse 3.x plug-in

Page 21: La ims 11-odbm

© 2009 IBM Corporation21

SQL and IMS ConceptsA

Segment(Table)

Fields(Columns)A11|A2|A3

B

B1

C

C1 Segment Instances(Table Row)

Segment Key(Table Primary Key)

Page 22: La ims 11-odbm

© 2009 IBM Corporation22

Query governance – join operations

A

EDB

C F G

Logical Child

Logical Parent

Page 23: La ims 11-odbm

© 2009 IBM Corporation23

ResultSet

ROW

010100110101010110111010

101101010111010110000010101111010001011001010101101010110

SQL Parsing

SELECT Dealer.Name, Dealer.Phone, Order.LastNameSQL

SSA List DEALER *DMODEL (MSRP GT50000)ORDER (DATE GE20030501&

DATE LE20030531)

IOAreaDEALER ORDER

001010111010110101001010001010110111

101001010010101110101011001101010010100111110101110101100101011010101110101100001010101101010001000100101010001010101110101010100100101010110111101101010101100000010101111010101010101000000101011100101001011101010100100101101010010111010100011000100010110101101101010111011010010010101010010101

Page 24: La ims 11-odbm

© 2009 IBM Corporation24

Virtual Foreign Key fields• IMS Java maintains the unique keys for segments up to the root• SQL SELECT, INSERT, UPDATE, and DELETE queries

SQL syntax for IMS appears similar to standard SQLUpdatable Result Sets

– Update or delete of current rowMetadata Discovery

– Access the IMS Java Metadata classes generated by the DLIModel utilityautoCommit support

– updates are committed as they happensetFetchSize

– An application can set the expected or desired number of rows to be returned

IMS 11 Open Database API JDBC enhancements

Page 25: La ims 11-odbm

© 2009 IBM Corporation25

C

C2

Foreign keysReferential constraint between two tablesUsed to link information together

INSERT INTO PCB.C (A, B, C) VALUES (‘a1', ‘b1', ‘c2‘)

A

A11|A2

C2|a1|b1a1|b1Virtual Foreign Keys

B

B1

C

C1C

C2

Virtually represent foreign keys in each segment which are comprised of keys of each parent segment

Page 26: La ims 11-odbm

© 2009 IBM Corporation26

C

C2

Updatable Result Sets Example

rs = st.executeQuery("SELECT A2 FROM PCB.A");

while(rs.next()){rs.updateString(“A2", “A22");rs.updateRow();

}

A

A11|A22

B

B1

C

C1A

A11|A22

autoCommit occurs when the result set is closed or has no more rows

Query IMS Database

While processing result set

update IMS Database

Page 27: La ims 11-odbm

© 2009 IBM Corporation27

Metadata Discovery API

JDBC includes methods for querying the metadata of a relational database– To get table definitions, column data types, etc

With DB2, for example, these methods would access the DB2 Catalogue

In IMS 11, these methods are implemented by the Universal Drivers– Access the IMS Java Metadata classes generated by the DLIModel utility

Enables JDBC tooling to automatically discover the relational view and metadata of IMS DBs

– Can develop and deploy applications based on IMS databases and/or DB2, etc

Page 28: La ims 11-odbm

© 2009 IBM Corporation28

setFetchSize and Network Efficiency

An application can set the expected or desired number of rows to be returned

Especially relevant for a distributed client to maximise network efficiency– The driver will build a request for this number of rows to be returned– And send it to ODBM (via IMS Connect) who will interact with IMS to retrieve this

number of rows (if available) – One network interaction will retrieve multiple rows– If the remote client application continues to ask for more rows, the driver will submit a

request for another set of rows to be returned

This facility is available in all the drivers (more details later)– Universal DB Resource Adapter – for JDBC, and for CCI SQL or DL/1 access– Universal JDBC Driver – Universal DL/1 Driver

Page 29: La ims 11-odbm

© 2009 IBM Corporation29

Other New JDBC Features Supported

autoCommit support– Can set autoCommit on or off

• With autoCommit on, updates are committed as they happenNot supported for JMP/JBP or CICSNot exploited with updatable result set until it is closed

LocalTransaction or XATransaction Support– XATransaction support allows two phase commit when multiple drivers and resource

managers are involved in a JCA 1.5 environment

Page 30: La ims 11-odbm

© 2009 IBM Corporation30

Universal DB

Resource AdapterJCA 1.5

WAS (any platform)

Universal Drivers

Distributed

DLI

JDBC

IMS Universal Drivers

System z

z/OS A

z/OS B

IMS DB

IMS

ODBM

IMS DB

IFL Linux

WAS/zUniversal

DB ResourceAdapter

JCA 1.5

IMSIMS

ConnectConnect

T

C

P

I

P

UniversalDB

ResourceAdapter

JCA 1.5

WAS

Linux z

Any Java Runtime Platform

CICS

DB2

UniversalJDBC

DLI

UniversalJDBC

DLI

IMS TM

IMS

ODBM

IMS

ApplIMS DB

Network Clients

SNATCP/IP Universal

JDBC

Type 4

Type 4

Type 4

Type 4

Type 2

Type 2

Type 2

Type 2

Page 31: La ims 11-odbm

© 2009 IBM Corporation31

Requirement – IMS DB as a service

Web 2.0 support for IMS data– Develop an IMS RESTful service /

feed• Generate Meta files from IMS

DB• IMS Web 2.0 Editor in

InfoSphere MashupHub

Page 32: La ims 11-odbm

© 2009 IBM Corporation32

IMSIMSIMS

IMSMainframe

IMSIMSIMS

IMSMainframe

IMS Open Database

J2EE

JDBC Universal drivers

DLI

J2EEJDBC Universal

driversDLI

Demo

Page 33: La ims 11-odbm

© 2009 IBM Corporation33

Universal Drivers …

Page 34: La ims 11-odbm

© 2009 IBM Corporation34

Universal Drivers …

Page 35: La ims 11-odbm

© 2009 IBM Corporation35

Universal Drivers …

Page 36: La ims 11-odbm

© 2009 IBM Corporation36

Open Database Capabilities– Supports open-standards for connectivity to online IMS databases

Across z/OS LPARsDirect access from distributed platforms

– Provides an environment that manages access to online IMS databases– Provides Open Database APIs

• Ease application development access to IMS databases

Summary