|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ/Perl - Getting the dynamic queue name |
« View previous topic :: View next topic » |
Author |
Message
|
Cliff |
Posted: Thu Feb 20, 2003 6:42 am Post subject: MQ/Perl - Getting the dynamic queue name |
|
|
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 |
|
 |
Cliff |
Posted: Thu Feb 20, 2003 9:07 am Post subject: Sorted. |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|