Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1
© Copyright IB...
Objectives
• Differentiate the IMS DBMS approach and capabilities from
traditional master files
• Describe hierarchical da...
USER
TERMINAL
USER
TERMINAL
MASTER
TERMINAL
USER
TERMINAL
MSG
QUEUE
ONLINE
LOG DATA
SET
RECON CORPORATE
DATABASE
z/OS
MPR
...
Overview - Component and Features (1 of 2)
• Primary Products
– IMS Transaction Manager - IMS/TM
– IMS Database Manager - ...
Overview - Component and Features (2 of 2)
• Related Products
– IMS Database Control Suite for z/OS
– IMS High Performance...
What Is a Database System?
• "A system that allows multiple independent users to have
concurrent access to a central repos...
ONE SET
OF BOOKS
ONE PLACE TO
MAKE CHANGES
Inventory
Control
Accounting
Engineering
Production
DATA
BASE
A Central Reposit...
DATA
BASE
z/OS
Operating System
DL/I
Application
Program
WHAT IS DL/I?
• "Data Language/One is a data management facility ...
Limits of Traditional Systems
• Fixed file contents limits the use of the data, and impacts
application expansion
• Additi...
PARTS
FILEA
PARTS
FILEB
PARTS
FILEC
PROGRAM A
(INVENTORY)
FILE
DESC
PROGRAM B
(ENGINEERING)
FILE
DESC
PROGRAM C
(ACCOUNTIN...
PROGRAM A
(INVENTORY)
PROGRAM C
(ACCOUNTING)
PROGRAM B
(ENGINEERING)
PARTS
DATA
BASE
DATA
DESCRIPTION
Database Approach
EMP
NO
EMP
NAME
DATE
HIRE
ADDR
LINE
1
ADDR
LINE
2
......... DEDUCT 2 3 4 5
Field Length Field Length
Employee No.
Employee...
EMPLOYEE NO. 6
EMPLOYEE NAME 30
DEPARTMENT 2
DATE HIRED 6
ADDR
LINE (S)
O-n
FIT 6
FICA 5
STATE 5
LOCAL 5
EMPLOYEE
(44 byte...
Level 1
Level 2
Level 3
Twins
Twins
Root
Segment
B1
B2
SALARY
TAXES
C11
C12
ADDRESS
D1
D2
DEDUCT
C21
C22
C23
EMPLOYEE
A
DL...
SALARY
TAXES
ADDRESS
DEDUCT
EMPLOYEE
ADDRESSSALARY
2
1
11
12
13
X1
X2
X3
X
Y
U
V
W
Hierarchic Sequence Exercise
• Place th...
EMP
NO
EMP
NAME
ADDR
LINE
DEPT
NO.
NO.
DEPT
YTD
SALARY
YTD
FIT
YTD
FICA
YTD
STATE
PERSONNEL
INFORMATION
EMPL
NAME
EMPL
NO....
EMPLOYEE
SALARY ADDRESS
TAXES DEDUCT
SKILL
EXPR EDUC
PERSONNEL DATA
DL/I Easy To Expand
EMPLOYEE
ADDRESSSALARY
TAXES DEDUCT
SKILL
EXPR EDUC
MILITARY
SERVICE
MILITARY
HISTORY
UPDATES
Payroll Data
Military Data...
PROGRAM
DATA DESCRIPTION
DATA
BASE
PSB DBD
Data Independence
• Separate the program from the physical characteristics of t...
LOGICAL VIEW PHYSICAL VIEW
PSB DBD
PCB... SEGM...
SENSEG...
Find an employee Execute complex
with a specified IMS, VSAM, z...
DBDLIB
DBD
MACRO
LIB
DBDGEN-
PROCESS
DBD NAME=EMPLOYEE , ACCESS=HDAM. . .
DATASET DD1=EMPLDATA
SEGM NAME=EMPLOYEE , BYTES=...
MACRO
LIB
PSBGEN-
PROCESS
PCB TYPE=DB , DBDNAME=EMPLOYEE , PROCOPT=A , KEYLEN=45
SENSEG NAME=EMPLOYEE , PROCOPT=G
SENSEG N...
EMPLOYEE
ADDRESSSALARY
TAXES DEDUCT
SKILL
EXPR EDUC
MILITARY
SERVICE
MILITARY
HISTORY
Logical Data Structure
for Payroll p...
MYPROG
MYPSB
DBD
PGMLIB
PSBLIB
DBDLIB
IMS
Batch IMS Execution
ACBLIB
PSB
DBD
DBDLIBPSBLIB
PSB
ACBGEN
PROCESS
CONTROL
STATEMENTS
DBD
Application Control Blocks
• Application Control Blo...
EMPLOYEE
SALARY ADDRESS
LOGICAL DATABASE
STRUCTURE
z/OS ADDRESS-SPACE:
APPLICATION
PROGRAM:
PSB
PCB
(Logical View)
DBD
(PH...
APPLICATION
PROGRAM
DL/I
DATA
BASE
SYSTEM
LOG
Database Recovery
• All Database changes are logged!
• System Log is used by...
DATABASE DATA SET
COURSE
CLASS
STUDENTINSTRUCT
Original
Database
IMAGE-
COPY
UTILITY
DATABASE DATA SET
Backup Copy of
Data...
LOG DATA SET
STUDENT AFTER
CLASS BEFORE
CLASS AFTER
ISRT
REPL
z/OS Address-space:
Application Program:
...
...
ISRT COURSE...
DATABASE DATA SET
Backup Copy of Database
CI#1
CI#2
.
.
.
DATABASE DATA SET
COURSE
CLASS
STUDENTINSTRUCT
Recovered Databas...
CHANGE
ACCUMULATION
CHANGE
ACCUM
DATASET
LOG3
LOG2
LOG1
Sort to cut recovery time.
Consolidate changes
Optional – include ...
DL/I Goals
• DATA INDEPENDENCE
– No file description coding within program
– No recompilations due to changes in the physi...
Unit Summary
• Using the IMS DBMS approach, databases are shared among
applications.
• Accessing database records using DL...
Upcoming SlideShare
Loading in …5
×

IMS Fundamentals - part 1

3,521 views

Published on

IMS Customer Internship held in San Jose, CA in April 2016.
Delivered by Deepak Kohli.

Published in: Technology
  • Login to see the comments

IMS Fundamentals - part 1

  1. 1. Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 IMS Fundamentals
  2. 2. Objectives • Differentiate the IMS DBMS approach and capabilities from traditional master files • Describe hierarchical data structures, database records and the goals for accessing them through DL/I • Identify the principle IMS DB control blocks and differentiate the physical view from the application view of a database • Identify and describe the principal facilities for backup and recovery of IMS databases
  3. 3. USER TERMINAL USER TERMINAL MASTER TERMINAL USER TERMINAL MSG QUEUE ONLINE LOG DATA SET RECON CORPORATE DATABASE z/OS MPR Message Processing Region APPL PGM APPL PGM APPL PGM BMP Batch Message Processing IFP Fast Path Region IMSCTL Control Region TELECOMMU- NICATIONS MESSAGE SCHEDULING LOGGING/ RESTART DBRC Recovery Control LOG CTL DLISAS DL/I Subordinate Address-space DL/I ACTION MODULES IMS/TM makes data available to the end user IMS Overview - Environment
  4. 4. Overview - Component and Features (1 of 2) • Primary Products – IMS Transaction Manager - IMS/TM – IMS Database Manager - IMS/DB • Product Implementations – DB/DC – DBCTL – DCCTL • Related Products – IBM IMS Data Management Tools • e.g. IMS Hardware Supported Compression - Extended - more examples on next page
  5. 5. Overview - Component and Features (2 of 2) • Related Products – IMS Database Control Suite for z/OS – IMS High Performance Pointer Checker for z/OS – IMS Parallel Reorganization for z/OS – IMS DEDB Fast Recovery for z/OS – IMS Queue Control Facility for z/OS – Batch Terminal Simulator – IMS Workload Router – and many, many, more
  6. 6. What Is a Database System? • "A system that allows multiple independent users to have concurrent access to a central repository of information..." • Advantages – Centralized files for all applications – Elimination of duplicate space and effort – Single information source provides complete, accurate information processing
  7. 7. ONE SET OF BOOKS ONE PLACE TO MAKE CHANGES Inventory Control Accounting Engineering Production DATA BASE A Central Repository
  8. 8. DATA BASE z/OS Operating System DL/I Application Program WHAT IS DL/I? • "Data Language/One is a data management facility that serves as an interface between an application program and a database.."
  9. 9. Limits of Traditional Systems • Fixed file contents limits the use of the data, and impacts application expansion • Additional files create data redundancy, and additional data maintenance • Interrelating data from multiple files complicates design and programming • Recovery procedures are non-standard, or ignored until a disaster occurs!
  10. 10. PARTS FILEA PARTS FILEB PARTS FILEC PROGRAM A (INVENTORY) FILE DESC PROGRAM B (ENGINEERING) FILE DESC PROGRAM C (ACCOUNTING) FILE DESC Traditional Approach
  11. 11. PROGRAM A (INVENTORY) PROGRAM C (ACCOUNTING) PROGRAM B (ENGINEERING) PARTS DATA BASE DATA DESCRIPTION Database Approach
  12. 12. EMP NO EMP NAME DATE HIRE ADDR LINE 1 ADDR LINE 2 ......... DEDUCT 2 3 4 5 Field Length Field Length Employee No. Employee Name Department Date Hired Address Line 1 Address Line 2 Address Line 3 Address Line 4 Gross Salary Salary Class Auth Date 6 30 2 6 25 25 25 25 6 3 6 Taxes Fit FICA State Local Deductions (Up to 5) Type Amount Balance (12x5) 6 5 5 5 2 5 5 60 Fixed File Contents
  13. 13. EMPLOYEE NO. 6 EMPLOYEE NAME 30 DEPARTMENT 2 DATE HIRED 6 ADDR LINE (S) O-n FIT 6 FICA 5 STATE 5 LOCAL 5 EMPLOYEE (44 bytes) SALARY (15 bytes) ADDRESS (25 bytes) TAXES (21 bytes) DEDUCT (12 bytes) TYPE 2 AMT 5 BAL 5 GROSS SALARY 6 SALARY CLASS 3 AUTH DATE 6 DL/I Hierarchy (1 of 2)
  14. 14. Level 1 Level 2 Level 3 Twins Twins Root Segment B1 B2 SALARY TAXES C11 C12 ADDRESS D1 D2 DEDUCT C21 C22 C23 EMPLOYEE A DL/I Hierarchy (2 of 2)
  15. 15. SALARY TAXES ADDRESS DEDUCT EMPLOYEE ADDRESSSALARY 2 1 11 12 13 X1 X2 X3 X Y U V W Hierarchic Sequence Exercise • Place the number or letter in the boxes in the sequence that these segments will be accessed by a sequential "get-next" function.
  16. 16. EMP NO EMP NAME ADDR LINE DEPT NO. NO. DEPT YTD SALARY YTD FIT YTD FICA YTD STATE PERSONNEL INFORMATION EMPL NAME EMPL NO. ADDR DEPT JOB CODE SKILL CODE EDUC EXPR PAYROLL SYSTEM PERSONNEL SYSTEM 15 PROGRAMS PERSONNEL SYSTEM Expand Payroll Master? OR Create new file? PERSONNEL MASTER PAYROLL MASTER Add A New Application
  17. 17. EMPLOYEE SALARY ADDRESS TAXES DEDUCT SKILL EXPR EDUC PERSONNEL DATA DL/I Easy To Expand
  18. 18. EMPLOYEE ADDRESSSALARY TAXES DEDUCT SKILL EXPR EDUC MILITARY SERVICE MILITARY HISTORY UPDATES Payroll Data Military Data Personnel Data Multi-Application Updates
  19. 19. PROGRAM DATA DESCRIPTION DATA BASE PSB DBD Data Independence • Separate the program from the physical characteristics of the databases • Advantages – Simplifies application program development – Provides security, integrity, and consistency of a database – Facilitates changes to database
  20. 20. LOGICAL VIEW PHYSICAL VIEW PSB DBD PCB... SEGM... SENSEG... Find an employee Execute complex with a specified IMS, VSAM, z/OS, and skill (programmer?) DASD low-level code Logical View/Physical View
  21. 21. DBDLIB DBD MACRO LIB DBDGEN- PROCESS DBD NAME=EMPLOYEE , ACCESS=HDAM. . . DATASET DD1=EMPLDATA SEGM NAME=EMPLOYEE , BYTES=44 , PARENT=0 FI ELD NAME=( SERI AL , SEQ , U) , BYTES=6 , START=1 FI ELD NAME=FULNAME , BYTES=18 , START=20 SEGM NAME=SALARY , BYTES=15 , PARENT=EMPLOYEE FI ELD NAME=RATE , BYTES=5 , START=5 SEGM NAME=TAXES , BYTES=21 , PARENT=SALARY SEGM NAME=DEDUCT , BYTES=12 , PARENT=SALARY FI ELD NAME=TYPE , BYTES=4 , START=1 . . END INPUT STATEMENTS DEDUCTTAXES EMPLOYEE SALARY Database Description (DBD)
  22. 22. MACRO LIB PSBGEN- PROCESS PCB TYPE=DB , DBDNAME=EMPLOYEE , PROCOPT=A , KEYLEN=45 SENSEG NAME=EMPLOYEE , PROCOPT=G SENSEG NAME=SALARY , PARENT=EMPLOYEE , PROCOPT=GR SENSEG NAME=TAXES , PARENT=SALARY SENSEG NAME=DEDUCT , PARENT=SALARY PCB TYPE=DB , DBDNAME=PROJECT , PROCOPT=G , KEYLEN=22 SENSEG NAME=PROJECT . . PSBGEN LANG=COBOL , PSBNAME=EMPLPROJ END PSBLIB P S B PCB PCB INPUT STATEMENTS Program Specification Block (PSB)
  23. 23. EMPLOYEE ADDRESSSALARY TAXES DEDUCT SKILL EXPR EDUC MILITARY SERVICE MILITARY HISTORY Logical Data Structure for Payroll processing Segment Sensitivity • What is the Logical Data Structure for an Employee Mailing
  24. 24. MYPROG MYPSB DBD PGMLIB PSBLIB DBDLIB IMS Batch IMS Execution
  25. 25. ACBLIB PSB DBD DBDLIBPSBLIB PSB ACBGEN PROCESS CONTROL STATEMENTS DBD Application Control Blocks • Application Control Blocks (ACB) Utility: – Defines Application Control Block library (ACBLIB) – Uses database descriptors (DBDs) – Uses program descriptions (PSBs) • ACBGEN: – Verifies PSB-PCB-DBD existence and compatibility – Verifies KEYLEN parameter
  26. 26. EMPLOYEE SALARY ADDRESS LOGICAL DATABASE STRUCTURE z/OS ADDRESS-SPACE: APPLICATION PROGRAM: PSB PCB (Logical View) DBD (PHYSICAL) HSAM HISAM HDAM HIDAM PCB MASK CALL 'CBLTDLI' USING. . . DL/I Application Program View
  27. 27. APPLICATION PROGRAM DL/I DATA BASE SYSTEM LOG Database Recovery • All Database changes are logged! • System Log is used by DL/I to – Recover databases from errors – Back out updates when program abnormally terminates • "Before" and "After" images of DL/I segments
  28. 28. DATABASE DATA SET COURSE CLASS STUDENTINSTRUCT Original Database IMAGE- COPY UTILITY DATABASE DATA SET Backup Copy of Database CI#1 CI#2 . . . Backing-Up a Database • CIC - Concurrent image copy allows update of databases while image copy runs. It produces a "fuzzy" image copy.
  29. 29. LOG DATA SET STUDENT AFTER CLASS BEFORE CLASS AFTER ISRT REPL z/OS Address-space: Application Program: ... ... ISRT COURSE = 'U3700' CLASS = 'SL981015' STUDENT ... ... GHU COURSE = 'U3700' CLASS = 'SL981015' REPL ... ... INPUT/OUTPUT AREA: DL/I Action Modules DATABASE DATA SET COURSE CLASS STUDENTINSTRUCT Logging Database Changes
  30. 30. DATABASE DATA SET Backup Copy of Database CI#1 CI#2 . . . DATABASE DATA SET COURSE CLASS STUDENTINSTRUCT Recovered Database DATABASE RECOVERY UTILITY LOG DATA SET STUDENT AFTER CLASS BEFORE CLASS AFTER ISRT REPL Database Recovery
  31. 31. CHANGE ACCUMULATION CHANGE ACCUM DATASET LOG3 LOG2 LOG1 Sort to cut recovery time. Consolidate changes Optional – include previous change accum dataset Logs must be in creation sequence Database Log Change Accumulation
  32. 32. DL/I Goals • DATA INDEPENDENCE – No file description coding within program – No recompilations due to changes in the physical storage or access method – Same type of DL/I coding regardless of language, or physical access method • DATA INTEGRATION: – Less file-related logic to code – Only one field in one database to maintain • DATA SENSITIVITY: – Less storage to reserve – Fewer fields to define – No recompilations due to addition/deletion of non-sensitive segments – Processing Options (PROCOPTs) • DATA BASE INTEGRITY: – No logic or coding for recovery in case of failure
  33. 33. Unit Summary • Using the IMS DBMS approach, databases are shared among applications. • Accessing database records using DL/I satisfies a set of shared processing goals and requires navigation through hierarchical data structures. • Three principle IMS DB control blocks are used to describe the physical database structure and to support different program views of available data. • The principle facilities for IMS backup and recovery were discussed.

×