CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Perl MQSeries Getq

 



jason123
New User

Jul 14, 2015, 11:08 AM

Post #1 of 1 (2654 views)
Perl MQSeries Getq Can't Post

I've just updated Perl from5.8.1 to 5.18.2 and MQSeries to 1.31. MQ Puts are working fine, and MQ Gets are still connecting and retrieving data from the queue, but I'm no longer able to access the returned data from the returned data()->{Body}. Below is the code that used to return the body data before the upgrades. Any ideas why return $returndata->{Body}; no longer returns data?

package MQCom;

use strict;

use MQSeries;
use MQSeries::Message::IIH;
use MQSeries::QueueManager;
use MQSeries::Queue;
use MQSeries::Message;



$::getq = MQSeries::Queue->new
(
QueueManager => $::qmgr,
Queue => $::getqname,
Options => MQSeries::MQOO_INPUT_AS_Q_DEF,
) || errProc "Unable to open $::getqname\n";

if ($::errorCode ne "0000") {
return "2033";
}

&logger::write_to_log( "Get queue $::getqname is opened\n" );

my $returnmessage = MQSeries::Message->new
(
MsgDesc =>
{
Format => MQSeries::MQFMT_IMS,
},
);
## Get the message

$::getq->Get
(
Message => $returnmessage,
Wait => $::pollrate,
GetMsgOpts => { Options => MQSeries::MQGMO_WAIT,
WaitInterval => $::pollrate,
},
) || errProc "Error occured while waiting for requests\n";

my $returndata = $returnmessage->Data();
return $returndata->{Body};

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives