IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

MQ-IMS bridge


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manojsharma1122

New User


Joined: 24 Jul 2007
Posts: 12
Location: india

PostPosted: Wed Nov 21, 2012 1:30 am
Reply with quote

Hi,

I am trying to implement an MQ-IMS functionality in one of my cobol code. I have to pass data through MQ to a particular IMS region where my IMS transaction should get triggered. For this I have got an MQ defined as an OTMA and is mapped to the required IMS region.
Can anyone please help me about the format of the data to be put into the MQ. I know I have to use the MQIIH header format but not sure how it should be used while making MQ calls. Also there is concept of LL & ZZ fields where LL should be the total length including LLZZ. How to calculate this LL field.

Thanks for any help you provide me on this.

Manoj
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Nov 21, 2012 10:44 pm
Reply with quote

Here are snippets from my test program that I wrote about seven years ago.
Code:
* THE CMQIIHV COPYBOOK NEEDS TO PROCEED THE MESSAGE TEXT     
* TO WORK WITH THE OTMA PROCESSOR                           
 01  W00-MSGBUFFER.                                         
   05  MQM-IIH-HEADER.                                       
     COPY CMQIIHV.                                           
   05  W00-MSGBUFFER-LENGTH-LLZZ.                           
      10 W00-MSGBUFFER-LENGTH-LL PIC 9(04) COMP.             
      10 W00-MSGBUFFER-LENGTH-ZZ PIC 9(04) COMP.             
   05  W00-MSGBUFFER-ARRAY       PIC X(1) OCCURS 65535 TIMES.


Code:
         MOVE MQICM-SEND-THEN-COMMIT  TO MQIIH-COMMITMODE     
         MOVE MQMT-REQUEST            TO MQMD-MSGTYPE         
* MQFMT-IMS tells OTMA that there is an IIH header           
         MOVE MQFMT-IMS               TO MQMD-FORMAT         
* MQFMT-IMS-VAR-STRING is the llzz protocol, so the           
* first 4 bytes show the length of the segment in the         
* request data.  The REPLYTOFORMAT tells MQ to send the       
* reply using the same protocol.                             
         MOVE MQFMT-IMS-VAR-STRING    TO MQIIH-FORMAT         
                                         MQIIH-REPLYTOFORMAT 


Code:

* REPLYTOQ is where OTMA will send the results                   
         MOVE 'xxxxxxx.IMSBRIDGE.REPLY.QUEUE'             
                                      TO MQMD-REPLYTOQ           
* The TOTAL MQ message length is the IIH header (84 bytes),     
* plus the LLZZ (4 bytes), plus the actual message (varies).     
* The length for LL is ONLY the length of the IMS message.       
         MOVE 0                       TO W00-MSGBUFFER-LENGTH-ZZ
         ADD  +4                      TO W00-MSGLENGTH           
         MOVE W00-MSGLENGTH           TO W00-MSGBUFFER-LENGTH-LL
         ADD LENGTH OF MQM-IIH-HEADER TO W00-MSGLENGTH           


Code:

         CALL 'MQPUT' USING W03-HCONN         
                            W03-HOBJ         
                            MQMD             
                            MQPMO             
                            W00-MSGLENGTH     
                            W00-MSGBUFFER     
                            W03-COMPCODE     
                            W03-REASON       
Back to top
View user's profile Send private message
arindam111

New User


Joined: 29 Nov 2006
Posts: 27
Location: India

PostPosted: Sun Dec 02, 2012 1:18 pm
Reply with quote

Also, make sure you use correlation id of PUT call to the message ID of the RECEIVE call in case you are receiving from MQ.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts 3270 Bridge - html return code 500 CICS 1
No new posts DFHL3270 Bridge CICS 4
No new posts CICS Bridge Link Program CICS 8
No new posts What is Bridge JCL JCL & VSAM 2
No new posts walking in a bridge General Talk & Fun Stuff 2
Search our Forums:

Back to Top