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 » IBM MQ API Support » [Solved] help with COA (confirm of arrival) and perl

Post new topic  Reply to topic
 [Solved] help with COA (confirm of arrival) and perl « View previous topic :: View next topic » 
Author Message
golemwashere
PostPosted: Mon Jun 14, 2004 2:50 am    Post subject: [Solved] help with COA (confirm of arrival) and perl Reply with quote

Newbie

Joined: 29 Dec 2003
Posts: 8

Hello gurus,
I need help with this :
When my client is putting a message in a queue,I need
a COA message on another queue on the same queue manager...

This is the code snippet I'm trying to use:

_________________________________________________
Code:

  my $queue = MQSeries::Queue->new
    (
     QueueManager       => $qmgr_name,
     Queue              => $nomequeue,
     Mode               => 'output',
    )
    or die("Unable to open queue.\n");


my $putmessage = MQSeries::Message->new
(
     MsgDesc            =>
     {
      CorrelId => $correlid,
      MsgId => $msgid,
      Format            => MQFMT_STRING,
      ReplyToQ   => $replyqueue,
      ReplyToQMgr => $qmgr_name,
      Params            =>
     {
     Report => COA_WITH_DATA,
     }   

     },
    Data => $msg,

        
    );

  $queue->Put(
              Message => $putmessage,
              Sync => $sync
             )
    or die("Unable to put message onto queue.\n" .
           "CompCode = " . $queue->CompCode() . "\n" .
           "Reason = " . $queue->Reason() . "\n");


________________________________

The PUT works great but I have no Confirmation message in queue $replyqueue
and no message in DEAD.LETTER.QUEUE
any suggestion would be welcome
(I'm not really sure of MQMD syntax concering the report part)

Infinite thanks


Golem
Back to top
View user's profile Send private message
TJW
PostPosted: Thu Jul 08, 2004 7:06 am    Post subject: Reply with quote

Novice

Joined: 11 Dec 2002
Posts: 16
Location: UK

Your $putmessage should look like this:
Code:

my $putmessage = MQSeries::Message->new
(
     MsgDesc            =>
     {
      CorrelId => $correlid,
      MsgId => $msgid,
      Format            => MQFMT_STRING,
      ReplyToQ   => $replyqueue,
      ReplyToQMgr => $qmgr_name,
      Report => MQRO_COA_WITH_DATA
     },
    Data => $msg,

);


If this still doesn't work try using the real value of MQRO_COA_WITH_DATA, which is 768 (decimal).
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Jul 08, 2004 1:49 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

To get COA message with Data you would specify MQRO_COA_WITH_DATA option. To get only COA message you need to specify MQRO_COA option.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
golemwashere
PostPosted: Fri Jul 09, 2004 2:08 am    Post subject: It works!!! Reply with quote

Newbie

Joined: 29 Dec 2003
Posts: 8

Hey it works !!!!
only with the 768 value though
do you know what's the decimal number for COA without data or where to find all the values?
Thanks a lot guys
you're great as always

Golem
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Jul 09, 2004 7:44 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Quote:

To get only COA message you need to specify MQRO_COA option.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Jul 09, 2004 10:27 am    Post subject: Re: It works!!! Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

golemwashere wrote:
do you know what's the decimal number for COA without data or where to find all the values?


Decimal value for COA without data (MQRO_COA) is 256. You can find the constant names and their values into Application Programming Reference manual. It's recommended that you use constants instead of decimal values.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » [Solved] help with COA (confirm of arrival) and perl
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.