ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Using of CORRELATION ID

Post new topic  Reply to topic
 Using of CORRELATION ID « View previous topic :: View next topic » 
Author Message
Sudheer88
PostPosted: Thu Dec 19, 2002 5:16 am    Post subject: Using of CORRELATION ID Reply with quote

Newbie

Joined: 08 Aug 2002
Posts: 8

Hi
I am trying to use CORREL-ID in my MQ series MQPUT application, so that I can select a particular message to be retrieved from the queue later using MQGET.
I appreciate if you could let me know what options I need to use to make this possible.
Currently I used MQCI-NONE to MQMD-CORRELID.
Thanks
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Dec 19, 2002 5:44 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

You need to add MQMO_MATCH_CORREL_ID in the matchoptions attribute.

Cheers.
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sudheer88
PostPosted: Thu Dec 19, 2002 6:06 am    Post subject: Reply with quote

Newbie

Joined: 08 Aug 2002
Posts: 8

Thanks a lot for the reply.
But here I am not able to generate the CORREL-ID from the MQPUT call. When I see the CORREL-ID after a MQPUT call , it is zeros for all the messages.

I am working on OS390 using COBOL.

Thanks
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Dec 19, 2002 6:26 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

What are your put options. Can you post your code here.

Try this... In the put app itself, after the put is completed, print the correlid.
Is your put and get apps diff???

Cheers
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sudheer88
PostPosted: Thu Dec 19, 2002 6:40 am    Post subject: Reply with quote

Newbie

Joined: 08 Aug 2002
Posts: 8

Below is my code for MQPUT.
Both MQPUT and MQGET are different applications.
I printed the Correl-id and saw ZEROS in all.
Do I need to use any options to get QMGR generate the correl-id everytime it puts a mesg in the Queue........?
If yes ... I am missing that option, I guess..........

---------------------------------------------------------------------------
MOVE MQMI-NONE TO MQMD-MSGID.
**These two are commented*******************
MOVE MQCI-NONE TO MQMD-CORRELID.
MOVE MQCI-NEW-SESSION TO MQMD-CORRELID.
*******************************************

MOVE TRANS-FIELDS TO WS-OUTPUT-BUFFER.

COMPUTE MQPMO-OPTIONS = MQPMO-NO-SYNCPOINT +
MQPMO-FAIL-IF-QUIESCING.

MOVE MQMT-REPLY TO MQMD-MSGTYPE.
MOVE MQFMT-STRING TO MQMD-FORMAT.

CALL 'MQPUT' USING CON-HANDLE
OPO-Q-HANDLE
MQMD
MQPMO
OUTPUT-BUFFER-LENGTH
WS-OUTPUT-BUFFER
COMP-CODE
REASON-CODE.
-----------------------------------------------------------------------------


Thanks
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Dec 19, 2002 7:27 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

So you are missing MQPMO_NEW_CORREL_ID, from your pmo options. This would allow the QM to generate a unique correl id for you. If you wish you could as well pass one yourself "hardcoding" within your put app. At that time you dont need to set the above option.

Cheers.
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sudheer88
PostPosted: Thu Dec 19, 2002 7:52 am    Post subject: Reply with quote

Newbie

Joined: 08 Aug 2002
Posts: 8

Thanks. I tried this option just now. But it gave the below error.
"MQPMO-NEW-CORREL-ID" WAS NOT DEFINED AS A DATA-NAME.

I didn't find this option in any of my MQ copy books used below.(CMQgmoV,CMQmdV,CMQodV,CMQpmoV,CMQV)

Could you please explain me where can I find this.........?

Thanks
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Dec 19, 2002 7:58 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

The definition is there in CMQV copy book.

What version of MQ are you using???
Do you have the latest copy books.
10 MQPMO-NEW-CORREL-ID PIC S9(9) BINARY VALUE 128.
What platform???

Cheers.
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sudheer88
PostPosted: Thu Dec 19, 2002 8:14 am    Post subject: Reply with quote

Newbie

Joined: 08 Aug 2002
Posts: 8

Yes I am using the latest. Please see the below product info.

*********************************************** **
** IBM MQSeries for OS/390
**
** COPYBOOK NAME: CMQV **
** DESCRIPTION: Constants for Main MQI
**
***********************************************
** @START_COPYRIGHT@
** Statement: Licensed Materials - Property of IBM
**
** 5655-F10
** 5655-F10
** (C) Copyright IBM Corporation. 1993, 2000
**
** Status: Version 5 Release 2
** @END_COPYRIGHT@
***********************************************
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Dec 19, 2002 8:26 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

For the time being why dont you just initialize the correl id in your program while you figure out why the definition is not in your copy books.

Abstract from the family manuals.
"This option is supported in the following environments: AIX, HP-UX, OS/2, AS/400, Sun Solaris, Windows NT, plus MQSeries clients connected to these systems. "

Which means probably it is not available on OS/390.

Check with your ibm rep for more info.

But the other alternative which i suggested should serve your purpose.

Cheers.
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sudheer88
PostPosted: Thu Dec 19, 2002 10:37 am    Post subject: Reply with quote

Newbie

Joined: 08 Aug 2002
Posts: 8

Thanks. I am in the process of checking with MQ admin/IBM rep to make sure are my copy books are from latest version or not............

And I was able to put messages by hardcoding the values in MQPUT call.

Now my next problem is ............
I have 8 messages in the below CID sequence.
Correl-id
----------
1111111
1111111
1111111
2222222
1111111
1111111
1111111
2222222


Now I want to read all messages with match CIDs and process them and write into a file.

Options tried
---------------
1) MOVE MQMI-NONE TO MQMD-MSGID
MOVE MQCI-NONE TO MQMD-CORRELID
then got all, but same order as above...

2) MOVE MQMI-NONE TO MQMD-MSGID
commented this ****MOVE MQCI-NONE TO MQMD-CORRELID
then got only mesgs with CID 1111111.

3) COMPUTE MQGMO-OPTIONS = MQGMO-NO-WAIT +
MQGMO-ACCEPT-TRUNCATED-MSG +
MQGMO-CONVERT +
MQGMO-FAIL-IF-QUIESCING +
MQMO-MATCH-CORREL-ID.
then also got only the CID 1111111.

So do I need to write any logic to move the new CID when it changes or is there any option to get the new CID automatically.

Please let me know.....................

I really appreciate for all your help.

Thanks
Back to top
View user's profile Send private message
Shreyu
PostPosted: Thu Dec 19, 2002 2:41 pm    Post subject: Reply with quote

Newbie

Joined: 19 Dec 2002
Posts: 5
Location: Dallas TX.

I guess you need to write a logic to move the new Correl-id when it finishes, processing of match Correl-id messages
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Using of CORRELATION ID
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.