Vous êtes sur la page 1sur 50

CICS-WebSphere MQ Integration

Scott Meridew
Director of Professional Services, TxMQ

(905) 940.2427 x334 scott@txmq.com


www.txmq.com

Agenda
WebSphere MQ Introduction and Overview

WebSphere MQ Structure and Components


The MQ API (MQI) Advanced Concepts (Clustering, Triggering, Exits, Transactions, Threading, Security, Reports) The CICS Adapter (CKTI) The CICS Bridge (CKBR - monitor, CKBP - bridge)

Where to find more information

Typical Environment
Business Requirements: E - Business

Outside vendors/business connection


Multiple Platforms Diverse Applications

Lotus Notes Internet/Intranet SAP CICS - IMS on mainframe Workstations

Diverse Environment
Diverse Data

DB2 VSAM IMS Lotus Notes Oracle/SYBASE SAP Multiple Network Types

Role of Middleware
Communication Networking Transparency

Faster Application Deployment


New type of Application Data Mining - Incorporate New and Existing Data Application Mining - Reuse of Old with New Foundation of Future Technology

Time Independence

Types of Messaging
Fax

Distribute

Retrieve E - Mail

Store

Queue

Application

Application

WebSphere MQ Product
Common API

For all platforms Assure message delivery


not lost, and deliver only once Asynchronous Parallel processing Syncpoint control with Resource Managers

WebSphere MQ Benefits
Interoperability

Fast application deployment


Robust Client-Server Model Separation of functions Database Independence Different Application Style Parallelism Scalability Reuse of modules

Platforms - A single interface (the MQI)

WebSphere MQ Structure

WebSphere MQ Components
APPLICATION

Message Queuing Interface (MQI)

Queues
Queue Manager
Logging

NETWORK

OS Interface

Message Structure
Header
Message Attributes Message Format A Series of Message Attributes Understood and augmented by the Queue Manager Unique Message Id Correlation Id Routing information Reply routing information Message priority Message codepage/ encoding Message format .... etc.

User Data
Free format
Any sequence of bytes Private to the sending and receiving programs Not meaningful to the Queue Manager

WebSphere MQ Objects
Queue Manager

Most platforms except OS/400 can have multiple Queue Managers Queues
Process

Channels
Local and Remote Objects Cluster Objects

Distributed Queuing
Sales Application Inventory Application

MQI

MQI

QMGR ABC

QMGR XYZ Local Queue

Remote Queue

LOG

LOG

Dead Letter Queue

Channel
Transmission Queue

WebSphere MQ Client
Message Channel Agent

Channel
Client Channel SYNCHRONOUS

MQ Client

Message Channel Agent

Q Manager

Local Queue

The MQI

MQI Languages
COBOL

C
PL/I C++ (wrapper classes) Java (wrapper classes) Visual Basic (also COM wrapper classes) TAL (Tandem) Assembler (MVS) RPG (AS400) Smalltalk (wrapper classes)

Interfaces
TSO/ISPF REXX CICS IMS TM Java, JMS Web Lotus Notes

SAP
Visual Age Generator NON-IBM - INTERSPACE, MERCATOR, CANDLE, NEON

Send-and-Depend

Application a

Application b

Queue

Request and Reply


Queue

Application a

Application b

Reply Queue

Application a

Application b

Reply Queue

Application c

Application b

Publish and Subscribe


Application b

Subscription Queue

Application a

Pub/Sub Broker
Publication Queue

Application c

Subscription Queue

Application d

Subscription Queue

The MQI Verbs

Common MQ API Calls


MQCONN (MQCONNX) - Connect to Queue Manager MQOPEN - Open Queue MQGET - Get message from Queue MQPUT - Put message onto Queue MQPUT1 - Open/Put/Close MQCLOSE - Close Queue MQDISC - Disconnect from Queue Manager

Advanced MQ API Calls


MQINQ - Inquire attributes of QMgr or Queue MQSET - Set attributes of QMgr or Queue MQBEGIN - Start transaction

MQCMIT - Commit transaction


MQBACK - Backout transaction

Message Queuing Advanced Topics

Messaging - Sync Point


SYNCHRONOUS MODEL DB WRITE SEND TWO-PHASE COMMIT RECEIVE WRITE DB

SYNCPOINT
LOGICAL UNIT OF WORK ASYNCHRONOUS MODEL DB WRITE PUT SYNCPOINT

UOW 3

Q
UOW 2 UNIT OF WORK 1

GET WRITE SYNCPOINT

DB

High Availability - Clustering


Failover Workload balancing Default: round-robin User replaceable exit Reduced administration Automatic creation of: Queue definitions Channels Scalability New queue managers can join cluster at any time Platforms supporting clusters MQSeries 5.1 and 5.2
AIX 4.2 and 4.3.x HP/UX 10.20 and 11.x Sun Solaris 2.6, 2.7, 7, 8 OS/2 with "Workspace on Demand" Windows NT 4.0 and Win2K AS/400 - OS/400 V4 R4/5 Linux (RedHat 6.1, Caldera 2.2, SuSE 6.4, TurboLinux 3.6) MQSeries for OS/390 (started with V2.1)

