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 » MQ/Perl - Getting the dynamic queue name

Post new topic  Reply to topic
 MQ/Perl - Getting the dynamic queue name « View previous topic :: View next topic » 
Author Message
Cliff
PostPosted: Thu Feb 20, 2003 6:42 am    Post subject: MQ/Perl - Getting the dynamic queue name Reply with quote

Centurion

Joined: 27 Jun 2001
Posts: 145
Location: Wiltshire

Folks,
I apologise if this is more of a Perl question, but can anyone supply a code snippet which retrieves the object name from the ObjDesc afeter opening a model queue? My code (in a subroutine) gives the error message 'Global symbol "%ObjDesc" requires explicit package name at ....'

my $ObjDesc = { ObjectType => MQOT_Q,
ObjectName => "SYSTEM.DEFAULT.MODEL.QUEUE",
DynamicQueueName => "MYPROGNAME*" };
my $Options = MQOO_OUTPUT | MQOO_INPUT_EXCLUSIVE | MQOO_FAIL_IF_QUIESCING;
my $ReplyQhdl = MQOPEN($Hconn,$ObjDesc,$Options,$cc,$rc);
if ($cc != MQCC_OK && $rc != MQRC_NONE)
{
printBoth("ERROR creating temp dynamic queue - reason code is $rc\n");
$errors = 1;
return(0);
}
my $TDQname = $ObjDesc{ObjectName}; ## this is clearly wrong

Can anyone enlighten me please?

Many thanks -

Cliff
Back to top
View user's profile Send private message Send e-mail
Cliff
PostPosted: Thu Feb 20, 2003 9:07 am    Post subject: Sorted. Reply with quote

Centurion

Joined: 27 Jun 2001
Posts: 145
Location: Wiltshire

The answer to my question was that $ObjDesc is a hash reference, and I had to dereference it:

my TDQname = $$ObjDesc{"ObjectName"};

There. I'm happy now.

Cheers -

Cliff
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQ/Perl - Getting the dynamic queue name
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.