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 » I'm doing something wrong with the CorrelId...

Post new topic  Reply to topic
 I'm doing something wrong with the CorrelId... « View previous topic :: View next topic » 
Author Message
Sam12345
PostPosted: Thu Oct 02, 2003 6:39 am    Post subject: I'm doing something wrong with the CorrelId... Reply with quote

Novice

Joined: 11 Sep 2003
Posts: 15

I'm doing something wrong with the CorrelId. If someone could please look at the snippet below and tell me where I've gone wrong... The print statements show I have the MsgId and the ReplyToQ correctly loaded, but the CorrelId is always blank....
It is written in Perl. Any help greatly appreciated.

my $CIRCorrelId = " MSS0001";
my $CIRReplyToQ = "MQST.TALK.OUTPUT";
my $MsgDesc =
{ReplyToQ => $CIRReplyToQ,
Format => MQFMT_STRING,
MsgId => $CIRCorrelId,
MQMD_REPORT => MQRO_COPY_MSG_ID_TO_CORREL_ID |MQRO_PASS_CORREL_ID | MQRO_PASS_MSG_ID};

my $PutMsgOpts = {MQRO_COPY_MSG_ID_TO_CORREL_ID};

MQPUT($Hconn,
$Hobj_send,
$MsgDesc,
$PutMsgOpts,
$test_msg1,
$CompCode,
$Reason);
print"MQPUT 1 reason:$Reason\n";
print"********************************************\n";
print " Correlid:" . $MsgDesc->{CorrelId} . "\n";
print " MsgId:" . $MsgDesc->{MsgId} . "\n";
print " ReplyToQ:" . $MsgDesc->{ReplyToQ} . "\n";
print " Hobj_send:" . $Hobj_send . "\n";
print " MsgDesc:" . $MsgDesc . "\n";
print "PutMsgOpts:" . $PutMsgOpts . "\n";
print"********************************************\n";
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Oct 02, 2003 7:00 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

I dont see where you set the correlID field in the mqmd(MsgDesc) in your code ??
I will look closer to make sure I didnt miss something
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
Sam12345
PostPosted: Thu Oct 02, 2003 7:07 am    Post subject: I'm doing something wrong with the CorrelId Reply with quote

Novice

Joined: 11 Sep 2003
Posts: 15

Jeff,
If I do the following, it does appear:
my $MsgDesc =
{ReplyToQ => $CIRReplyToQ,
Format => MQFMT_STRING,
MsgId => $CIRCorrelId,
CorrelId => $CIRCorrelId,
MQMD_REPORT => MQRO_COPY_MSG_ID_TO_CORREL_ID |MQRO_PASS_CORREL_ID | MQRO_PASS_MSG_ID};
But I was told locally I did not have to do this because it should get transferred from the MsgId automatically. I'm I getting bad advice and the code above is correct?
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Oct 02, 2003 7:29 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

I believe you are getting bad advice, or who gave you the advice means somewhere after your MQPUT call the correlID is copied from the msgid, for instance if you are using MQSI Broker the message flow inside the broker can do the copying.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
bower5932
PostPosted: Thu Oct 02, 2003 8:14 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If you are counting on the flags to do the copying, they are supposed to be honored by the program getting the message. There are a couple of C samples at: http://www.developer.ibm.com/tech/sampmq.html. They are called mqsrvro.cpp and mqreqro.cpp that show the processing that the getter does.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
mrlinux
PostPosted: Thu Oct 02, 2003 8:28 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Looking at his perl script and his description he was expecting it to happen
based on the MQPUT call only.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
Sam12345
PostPosted: Thu Oct 02, 2003 9:57 am    Post subject: I'm doing something wrong with the CorrelId... Reply with quote

Novice

Joined: 11 Sep 2003
Posts: 15

Then, assuming no additional packages such as the MQSI Broker, is the last piece of code where I manually load the CorrelId to both the MsgId and the CorrelId the correct way to do this?
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Oct 02, 2003 10:07 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Yes, however I have to ask a question do you plan on using the correlID to retrieve a reply to your message or are you just setting it to set it because someone told you had to set it ????
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
Sam12345
PostPosted: Thu Oct 02, 2003 10:21 am    Post subject: I'm doing something wrong with the CorrelId... Reply with quote

Novice

Joined: 11 Sep 2003
Posts: 15

Yes to both. I was told I need to set it so I can retrive a response on the ReplyToQ from a mainframe. I was given a specific CorrelId to use.
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Oct 02, 2003 10:39 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Well then you are doing it correctly.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
Sam12345
PostPosted: Thu Oct 02, 2003 10:45 am    Post subject: Reply with quote

Novice

Joined: 11 Sep 2003
Posts: 15

Thank you for the help!
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 » I'm doing something wrong with the CorrelId...
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.