1 / 38

Chapter 13b Understanding Database Managers - IMS on z/OS

Chapter 13b Understanding Database Managers - IMS on z/OS. jkettner@us.ibm.com Sept. 2006. Contains Animation. Chapter 13b objectives. Be able to: Explain IMS processing. List common DB2 data structures. Compose simple SQL queries to run on z/OS.

kipp
Télécharger la présentation

Chapter 13b Understanding Database Managers - IMS on z/OS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 13b UnderstandingDatabase Managers - IMS on z/OS jkettner@us.ibm.com Sept. 2006 Contains Animation

  2. Chapter 13b objectives • Be able to: • Explain IMS processing. • List common DB2 data structures. • Compose simple SQL queries to run on z/OS. • Give an overview of application programming with DB2. • What the IMS components are • The structure of the IMS DB subsystem

  3. bind DBMS EXPLAIN modified source SPUFI SQL SYSADM view Key terms in this chapter

  4. What is a database • A Database is a collection of related data • organized in a way that can be processed by • application programs • A database management system (DBMS) consist of a set of licensed programs that define and maintain the structure of the database.

  5. Entities Attributes Relationships What is a database example entity Note: An attribute is always dependent on an entity – it has no meaning by itself one-to-one one-to-many many-to-many { Note: Relationships can be recursive

  6. Why use a database? • Reduce programming effort • Manage data more efficiently • Easy to separate confidential/sensitive info • Provide a greater level of security • Access & update simultaneously • Ensure consistency • Provide backup and recovery • Utilities to monitor and tune • Structure change does not impact existing developments

  7. Role of the database administrator Bonus Q What usually is the DBA not responsible for?

  8. Databases: terminology summary • Entities • Data attributes • Entity relationships • Application functions • Access paths

  9. Databases on z/OS • Hierarchical databases, such as IMS • Relational database management system (RDBMS), such as DB2 Bonus Q Is VSAM considered a database ?

  10. I M S / D B Information Management System / Data Base Tree structure ICS/DLI

  11. MIPS capacity increased 67.9% One large IMS Customer has operated over 3000 days without an outage 24 x 7 ...2003 Is IMS sill strategic….here are facts on usage IMS manages a large percentage of world’s Corporate Data • Over 95% of Fortune 1000 companies use IMS • IMS manages over 15 million gigabytes of Production Data • $2.5 trillion (USD) per day is transferred through IMS by one customer • IMS processes over 50 billion transactions per day • IMS serves over 200 million uses every day • IMS processes over 120 million transactions per day for one customer • IMS can process 21,000 transactions per second ( > 1 billion per day) • using IMS data sharing and shared queues • A single IMS has processed over 6000 transactions per second over a single • TCP/IP connection I M S www.illuminata.com

  12. Functions of the IMS database manager • A DBMS provides: • Multiple-user access to a single copy of data • Integrity for all updates • Minimal hardware and OS access method dependencies • Reduced data redundancy

  13. The IMS Database • A IMS Database is a group of related database records • A database record is a single hierarchy of related segments • A segment is a group of related fields • A field is a single piece of data • It can be used as a key to order segments • It can be used as a qualifier for searching • It may only have meaning to applications • IMS database always look like hierarchies

  14. Position within the hierarchy IMS TOP Hierarchical DB : Relationships & sequence A database record can contain a max of 255 types of segments RECORD Left Right Down

  15. Segment is the smallest structure of the IMS DB which can retrieve data containing related fields. Segment Format Path1 Path2 Prefix Data Path3 Logical Dependencies IMS Hierarchical data structure = Paths (SSA) See next slide

  16. IMS Segment types and their relationships Rules for queries are highly structured. Fixed relationships provides the speed. Data is dependent on the existence of other types of data

  17. Implementation of IMS Databases • Depending on user' requirements • Technologies : • IMS DB or DL/I or DL1 or Full Function Database • IMS DEDB or Data Entry DB or Fast Path Database • IMS Main storage database (MSDB) • IBM DB2 • Database Recovery Control (DBRC)

  18. Structure of IMS Subsystem Terminals Provides interface to z/OS for operations of IMS System Controls, schedules and dispatches the application programs in Dependent Regions Message queues Controller Region Provides interface to SNA network for IMS TM functions Provides OTMA for access to non-SNA networks Q Provides the ODBA interface for DB2 UDB for z/OS Logs db request Logging Restart Recovery

  19. IMS Common System Services Issuing IMS Commands Running IMS supplied utility programs Running IMS supplied or user-written exit routines Defining the services you want within the definition process Provides data integrity Restart and Recovery Provides Security Manages Application Programs Provides facilities for operating IMS Provides Diagnostic and Performance information Provides interfaces to other z/OS Subsytems IMS / TM IMS / DB

  20. Loads the application programs and holds it to wait for messages Extends the capability of utilities for IMS recovery Logging Restart Recovery Controls Full-Function Database access by an on-line program and handles physical I/O for programs Single Point of Control { Common Services Layer Operations Configuration Resource Instrumentation * * * Manager Manager Manager & Diagnostic Mgr. Structured Call Interface (SCI) IMS Environments DB/DC DBCTL DCCTL Batch Overview of IMS System Application Pgms. for DB batch processing - Also access to non-IMS resources IMSplex SVC T-2 Fast Path “Special” Processing Administer one or more IMS’ ani

  21. Internal Resource Lock Manager This is delivered as an integral part of IMS, but…YOU DO NOT have to install it (use it) UNLESS you perform block level or sysplex data sharing. DXRJPROC IRLM PSB

  22. IMS Uses Many Physical Access Methods BASIC Sequential Access Method (BSAM) Queued Sequential Access Method (QSAM) Overflow Sequential Access Method (OSAM) Virtual Storage Access Method (VSAM) NOTE: IMS VERSION 9 OPERATES IN A VIRTUAL MACHINE (VM) BUT FOR A NON-PRODUCTION ENVIRONMENT

  23. COBOL JAVA Supported Programming Languages • ADA • COBOL for S/390 and VM • Enterprise COBOL for z/OS and OS/390 • High Level Assembler for MVS, VM, and VSE • IBM SDK for z/OS J2EE v1.3.1 and above • PL/I for z/OS and S/390 • TSO/E REXX • VS Pascal • Websphere Developer for z/OS • z/OS C/C++

  24. Many Flavors of IMS DB Organizations

  25. Database Organizations Database Type Logical Organization HDAM - Hierarchical Direct Access Method PHDAM - Partitioned Hierarchical Direct Access Method HIDAM - Hierarchical Indexed Direct Access Method PHIDAM - Partitioned Hierarchical Indexed Direct Access Method HISAM - Hierarchical Indexed Sequential Access Method SHISAM - Simple Hierarchical Indexed Sequential Access Method GSAM - Generalized Sequential Access Method DEDB - Data Entry Database (fast path) VSAM only warning Requires vigilant space monitoring ! 2 ani

  26. Databases used by IMS: Database basics • Access paths • Normalization within IMS • Unique entities • 1 occurrence only • No many-to-many relationships

  27. Databases used by IMS: DB Model • Sequence to access the segments

  28. Databases used by IMS: DB model • Additional access paths to segments • Logical relationships • Secondary indices

  29. Application programming overview • Program is subroutine of IMS region controller • Needs a program specification block (PSB) • Uses services: • Send/receive message from terminals • Access db • Issue IMS commands • Issue IMS service calls e.g. Checkpoint calls, Sync call

  30. GET UNIQUE GET NEXT GET HOLD UNIQUE GET HOLD NEXT INSERT DELETE REPLACE Accessing IMS using DL/I calls DL/I is a standard interface to IMS functions Calls to DL/I: CALL ‘CBLTDLI’ USING function, PCB-name, I/O-Area, SSA1…SSAn

  31. Application Data Structure Part PCB Mask PCB STOCK ORDER Mask written in COBOL Linkage Section 01 PCBNAME. 02 DB-NAME PIX X(8). 02 SEG-LEVEL PIC XX. 02 STATUS-CODE PIX XX. 02 PROC-OPTIONS PIC XXX. 02 RESERVE-DLI PIC S9(5). 02 SEG-NME-FB PIC x(8). 02 LENGTH-FB-KEY PIC s9(5). 02 NUM-SENS-SEG PIC S9(5) 02 KEY-FB-AREA PIC x(3) P S B Before executing an app program, you must describe that program and its use of logical data structures via PSB IMS Application PCB Structure Application Program Which DL1 segments & what access a view of DB 2 types of PCBs DB & DC PSB Utility Pgms located in PSBLIB

  32. PROGRAM ENTRY DEFINE AIB or PCB AREAS CALLS TO DL/I DB FUNCTIONS RETRIEVE INSERT REPLACE DELETE CHECK STATUS CODES TERMINATION Structure of an IMS Application Program DL/I Modules Application Program entry AIB or PCB Mask GET INPUT RECORS FROM INPUT FILE Call info From DL/I Defiined in program’s Data declaration section I/O Area Segments to and from databases PUT OUTPUT RECORDS exit

  33. Program Structure

  34. IMS & the World Wide Web • Message flow in IMS transaction See IMS TM in Trx. Mgrs.

  35. IMS & the World Wide Web • Message flow IMS transaction & Web Server CGI Programs

  36. IMS & the World Wide Web • Message flow between Web Browser & Web Server

  37. Prim.Key Course Database Course # Course Title Descrip Instructor Dept ID HI-445 History 321 Survey Jenkins HIST MH-778 Algebra 301 Freshman Watson MATH BI-112 Bio 340 Advanced Sinclair BIOL Alt.Key Student Database Student ID Student Name Address Major 1234777 Jones, Bill 121 N. Main HIST 1234888 Smith, Jill 225 Baker Physics 1234999 Brown, Joe 77 Sunset Info Tech Alt.Key Logical “static” relationship Department Database Dept ID Dept Name Chairman Budget Code HIST History J.B. Hunt L72 MATH Mathematics T.Z. Turner A04 BIOL Biology J.H. Kettner A53 Hierarchical Relational Departmental Database Student Database Combine Dept Course Enroll Student Billing One-to-Many One-to-Many Dynamic Relationships 5 Segments 3 Tables

  38. Analogy Segment = Table A database comparison: • IMS (Hierarchical): • Data is relatively static • Data requests or Segment Search Arguments (SSAs) may be complex to construct, but once written they are very efficient (Very Fast Retrieval) • Navigational : need to know the structure to get to the right data • DB2 (Relational): • Used for data searches that may run only once or few times and then change * • Easy to code request for data • Change in structure : no impact on existing application • Non-Navigational : no need to know the structure to get to the right data (just tablename and columnname(s)) Decide "How data will be used" * Resource intensive due to operands within query make requests slower

More Related