IMS Open Database (ODBM) Best Practices - IMS UG May 2012 DFW

2,567 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,567
On SlideShare
0
From Embeds
0
Number of Embeds
21
Actions
Shares
0
Downloads
61
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

IMS Open Database (ODBM) Best Practices - IMS UG May 2012 DFW

  1. 1. Advanced Technical Skills (ATS) North AmericaIMS Open DatabaseBest PracticesKenny BlackmanIBM IMS ATSkblackm@us.ibm.com © 2010 IBM Corporation
  2. 2. Open Database Components Operations Structured Manager Call (OM) Interface (SCI) SCI SCI API API IMS IMS ODBA/CCTL S Open DB Connect DRDAPORT Open DB ODBM C IMS Universal Manager TCP/IP Client I (ODM) Type-4 DRA DRDA/ DLI Drivers DDM SCI SCI DDM z/OS z/OS LPAR 2 LPAR 1
  3. 3. LPAR 1 DDM DL/I OpenJava TCP/IP IMS SCI Database PCApp IMS IMS DB DL/I Connect Manager (ODBM) DDM SCIOpen LPAR 2Database Open Database PCrequest Manager IMS IMS DBflow (ODBM) SCI DDM DL/I LPAR 3 Open Database PC DL/I IMS IMS DB Manager (ODBM)
  4. 4. CSL IMSPlex startup/shtudown• Start as a z/OS started procedure or as JCL• Start all SCIs.• Start all OMs.• Start CQS if using a resource structure.• Start all RMs.• Start all IMS control regions• Stop all IMS control regions• Stop all RMs.• Stop CQS• Stop all OMs• Stop all SCIs.• STOP CSLjob command • STOP (P) cslobname• CSL SHUTDOWN command • F scijobname, SHUTDOWN …• CSLZSHUT API • Programming interface
  5. 5. Reminder of BPE Address Space Setup BPE Configuration Member BPE Address Space JCL BPE Configuration Member BPE Configuration Member • Shared or dedicated // EXEC PGM=BPEINI00, .... • Shared or dedicated • Shared or dedicated • Details of traces PARM= … • Details of traces • Details of traces Exit Lists • Pointers to BPECFG= • Pointers to Exit Lists • Pointers to Exit Lists BPEINIT=specific module xxINIT=suffix Exit List Member PARM1=initialisation overrides Exit List Member byExit type and component exit List Member by exit type and component by exit type and component • Dedicated or shared Initialization Member • Dedicated or shared • Shared or dedicated CSLDIxxxDFSPBxxx • Name of BPE Address Space • Plex name • Other parameters “Configuration” Member • Configuration parameters • CSLDCxxx
  6. 6. ODBM BPE Trace Tables• CSL • used for routines that are common to all CSL managers• ERR • used to trace errors that occur within the ODBM address space• ODBM • used for general ODBM processing flow• PLEX • used for ODBM processing for a specific IMSplex• BPE Commands F ODBM,DISPLAY TRACETABLE NAME(*) OWNER(ODBM) F ODBM,UPDATE TRACETABLE NAME(*) OWNER(ODBM) LEVEL(HIGH) EXTERNAL(YES)
  7. 7. ODBM BPE Configuration PROCLIBMember ExampleTRCLEV=(*,LOW,ODBM) /* DEFAULT ODBM TRACES TO LOW */TRCLEV=(CSL,HIGH,ODBM) /* CSL TRACE ON HIGH */TRCLEV=(ODBM,HIGH,ODBM) /* ODBM GENERAL TRACE ON HIGH */TRCLEV=(PLEX,HIGH,ODBM) /* IMSPLEX TRACE ON HIGH */## USER EXIT LIST PROCLIB MEMBER SPECIFICATION#EXITMBR=(CSLEXOB0,BPE) /* SPECIFY PROCLIB DATASET */ /* MEMBER CSLEXOB0 AS BPES */ /* USER EXIT LIST MEMBER */EXITMBR=(CSLEXDM0,ODBM) /* SPECIFY PROCLIB DATASET */ /* MEMBER CSLEXDM0 AS ODBMS */ /* USER EXIT LIST MEMBER */
  8. 8. ODBM User Exit List PROCLIB Member• EXITMBR= specifies PROCLIB member to define ODBM user exits• User Exit List Statement • EXITDEF = (TYPE=type, EXITS=(exitname1, exitname2, ...) [,ABLIM=limit], COMP=ODBM) • TYPE=type (CLNTCONN, INITTERM, INPUT, or OUTPUT) • EXITS=(exitname) • list of one or more user exit module names. • ABLIM=limit • limit for the exit type being defined. • decimal number from 0 to 2147483647 F ODBM,DISPLAY USEREXIT … F ODBM,REFRESH USEREXIT …
  9. 9. ODBM Interfaces: ODBA and DRA Operations Structured IMSplex Manager Call ODBM D (OM) Interface S (SCI) C CCTL R SCI SCI I RRS=N A API API Thread 1 CTL Application DB TM DRA Program Services Services Services RRS=Y|N Thread 1 O S C ODBM D I RRS=Y B IMS DB A• ODBM can be started with either RRS=Y or RRS=N• RRS=Y for coordinated update• RRS=N for inquiry only and use PCB with PROCOPT=G or use for Local transaction
  10. 10. THREADS and PSTs IMSplex PSB Connection CCTL Thread(PST) BMP/JBP ODBM CTL MPP/JMP/IFP Application DB TM DRA PSB Connection Services Program Thread (PST) Application Services Services Program RRS=Y|N PSTs ODBA PSB Connection Thread(PST) IMS DB• ODBM,CICS,ODBA MAXTHRD and Dependent Regions• IMS MAXPST,MAXREGN
  11. 11. IMS Open Database and Distributed Sync Point• Use of RRS with ODBM is optional • RRS=Y|N parm for ODBM start-up • RRS=Y is needed to supported Distributed Two-Phase Commit • RRS=Y in IMS Connect and ODBM and IMS Control Region LPAR A z/OS Distributed IMS Connect Parent UOR WebSphere RRS T RRS=Y C T S S J P C C O D Start UOW I I Coordinated P A B P I P C P LPAR B RRS ODBM RRS=Y IMS S O RRS=Y IMS Note: An individual ODBM has either C D Child I B DB RRS=Y or RRS=N, but can not A support both concurrently
  12. 12. ODBM Availability IMSPLEX(NAME=PLEX1) IMS Connect IMS1 01 ODBM 02 IMS ODBM IMS2 Connect 01 02 z/OS LPAR 1 12
  13. 13. ODBM Availability IMSPLEX(NAME=PLEX1) IMS Connect IMS1 01 ODBM 02 z/OS LPAR 1 Data Sharing ODBM cannot cross LPARS IMS ODBM IMS2 Connect 01 02 z/OS LPAR 2 13
  14. 14. IMS 11 Connect and ODBM DRDA Server DRDA SCI OM DRDA IMS Application TCP/IP ServerIMS Universal Driver Socket IMS Connect DLI IMS DRDA DDM calls Connection TCPIP Application ODBM PSB SCI DRA Requestor DRDA CCTL Connection PORT ODBA TCP/IP Client z/OS
  15. 15. IMS Connect Startup ProcHWSCFG00********************************************************* IMS Connect example for IMS Universal drivers and DRDA client support********************************************************HWS (ID=IMSCON01,PSWDMC=R,RRS=Y,RACF=Y,XIBAREA=20)TCPIP (HOSTNAME=ZOSTCPIP,MAXSOC=2000,ECB=Y,IPV6=Y,NODELAY=Y, RACFID=RACFID)ODACCESS (DRDAPORT=(ID=1111,KEEPAV=5),DRDAPORT=(ID=2222,KEEPAV=10,PORTTMOT=500)),IMSPLEX=(MEMBER=IMSPLEX1,TMEMBER=PLEX1),ODBMAUTOCONN=Y,ODBMTMOT=50000
  16. 16. IMS Connect HWSCFGxx Example … OTMA For OM SCI OM SCI Transaction • HWS1 Processing • XCFGRP1 9999 B1OM SCB1SC 9998 B2OM SCB2SC DRDA DRA/ODBA PORT IMS2 IMS1 1111 CTL CTL For ODBM ODBM • ICONOD2 IMS1 DRA/ODBA Usage • PLEX2 ODBM IMS2 XCFGRP1 OM For IMS Control • ICONCC1Center Usage • PLEX1 ODBM02OD PLEX2 PLEX1 IMS CONNECT (belongs to both plexes)
  17. 17. Configure TCP for z/OS … Appl 2 Appl 3 Appl 4 Appl 5 Appl 1• PROFILE.TCPIP • PORT - Reserves a PORT for a specified Jobname ports TCP UDP Internet layer Network Access layer PORT 1111 TCP IMSCON01 NODELAYACKS network PORT portnum TCP imsconnectname NODELAYACKS|DELAYACKS In general, use NODELAYACKS • Eliminates delay in sending ACK response back to client • “Essential” if an input message is sent with multiple WRITEs Global default can be set on TCPCONFIG statement
  18. 18. Customizing UNIX System Services • SYS1.PARMLIB(BPXPRMxx) • MAXSOCKETS sets total number active sockets per stack • MAXFILEPROC sets total number socket descriptors per process FILESYSTYPE TYPE(INET) NETWORK DOMAINNAME(AF_INET) DOMAINNUMBER(2) MAXSOCKETS(4000) TYPE(INET) /*************************************** MAXFILEPROC(2000) HWS (ID=IMSCON01,) TCPIP (HOSTNAME=ZOSTCP, MAXSOC=2000 ...
  19. 19. MAXSOCKETS/MAXFILEPROC Example Connect to port 1111 at 64.235.160.98 IMS TCP/IP IMS Connect DRDAPORT 1111 MAXSOC=2000 IMSA HostRemote 10.125.286.45 ODBMHosts ALIAS MAXSOCKETS(5000) IMSA MAXFILEPROC(3000) IMS Connect DRDAPORT 2222 MAXSOC=3000 Connect to port 2222 at 64.235.160.99 IMS z/OS Host
  20. 20. Configure TCP for z/OS … • PROFILE.TCPIP • SOMAXCONN statement to specify the maximum number of connection requests queued for a listening socket. • Where queue-size indicates the number of connection requests that can be queued by the system while the IMS Connect has not yet issued the Accept() call Alert TCP/IP of the ability to accept connection requests Listen( ) SOMAXCONN 100 Accept connection and receive second Socket Accept( NS ) SOMAXCONN queue depth – Default is 10, Data exchange on Socket Read() NS Maximum value is 2,147,483,647 - process data Write( Close Socket NS ) • Should be large enough to support the max concurrent requests
  21. 21. SOMAXCONN Example Connect to port 1111 Client 1 TCP/IP IMS IMSCON01 Host DRDAPORT1111 Remote 10.125.286.45 LISTEN ODBM IMSA Hosts ALIAS ACCEPT n IMSA Connect to port 1111 Client n+1 IMS z/OS Host timeout while "Contacting host".
  22. 22. Configure TCP for z/OS …• PROFILE.TCPIP • TCPCONFIG statement configures various settings of the TCP layer • In particular, use INTERVAL timeout specification if remote client will specify long timeout values on input to IMS Connect (INTERVAL should be greater than IMS Connect timeout) TCPCONFIG INTERVAL 1440 INTERVAL – Specifies “keepalive” value in minutes. On an open socket, if there is no activity for more than this period, then a “keepalive” message will be sent to the remote client. If the remote client does not respond, the socket is terminated. • Default is 120 minutes, maximum is 35791 minutes The keepalive option is enabled by the remote client using setsockopt call IMS Connect ODACCESS (DRDAPORT=(ID=1111,KEEPAV=5 this overrides TCPIPCONFIG INTERVAL
  23. 23. Sysplex Distributor – Distributed DVIPA • Sysplex function providing a single “Cluster IP address” for a group of Hosts • Sysplex-wide VIPA - Workload balancing across multiple servers (WLM or round-robin) • Performs a Network Dispatcher type function on the z/Series environment • High availability - enhanced Dynamic VIPA and Automatic Takeover Sysplex Sysplex distributor Sysplex Distributor Target TCP/IP stack - keeps track of connections Routing TCP/IP stack VIPA "HIDDEN" IMS Connect - keeps track of target stacks and applications VIPA PRIMARY Port 1111 - invokes WLM or round-robin algorithm 10.125.286.45 10.125.286.45 Target TCP/IP stack remote VIPA "HIDDEN" IMS Connect host Port 1111 CF 10.125.286.45Connect to Sysplex Distributorport 1111 Backup TCP/IP stack Target TCP/IP stack IMS Connectat VIPA BACKUP VIPA "HIDDEN" Port 111110.125.286.45 10.125.286.45 10.125.286.45
  24. 24. Timeouts• PORTTMOT= Defines the amount of time that IMS Connect waits:: • An subsequent input messages from TCP/IP client application Type 4 TCP/IP IMS DRDAApplication TCP/IP Program IMS DRDARequestor Connect DRA ODBM DRDA PORT Back out In-Flight work
  25. 25. 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 application Type 4 TCP/IP IMS DRDAApplication TCP/IP Program IMS DRDARequestor Connect DRA ODBM DRDA PORT Type 4 HWSJ2530W TCP/IP TCP/IP DRDA DRDA Back out In-Flight workApplication ProgramRequestor
  26. 26. 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 • IMS Connect does the authentication • IMS does the authorization • Checks that the User is authorized to use the PSB when the PSB is allocated• There are 3 parameters which determine which security, if any, will be used • ODBM RRS=Y/N • ODBASE=Y/N • ISIS=N/R/C/A• There is an additional parameter to determine which Userid is used • IMS Connect RACF=Y/N
  27. 27. SAF APSB SecurityODBASE=Y ACEE - Authenticated USERID The IMS application group resource class (AIMS or Axxxxxxx) IMS Open DB API IMS ODBM Type 4 Connect RRS=Y PSB Schedule Time ODBM Client TCP/IP RACF=Y Connection ACEE PSB 1 Userid USERID Authenticated Userid Password USERID HWSAUTH0 RACO USERID GroupID ODBM uses RACO to create ACEE for ODBM Thread TCB Userid will represent the end client IMS Connect RACF=N a RACO is not provided IMS uses ODBM Job Card UserID ACEE for ODBM ASCB27
  28. 28. ISIS=R or A RAS PSB Security ODBM extracts and passes RACO Userid in PAPL The IMS application group resource class (IIMS or Ixxxxxxx) IMS Open DB API IMS ODBM Type 4 Connect RRS=N Userid ODBM DFSRAS00 Client TCP/IP ASCB USERID RACF=Y Connection Userid PAPLUSRN PSB Schedule Time HWSAUTH0 GroupID Or USERID USERID PAPLGRPN ACEE PSB 1 Userid Password GroupID RACO ODBM extracts the UserID from the RACO passes it in PAPL Userid will represent the end client IMS Connect RACF=N a RACO is not provided IMS uses ODBM JOB Card UserID28
  29. 29. IMS Connect in a Multi-IMS IMSplex LPAR 1 LPAR 2 IMS OM SCI SCI OM Connect ODBM IMS1 IMS2 ODBM XCF LPAR 4 LPAR 3 OM SCI IMS3 IMS4 ODBM IMS IMS ODBM SCI Connect Connect
  30. 30. IMS Connect in a Multi-IMSplexs LPAR 1 LPAR 2 IMS OM SCI1 SCI3 OM Connect SCI1 ODBM SCI2 ODBM IMS1 IMS2 LPAR 4 LPAR 3 XCF IMS SCI4 IMS4 Connect OM SCI2 IMS3 SCI4 SCI3 ODBM IMS ODBM Connect
  31. 31. IMS Connect Routing to ODBM• ODBM Alias Name Routing • Alias name is used by IMS Connect DRDA Client application programs • Remote applications do not need to know IMSID • But one Alias can be same as IMS ID• Remote application can leave alias name blank • IMS Connect uses round robin routing across all ODBMs• Specified Alias can be non-unique • Same alias defined for multiple IMS systems • IMS Connect uses round robin routing across ODBMs with the alias defined
  32. 32. IMS Connect Routing to ODBM ODBM(NAME=ODBMB1 DATASTORE(NAME=IMS1, ALIAS(NAME=IM1A, IO1A)) LPARA IMSPLEX1 IMS DATASTORE(NAME=IMS2, ALIAS(NAME=IM1A, IO2A)) ) Connect IMS1 A •ALIAS IO1A only routes to IMS1 TM/DB SCI ODBA ODBMB1 DB IMS2 TM/DB •ALIAS IM1A isACCESS DB routed to ODBMB1 •ALIAS IO2A only routes to IMS2 TCP/IPusing ALIAS for either IMS1 orIM1A IMS2And using •ALIAS IO3A only routes to IMS3) LPARBIMS Connect DRAHostname ODBMB2 IMS3port DBCTL IMS SCI DB Connect B ODBM(NAME=ODBMB2 IMS4 DATASTORE(NAME=IMS3, DBCTL DB ALIAS(NAME= IO3A, IMS3)) DATASTORE(NAME=IMS4) ) •IMS4 has no alias, applications can use the DATASTORE name IMS4
  33. 33. IMS Connect Routing and Security Exitsfor ODBM • BPE managed and refreshable User Exits • Routing user exit – HWSROUT0 • Override the IMS Connect selection of an ODBM and/or ALIAS • Security user exit – HWSAUTH0 • Authenticate the input user ID and password or passticket • Provide the RACF group ID to be authenticated EXITDEF(TYPE=ODBMROUT,EXITS=(HWSROUT0),ABLIM=8,COMP=HWS) • Always called by IMS Connect if it exists EXITDEF(TYPE=ODBMAUTH,EXITS=(HWSAUTH0),ABLIM=8,COMP=HWS)
  34. 34. IMS Connect Extensions• Improves the manageability of IMS Connect• IMS Connect Extensions enhancements for Open Database include: • Event collection for ODBM events • Routing of ODBM Allocate PSB requests • Monitoring of ODBM throughput in GUI or ISPF • Determination of ODBM resource availability
  35. 35. Universal Drivers System z Distributed Universal IFL Linux DB Resource WAS Adapter WAS (any platform) JCA 1.5 Linux z Type 4 Universal DB Resource Adapter z/OS A JCA 1.5 T IMS CICS Type 4 C P I Connect IMS Universal P JDBC ODBM DLI Type 2 IMS Universal Drivers IMS DB JDBC Type 4 DLI IMS DB2 WAS/z Type 4 Universal Any Java Runtime Platform DB ODBM Universal Resource JDBC Adapter IMS DB JCA 1.5 DLI Type 2 z/OS B Type 2 SNA IMS TM IMS Universal IMS DB TCP/IP JDBC Network Clients Appl Type 2
  36. 36. IMS Open Database Universal Drivers• Different API layers are provided to leverage the DRDA protocol • IMS Universal DB Resource Adapter - to use JDBC SQL access to IMS data in a JEE environment such as WebSphere Application Server (WAS) on any platform • IMS Universal JDBC driver - to use JDBC SQL access to IMS data in a Non-JEE environment such as stand-alone java, DB2 SP, IMS TM, CICS • IMS Universal DL/I driver - to issue calls that are similar to DL/I directly to IMS from a Non-JEE Java environment • RYO - Use a programming language of your choice to issue DRDA commands directly to IMS Connect• Makes Application development and Connectivity much simpler!
  37. 37. setFetchSize and Network Efficiency• An application can set the expected or desired number of rows to be returned – default is 1• Especially relevant for a distributed client to maximize network efficiency • The driver will build a request for this number of rows to be returned • Send it to ODBM (via IMS Connect) to 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 • Universal DB Resource Adapter – for JDBC, and for CCI SQL or DL/1 access • Universal JDBC Driver • Universal DL/1 Driver
  38. 38. ODBM Client API• ODBM Client request flow • CSLSCREG – Register to SCI • CSLDMREG – Register to ODBM • CSLSCRDY – Enable the ODBM client for SCI processing • CSLDMI FUNC= – API function calls • CSLSCBFR – Release output buffer • CSLDMDRG – Deregister from ODBM • CSLSCDRG – Deregister from SCI CSL macros are documented in “IMS Version 11 System Programming APIs”
  39. 39. DRDA RYO Client API• IMS DRDA Client flow • Establish TCP/IP connection to IMS Connect (open socket connection) • Host IP Address • DRDA Port number • IMS Alias • Allocate PSB (Open Database connection) • ACCRDB command RDBNAM=PSB • Access IMS DB using AIB, PCBNAME,SSALIST. • OPNQRY command DLIFUNC=GU • EXCSQLIMM command DLIFUNC=ISRT,REPL,DLET • RDBCMM command to commit changes • Deallocate PSB (Close Database connection) • DEALLOCDB command RDBNAM=PSB
  40. 40. IMS Enterprise Suite Explorer for Development• 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 • IMS V12 Catalog • Generates the necessary metadata that is consumed at runtime by IMS JDBC driver and XML-DB support • Database metadata • XML schema• Bottom-up tooling approach • Parses PSB and DBD source • Optional COBOL copybook definitions • An Eclipse 3.x plug-in 40
  41. 41. Summary• Open Database Capabilities • Supports open-standards for connectivity to online IMS databases • Across z/OS LPARs • Across networks • Direct 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 SG24-7856-00 41

×