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

Comparing MQ MSG ID and correlation ID


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SushilZade

New User


Joined: 25 Jun 2010
Posts: 4
Location: Pune

PostPosted: Fri May 23, 2014 5:36 pm
Reply with quote

Hi,

Can someone help me with this. I tried to look for the information supporting the scenario but couldn't find.
Here is the scenario -

When the message is PUT, the MSGID generated is retained with the application in a db2 table A with column of 24 char.
The messages are then accessed cross - platform and Acknoweldgment MQ message is sent back to the originating application with correlation ID same as msg ID.

I am trying to retrieve the record from table A using correlation ID for associated msgid. With an sql for msgid = correlation id; I am not getting any rows.

When I browsed both the queues, I found that the 24 bytes of msg ID and correlation ID are matching.

Thank you.
Back to top
View user's profile Send private message
SushilZade

New User


Joined: 25 Jun 2010
Posts: 4
Location: Pune

PostPosted: Mon May 26, 2014 5:21 pm
Reply with quote

Got the solution! Hope this will help someone having similar problem.

MQGMO-CONVERT comes to the rescue. While analysing the program and using Google to its effect; found that MQGMO_CONVERT should always be used with MQGET statement in summing up the MQGMO-OPTIONS.

Code:
COMPUTE MQGMO-OPTIONS           = MQGMO-WAIT
                                + MQGMO-SYNCPOINT
                                + MQGMO-FAIL-IF-QUIESCING
ADD MQGMO-CONVERT              TO MQGMO-OPTIONS.
.
.
Code:
MOVE MQMI-NONE                 TO MQMD-MSGID.
MOVE MQCI-NONE                 TO MQMD-CORRELID.

CALL 'MQGET'                USING MQ-HCONN
                                  MQ-NATIVE-HOBJ
                                  MQMD
                                  MQGMO

.
.

As I observed, MQGMO-CONVERT was missing from the code.
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 -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Comparing Header and Trailer. DFSORT/ICETOOL 7
No new posts Comparing Signed Packed decimal and p... SYNCSORT 2
No new posts Comparing Comp-3 fields with greater ... DFSORT/ICETOOL 11
No new posts Comparing inside same file DFSORT/ICETOOL 2
No new posts Comparing two sequential files COBOL Programming 14
Search our Forums:

Back to Top