Outline Problem Definition Solutions Environment MQ Concepts Terminology
Outline • • • Problem Definition Solutions Environment MQ Concepts / Terminology In House Architecture Installation / Operations
Problem(s) to be Solved • Replace IDMS-DC Queues / DC COBOL • Access IDMS database from Client Server and Web Applications
Requirements • Re-use existing ADSO application code • Use Middle Tier Access Methodology • Isolate Business Logic
Solutions • Use IBM Web. Sphere® MQ (IBM MQSeries) for Cross Platform communications and Queue processing • Design In-House Middle Tier Access Methodology • Interface MQSeries with IDMS
Environment • IDMS Release 15. 0 • OS/390 SP IBM 2064 -2 C 3 • IBM Web. Sphere® MQ V 5. 3
Some Concepts • Messaging • MQ Series Primer http: //www. redbooks. ibm. com/redpapers/pdfs/redp 0021. pdf
Some Terms • • • Queue Manager Transport Layer Target Platform Asynchronous / Synchronous Queue / Messages Listener / Monitor
Program that runs in the same machine as the Queue Manager Application Program A PUT to Q 1 Application Program B GET from Q 1 Message Queue
Program that runs in a Remote system Remote Queue Manager Host / Server Queue Manager Application Program A PUT to Q 1 Application Program B GET from Q 1 Channel. Using TCP/IP, SNA, SPX Messages Message Queue Remote Queue Q 1 Local Queue Q 1
Types of Queues • • • Local queue Remote queue Transmission queue Initiation queue Dynamic queue Alias queue Dead-letter queue Reply-to-queue Model queue Repository queue • • • is a real queue structure describing a queue (xmitq) local queue with special purpose local queue created "on the fly" if you don’t like the name one for each queue manager specified in request message model for local queues holds cluster information
The Message Queuing Interface (MQI) A program talks directly to its local queue manager. It resides in the same processor or domain (for clients) as the program itself. The program uses the Message Queuing Interface (MQI). The MQI is a set of API calls that request services from the queue manager. MQCONN Connect to a queue manager MQDISC Disconnect from a queue manager MQOPEN Open a specific queue MQCLOSE Close a queue MQPUT Put a message on a queue MQGET Get a message from a queue MQPUT 1 MQOPEN + MQPUT + MQCLOSE MQINQ Inquire properties of an object MQSET Set properties of an object MQCONNX Standard or fastpath bindings MQBEGIN Begin a unit of work (database coordination) MQCMIT Commit a unit of work MQBACK Back out.
IDMS / OCAMQ Overview MQSeries OCAMQ IDMS DB API / Message Queue Interface ADSO DC Cobol
IDMS / OCAMQ Overview UNIX MQSeries Client Other OCAMQ IDMS DB API / Message Queue Interface ADSO DC Cobol
CICS Cobol MQSeries Mainframe Batch Cobol OCAMQ IDMS DB API / Message Queue Interface ADSO DC Cobol
CICS Cobol MQSeries Mainframe Batch UNIX Client Cobol Other OCAMQ IDMS DB API / Message Queue Interface ADSO DC Cobol
Replace DC Queue with MQSeries • Application Required Queue processing • Development Staff moving away from DC COBOL
MQSeries Request OCA/ MQ IDMS CV 4 IDMS DB
Middle Tier Application
Client Middle Tier Server Business Logic Data Access DB MQ Accessor ODBC Sybase Oracle MQSeries IDMS CV 1 MQSeries MQ Accessor (CICS) IDMS CV 2 IDMS DB Reply OCA/ MQ IDMS CV 3 IDMS DB Request OCA/ MQ IDMS CV 4 IDMS DB
Sample Program (PREMAP) MOVE MQ-QMGR-NAME TO WK-SYS-QMGR. MOVE MQ-QUEUE-NAME TO MQOD-OBJECTNAME. !* ROUTINE TO OPEN THE QUEUE TO GET MESSAGES MOVE 'MQOPEN' TO WK-SYS-MQSERIES-FUNCTION. LINK TO PROGRAM 'MQOPEN' USING MQM-OBJECT-DESCRIPTOR !* ROUTINE TO GET THE MESSAGE INIT (MQM-MESSAGE-DESCRIPTOR). INIT (MQM-GET-MESSAGE-OPTIONS). MOVE 'MQGET' TO WK-SYS-MQSERIES-FUNCTION. LINK TO PROGRAM 'MQGET' USING MQM-MESSAGE-DESCRIPTOR MQM-GET-MESSAGE-OPTIONS !* ROUTINE TO PUT MESSAGES IN THE QUEUE INIT (MQM-MESSAGE-DESCRIPTOR). INIT (MQM-PUT-MESSAGE-OPTIONS). MOVE MQPER-PERSISTENT TO MQMD-PERSISTENCE. COMPUTE MQPMO-OPTIONS = MQPMO-NO-SYNCPOINT + MQPMO-DEFAULT-CONTEXT. MOVE 'MQPUT' TO WK-SYS-MQSERIES-FUNCTION. LINK TO PROGRAM 'MQPUT' USING MQM-MESSAGE-DESCRIPTOR MQM-PUT-MESSAGE-OPTIONS !* ROUTINE TO CHECK THE OCA-MQSERIES STATUS FIELD IF WK-SYS-COMPCODE NE MQCC-OK MOVE WK-SYS-REASON TO MQ-SERVICE-STATUSMESSAGE. MOVE 'ERR' TO MQ-SERVICE-STATUS-CODE.
Implementation Cook Book • • • Install software Update IDD with IBM MQ Records Modify Sysgen, new programs, tasks Modify SIMIN file Update CV startup JCL – SIMIN File – Load libraries • OCAMQ • IBM MQSeries
Operations • • Auto Tasks to start interface SIMIN file to start Trigger Monitor Define Initiation Queue to IBM MQSeries Assemble Customized CV Options module
CV Start up messages
TASK ID 0000013598 000024 000025 0000013551 000031 TASK CD OPER NDVRSTRT NDVRSERV DMLO MQTRIGGR from OPER display PROGRAM RHDCOPER NDVRSGEN NDVRSERV USDTPIF 2 OCAMQS 02 TERMINAL UCF 0003 LD 000007 LD 000008 UCF 0002 LD 000001 PRI 240 235 185 100 STAT ACTV WAIT USER TDBA 003 OPSPROD TDEV 545 DISPLAY
Sallie Mae: Idd updates with IBM MQ records TSCP 099. SMP. OCAV 2 R 3. PPOPTION(#OCAV 001) cv options module(s) sysgen source, new program, autotasks (start mq interface) cv jcl - simin, (MQTRGSTT IDMSS 51. INITQ %ENTER) start trigger monitor, loadlibs IDMS - To start the MQSeries Interface, you have to invoke the MQSTART task code. - To start the Trigger Monitor, you have to invoke the MQTRGSTT task code. There is one para which is the name of the Initiation Queue. - The OCA trigger monitor will call your program. Your program has to obtain the trigger messa calling OCAMQS 03 as described in OCA/Programming 3. 4 sample pgms (sysduget/put)
- Slides: 29