Queue A

Queue B

Queue B

Queue A

Queue A

MQPUT

High Availability Queue Sharing Groups


SYSPLEX1

CF
DB
APPL MQSeries LQ1 MOVER MVS1

DB DB2 SQ1
APPL MQSeries LQ1 MOVER MVS2

MQSeries AIX

MQSeries Windows

Transactional control
Local unit of work

MQPUT/ MQGET (MQ*_ SYNCPOINT) updates only Coordinated by MQCMIT/ MQBACK Global unit of work (MQ) (Version 5 queue managers only)
MQPUT/ MQGET (MQ*_ SYNCPOINT) updates Database updates Coordinated by MQBEGIN/ MQCMIT/ MQBACK

Transactional control
Global unit of work (external coordination) MQPUT/ MQGET (MQ*_ SYNCPOINT) updates Other resource updates Coordinated by external transaction coordinator (e. g. CICS, Encina ...)

Triggering

Channel Exits
security
M C A

security send receive


M C A

message

message
retry

Transmission Queue

Server Input Queue

Security Exit: For channel authentication Send Exit: For Data compression Receive Exit: For Data decompression Message Exit: For encryption/decryption Message Retry Exit: For put failures Vendor products available for encryption/decryption, compression and compaction

Report Messages from a remote QMgr

The CICS Adapter (CKTI)

What is the CICS Adapter?


Allows CICS transactions to make MQ API calls (must link-edit to CSQCSTUB) Supports up to 8 concurrent MQ API calls Supports syncpointing under CICS syncpoint mgr Supports security checking (i.e. via RACF) API crossing exit (for intercepting and monitoring calls the MQI slows you down!)

Controlling the adapter


From the control panel:

CKQC
From the command line:

MODIFY CICS_Job_Name CKQC <command>


From the program: EXEC CICS LINK PROGRAM(CSQCRST ) INPUTMSG(CKQC MODIFY Y)

Start Adapter Connection to MQ


Via the adapter control panel (CKQC):

Must Provide QMGR, INITQ, Trace #


Via command line: CKQC START Y|N <QMGR> <TRACE> <INITQ> Via a CICS program: EXEC CICS LINK PROGRAM(CSQCQCON) INPUTMSG(CONNPL) INPUTMSGLEN(length of CONNPL)

Stop Adapter Connection to MQ


Via the adapter control panel (CKQC):

Specify Quiesce or Force


Via command line: CKQC STOP [FORCE] Via a CICS program: EXEC CICS LINK PROGRAM(CSQCDSC) INPUTMSG(CKQC STOP)

View Adapter Connection Stats


Only Via the adapter control panel (CKQC):

Parameters used for the connection Statistics totals for current connection Statistics produced by the adapter

The task initiator (trigger for CICS)


Built-in CICS Transaction called CKTI Monitors an initiation queue Starts another CICS transaction (defined in an MQ PROCESS definition) 1-1 relationship between an instance of CKTI and an initiation queue in CICS subsystem

Start/Stop CKTI
Via control panel: INITQ name must be provided Via command line:

CKQC STARTCKTI CKCQ STOPCKTI


Via an application program EXEC CICS LINK PROGRAM(CSQCSSQ ) INPUTMSG(CKQC STARTCKTI INITQ.NAME) EXEC CICS LINK PROGRAM(CSQCSSQ) INPUTMSG(CKQC STOPCKTI INITQ.NAME)

How CICS, the adapter, and MQ fit

The CICS Bridge (CKBR Monitor, CKBP Bridge)

What does the bridge do?


Enables access to CICS programs from MQ programs No MQI calls within CICS program 3270-connected transactions can be driven via MQ messages instead of 3270 streams (no recompile or re-link needed) CICS DPL programs can be driven (EXEX CICS LINK) by MQ messages MQ CICS Header (MQCIH) structure identifies what CICS transaction(s) to run

Why use the bridge?


To access legacy business processes with minimal impact on them: From a new MQ application From a Lotus Notes application From a WebSphere EJB application From a Web Service using MQ Internet Gateway

Driving CICS DPL programs

COMMAREA used to pass MQ data using EXEC CICS LINK

Driving CICS 3270 transactions

MQCIH data is used to drive the appropriate transaction(s)

Where to Find More Information

Additional Resources
System parameters

Setting up the CICS adapter


Setting up the CICS bridge Operating the CICS adapter Operating the CICS bridge Console messages Writing CICS applications API-crossing exit Writing CICS bridge applications

WebSphere MQ for z/OS System Setup Guide

WebSphere MQ for z/OS System Administration Guide WebSphere MQ for z/OS Messages and Codes WebSphere MQ Application programming Guide CICS Internal and External Interfaces Guide

Vous aimerez peut-être aussi