IMS 講座 - i- · PDF file5.IMS OTMAインターフェース 6.IMS Connect 「IMS概説」(CM01A)
IMS DC
-
Upload
anandkumar-duraipandian -
Category
Documents
-
view
97 -
download
9
Transcript of IMS DC
![Page 1: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/1.jpg)
IMS DC
Objective:To provide an insight into the fundamentals of IMS DC
![Page 2: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/2.jpg)
Course Details
No:
Name: IMS DC Fundamentals
Introduction: This material Explains Online processing that can be handled using IMS DC.
![Page 3: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/3.jpg)
Course DetailsPre-Requisite Knowledge of IMS DB
Target Audience
To be decided by the CR and SWS
Mode of Training
Class Room
Evaluation Criteria
Attendance > 80 % and/or (Case study Completion or Test score > 70%)
![Page 4: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/4.jpg)
M# Topic Time(hrs) 1 Introduction 2 2 IMS-DC processing 3 3 MFS Facilities 2 4 Advanced IMS-DC topic 2 5 Error Handling in IMS 2 6
Lesson Plan
![Page 5: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/5.jpg)
An Introduction to IMS :
IMS is a Hierarchical DBMS, supplied by IBM & runs on Mainframe Computers, has 2 main Functions:
Data Base (DB) Processing Data Communication (DC) Processing.
Module 1- Introduction
![Page 6: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/6.jpg)
• Interactive Programs
– What is Online Processing– Differences between Batch & Online Processing– Major Kinds of Online Programs that can be written
![Page 7: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/7.jpg)
IMS Data Communication(DC) Basic:
Terminal IMS DC Program Database
Input Message
Output MessageProcess
![Page 8: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/8.jpg)
• IMS/VS forms a layer in between the Terminal and the IMS-DC programs, this helps in asynchronous mode of communication.
• Message - is a unit of Data that’s transmitted between a program and a Terminal
• The above type of program is called Message Processing Programs (MPPs)
![Page 9: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/9.jpg)
Regions in IMS
• MPP Region– is where IMS schedules & executes Message
Processing Programs. – The Number of MPP Regions determines the
number of MPPs that can be active at any one time.– A program that occupies an MPP Region runs until
it has processed all of the input messages that IMS has received for it. Then it ends, and the MPP region in which it was running is freed and made available for another Application Program.
![Page 10: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/10.jpg)
• BMP (Batch Message Processing) Region– A BMP program is much like MPP, except terminal
response is not required for each input Message, and the Database Processing an input message requires does not have to be done immediately.
– These are typically Batch Programs.– The main Advantage is, it can access Data Bases
that are allocated to the IMS Control Region for use by MPPs at the same time.
![Page 11: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/11.jpg)
• Control Region– The main function of this region is that, all terminal,
Database, and Logging Operations associated with IMS-DC programs are performed through this Region.
![Page 12: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/12.jpg)
Module 2 - IMS-DC Processing
Programming Elements for DC Processing– DL/I Calls for DC Operation– PCB mask for DC Operation– Message Handling.
![Page 13: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/13.jpg)
• DL/I Calls for DC OperationEx: CALL ‘CBLTDLI’ USING DLI-GU
IO-PCB-MASK
INPUT-MESSAGE-SEG
– Just as in DB call, the first argument is the Function code value for the operation to be performed. The call functions basically used are get-unique (GU), get-next (GN) & insert (ISRT).
![Page 14: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/14.jpg)
– Issue a GU call to retrieve the first segment
of an Input Message. GN is issued to retrieve the subsequent Messages.
– One ISRT call is issued for each segment, to send an Output Message.
![Page 15: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/15.jpg)
• PCB Mask for DC Operation– A DC call must specify a Linkage Section
PCB Mask, which is a special one that’s just for Message Processing. It’s called I/O PCB.
– To provide addressability to this PCB, the program must name its Linkage section mask definition on the ENTRY statement at the beginning of the Procedure Division.
![Page 16: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/16.jpg)
• I/O PCB Mask 01 IO-PCB-MASK.
05 IO-PCB-LOGICAL-TERMINAL PIC X(8).
05 FILLER PIC X(2).
05 IO-PCB-STATUS-CODE PIC X(2).
05 IO-PCB-DATE PIC S9(7) COMP-3
05 IO-PCB-TIME PIC S9(6)V9 COMP-3
05 IO-PCB-MSG-SEGMENT-NUMBER PIC S9(5) COMP.
05 IO-PCB-MOD-NAME PIC X(8).
05 IO-PCB-USER-ID PIC X(8).
![Page 17: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/17.jpg)
• Message Handling – When GU or GN calls been issued to retrieve
an Input Message Segment, DL/I places the Message Segment data in the I/O Area the call names.
– When ISRT call is issued to send an output Message Segment, DL/I gets the Data from the I/O Area the call names.
![Page 18: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/18.jpg)
• Retrieving An Input Message –– Application Program issues either a Single
‘GU’ call or a ‘GU’ call followed by one or more ‘GN’ calls.
– To retrieve retrieve single segment input message, One ‘GU’ call need to be issued. When the Program gets ‘QC’ status code ( Instead of Blanks), it should be noted that there is end of messages in the Queue.
![Page 19: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/19.jpg)
– To retrieve Multiple segment input Messages, need to issue ‘GU’ call first this retrieves the first Segment. Then, to retrieve subsequent message segments for that Message, it issues ‘GN’ calls repeatedly until ‘QD’ status code is encountered.
![Page 20: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/20.jpg)
• To Send An Output Message – – Issue ISRT calls that specify the I/O PCB.
– The Program issues a separate ISRT calls for each segment for Multiple Segments to be written.
– I/O Area to be build before you issue this call
![Page 21: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/21.jpg)
• Input Message I/O Area Format
ZZ
LL Data
•LL – Length of Entire Segment Usage: S9(3) Comp
•ZZ – IMS Reserved Data Usage: S9(3) Comp
![Page 22: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/22.jpg)
• Output Message I/O Area Format
Z1
LL Data
•LL – Length of Entire Segment Usage: S9(3) Comp
•Z1 & Z2 – IMS Reserved Data Usage: X(2)
Z2
![Page 23: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/23.jpg)
Module –3, MFS Facilities
• Message Format Services (MFS)– MFS, is an IMS feature that lets you used
Formatted Display Screens.– MFS Modules reside in the IMR Control
Region, and they are invoked between IMS Communication Control Module and its Queue Manager.
![Page 24: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/24.jpg)
• MFS Control Blocks :– To process a Transaction, MFS uses 4
Control Blocks.
Terminal
Device Input
Format (DIF)
Device Output
Format (DOF)
Mesg Input
Descriptor
(MID)
Mesg Output
Descriptor
(MOD)
Application Program
Input Message
Sent by Terminal
Output Message
Sent by Program
Output MessageRecv by Terminal
Input MessageRecv by Program
![Page 25: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/25.jpg)
– For an Input Message, MFS uses a block called a Device Input Format (DIF) to interpret data as it’s received from a Terminal.
– It uses second Block called Message Input Descriptor (MID), to determine how that input Data should be formatted for presentation to the Application Program.
![Page 26: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/26.jpg)
– For an Output Message, MFS uses Similar blocks, A Message Output Descriptor (MOD) is used to interpret Data Received from the Application Program.
– A Device Output Format (DOF), is used to determine how that Data should be formatted for Transmission to the Terminal.
– A group of Related all these four Control Blocks are called FORMAT SET.
![Page 27: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/27.jpg)
• Format Set– Creating a Format Set
– MFS Language Utility is used to Translate the Format Sets to the Control Blocks.
– To run the Application
/Format <MOD name>
![Page 28: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/28.jpg)
Module – 4, Advanced IMS DC Topics
• Paging– The Facility that lets Messages to be Broken
down into Components for display, for Processing or for both purpose.
– Advantage of Paging is that it facilitates to create Long & Complex output Messages.
![Page 29: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/29.jpg)
– There are Two kinds of Paging• Physical Paging• Logical Paging
![Page 30: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/30.jpg)
• Alternate Destination Concepts :– The application Program that’s processing a
Single Input Message can send multiple Output Message to Multiple Destinations.
– ISRT call is issued but only difference is that the call specifies Alternate PCB instead of I/O PCB.
![Page 31: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/31.jpg)
– Alternate PCB (ALTPCB), which are specified in the programs PSBGEN job, name the other terminals or transactions to which the program can send Messages.
Application
ProgramData
Base
Terminal
Printer
Input Message
Output Message
(IOPCB)
Output Message
(ALTPCB)
![Page 32: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/32.jpg)
• Batch Message Processing Application:– A BMP program, is a combination of an MPP
and a Batch Program.
– A BMP program runs in a dependant Region under the control of IMS
– A BMP program is scheduled through JCL, it’s not automatically Scheduled by IMS.
![Page 33: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/33.jpg)
• Conversational Application– There are three ways to maintain Data
between Terminal Interaction.• Store Data in the Terminal Screen.• Store Data in the Databases• Store Data in the IMS provided Scratch Pad
Area.
![Page 34: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/34.jpg)
• Advantages & Disadvantages of these Techniques.– The First technique, is suitable only if the
Data is Simple & Non-Critical.
– The Second Technique, makes your Program more complicated and less efficient.
– The Last Technique, is to use a special area IMS provides just for that Purpose : The Scratch Pad Area (SPA).
![Page 35: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/35.jpg)
• Scratch Pad Area (SPA)– A conversational Program must use a SPA.
– A Unique SPA is associated with each terminal that’s running a conversational transaction.
![Page 36: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/36.jpg)
• Using SPA:– Define I/O Area for SPA :
01 SPA-IO-AREA. 05 SPA-LL PIC S9(4) COMP. 05 SPA-ZZ PIC S9(4) COMP. 05 SPA-CI PIC S9(4) COMP. 05 SPA-TRAN-CODE PIC X(8). 05 SPA-USER-DATA PIC X(---).
– The area is much similar to the Message Segment
![Page 37: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/37.jpg)
– In Addition to LL & ZZ fields, the SPA contains a Third binary halfword CI (Conversational Identifier) which IMS uses to keep track of SPA.
![Page 38: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/38.jpg)
• IMS Calls in Conversational Programs :– In Conversational Programs, SPA should be
retrieved first before retrieving Message Segments. This is done by issuing a ‘GU’ call against I/O PCB.
CALL ‘CBLTDLI’ USING DLI-GU
IO-PCB-MASK
SPA-IO-AREA.
![Page 39: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/39.jpg)
– To save Data in the SPA, an ISRT call is issued against I/O PCB.
CALL ‘CBLTDLI’ USING DLI-ISRT
IO-PCB-MASK
SPA-IO-AREA
– You must not send an output Message Segment before you’re saved the SPA.
– At the start of conversation, the SPA is set to Binary Zeros.
![Page 40: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/40.jpg)
• Program Switching :– Switching from on Conversational Program
to Another requires that both the SPA & Message to be processed by the second program be transferred.
– There are two kinds of Program-to-Program Message switches• Immediate Program Switching.• Deferred Program Switching.
![Page 41: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/41.jpg)
• Immediate Program Switching :
Application Program - 1
Application Program - 2
Terminal
Output Message
Input Message
SP
A
Switch Message Segment
![Page 42: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/42.jpg)
– The Program that receives the input Message is not the same one that responds to the Terminal.
– The First Program passes in SPA and other necessary data to the second Program, which does additional processing and respond to the originating terminal.
![Page 43: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/43.jpg)
• Deferred Program Switching :
Application Program - 1
Application Program - 2
Terminal
Output Message 2
Input Message 1
SP
AOutput Message 1
Input Message 2
![Page 44: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/44.jpg)
– A single Conversation involves two different Application Programs, one for each of two terminal Interactions.
– The data stored in SPA is passed from the first program to the Second.
– The second program isn’t invoked until the user sends the next input message
– This technique can impose less overhead on the IMS system & can result in faster response.
![Page 45: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/45.jpg)
Module-5, Error Handling in IMS.
• Logging:– Records all Database Updates, all Message
queued and all program scheduled.
– These Information can be used to restore the system if a failure occurs.
![Page 46: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/46.jpg)
• Recovery:– IMS provides extensive facilities for
Recoveries in the event of failure
– If an Application Program Abends, IMS automatically reverse or Rollback the changes it has made to the Databases and Message Queues.
![Page 47: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/47.jpg)
• Checkpointing:– The checkpoints are taken automatically with
each transaction a program processes. (This is called Single Mode Processing.)
– In Multiple Mode Processing, the only automatic checkpoint is at the End of the Program. However, the program can force a checkpoint by issuing CHKP call, which causes IMS to write a Checkpoint Record to the Log.
![Page 48: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/48.jpg)
– The Checkpoint Call Syntax:
CALL ‘CBLTDLI’ USING DLI-CHKP
IO-PCB-MASK
INPUT-MESG-IO-AREA.
![Page 49: IMS DC](https://reader036.fdocuments.net/reader036/viewer/2022081412/5440623fb1af9f017b8b47d6/html5/thumbnails/49.jpg)
• Batch Terminal Simulator (BTS)– It is an IMS-DC Program Development Tool.
– This tool lets you run DC Applications using real DL/I Databases, MFS Format sets, and IMS Modules.
– Apart from running the Application, this gives you lot of Information which could be used for Debugging Purpose.
– Should be run from Batch Environment.