Académique Documents
Professionnel Documents
Culture Documents
Course Details
No: Name:
IMS DC Fundamentals
Introduction: This material Explains Online processing that can be handled using IMS DC.
Course Details
Pre-Requisite Knowledge of IMS DB Target Audience Mode of Training Evaluation Criteria To be decided by the CR and SWS Class Room Attendance > 80 % and/or (Case study Completion or Test score > 70%)
Lesson Plan
M# 1 2 3 4 5 6 Topic Introduction IMS-DC processing MFS Facilities Advanced IMS-DC topic Error Handling in IMS Time(hrs) 2 3 2 2 2
Module 1- Introduction
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.
Interactive Programs
What is Online Processing Differences between Batch & Online Processing Major Kinds of Online Programs that can be written
Input Message
Terminal
Output Message
IMS DC Program
Process
Database
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 thats transmitted between a program and a Terminal The above type of program is called Message Processing Programs (MPPs)
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.
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).
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.
PIC X(8). PIC X(2). PIC X(2). PIC S9(7) COMP-3 PIC S9(6)V9 COMP-3 PIC S9(5) COMP. PIC X(8). PIC X(8).
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.
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.
ZZ
LL Length of Entire Segment Usage: S9(3) Comp
ZZ IMS Reserved Data Usage: S9(3) Comp
Z1 Z2
LL Length of Entire Segment Usage: S9(3) Comp
Z1 & Z2 IMS Reserved Data Usage: X(2)
Applicati on Program
For an Input Message, MFS uses a block called a Device Input Format (DIF) to interpret data as its 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.
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.
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>
Alternate PCB (ALTPCB), which are specified in the programs PSBGEN job, name the other terminals or transactions to which the program can send Messages.
Input Message
Terminal Output Message (IOPCB) Application Program
Data Base
Printer
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.
Using SPA:
Define I/O Area for SPA :
01 SPA-IO-AREA. 05 SPA-LL 05 SPA-ZZ 05 SPA-CI 05 SPA-TRAN-CODE 05 SPA-USER-DATA PIC PIC PIC PIC PIC S9(4) COMP. S9(4) COMP. S9(4) COMP. X(8). X(---).
In Addition to LL & ZZ fields, the SPA contains a Third binary halfword CI (Conversational Identifier) which IMS uses to keep track of SPA.
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 youre saved the SPA. At the start of conversation, the SPA is set to Binary Zeros.
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.
Terminal
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.
Terminal
Application Program - 2
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 isnt invoked until the user sends the next input message This technique can impose less overhead on the IMS system & can result in faster response.
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.
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.