ims-dc ppt

49
IMS DC Objective:To provide an insight into the fundamentals of IMS DC

Upload: deepak-dada

Post on 30-Nov-2015

255 views

Category:

Documents


19 download

DESCRIPTION

ims dc ppp

TRANSCRIPT

Page 1: ims-dc ppt

IMS DC

Objective:To provide an insight into the fundamentals of IMS DC

Page 2: ims-dc ppt

Course Details

No:

Name: IMS DC Fundamentals

Introduction: This material Explains Online processing that can be handled using IMS DC.

Page 3: ims-dc ppt

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 ppt

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 ppt

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 ppt

• Interactive Programs

– What is Online Processing– Differences between Batch & Online Processing– Major Kinds of Online Programs that can be written

Page 7: ims-dc ppt

IMS Data Communication(DC) Basic:

Terminal IMS DC Program Database

Input Message

Output MessageProcess

Page 8: ims-dc ppt

• 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 ppt

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 ppt

• 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 ppt

• 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 ppt

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 ppt

• 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 ppt

– 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 ppt

• 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 ppt

• 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 ppt

• 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 ppt

• 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 ppt

– 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 ppt

• 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 ppt

• 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 ppt

• 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 ppt

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 ppt

• 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 ppt

– 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 ppt

– 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 ppt

• 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 ppt

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 ppt

– There are Two kinds of Paging• Physical Paging• Logical Paging

Page 30: ims-dc ppt

• 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 ppt

– 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 ppt

• 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 ppt

• 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 ppt

• 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 ppt

• 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 ppt

• 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 ppt

– 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 ppt

• 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 ppt

– 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 ppt

• 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 ppt

• Immediate Program Switching :

Application Program - 1

Application Program - 2

Terminal

Output Message

Input Message

SP

A

Switch Message Segment

Page 42: ims-dc ppt

– 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 ppt

• 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 ppt

– 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 ppt

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 ppt

• 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 ppt

• 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 ppt

– The Checkpoint Call Syntax:

CALL ‘CBLTDLI’ USING DLI-CHKP

IO-PCB-MASK

INPUT-MESG-IO-AREA.

Page 49: ims-dc ppt

• 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.