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 » Need help to find the application connected to Queue

Post new topic  Reply to topic
 Need help to find the application connected to Queue « View previous topic :: View next topic » 
Author Message
sselva86
PostPosted: Mon Oct 25, 2010 11:14 am    Post subject: Need help to find the application connected to Queue Reply with quote

Novice

Joined: 25 Oct 2010
Posts: 17

Hi All ,

I need your help ,

I am doing small script in Perl which have to get the applications which are connected to the queue which may push or pull the message .

I have checked with the libraries for MQ but its not helping me to find .

Please give me some suggestion .

Regards
Selva
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 25, 2010 11:21 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://search.cpan.org/~mqseries/MQSeries-1.31/MQSeries.pm

particularly the MQSeries::QueueManager, MQSeries::Queue, and MQSeries::Message modules...

Code:
  # The best way to do error checking.  Handle the object
  # instantiation and connection to the queue manager independently.
  #
  my $qmgr = MQSeries::QueueManager->new
    (
     QueueManager => 'some.queue.manager',
     AutoConnect  => 0,
    ) || die "Unable to instantiate MQSeries::QueueManager object\n";

  $qmgr->Connect() ||
    die("Unable to connect to queue manager\n" .
        "CompCode => " . $qmgr->CompCode() . "\n" .
        "Reason => " . $qmgr->Reason() .
        " (", MQReasonToText($qmgr->Reason()) . ")\n");
  #
  # Put a message under syncpoint, then commit/backout (in most cases,
  # a Put is done using an MQSeries::Queue object instead)
  #
  my $msg = MQSeries::Message->new(Data => $msg_data);
  $qmgr->Put1(Message => $msg,
              Queue   => 'SOME.QUEUE.NAME',
              Sync    => 1,
             );
  if (some_other_work_succeeds()) {
      $qmgr->Commit();
  } else {
      $qmgr->Backout();
  }


(above code happily stolen from module docs, and otherwise untested.)
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 25, 2010 11:21 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Or, reading your message again, you want
http://search.cpan.org/~mqseries/MQSeries-1.31/MQSeries-Message-PCF/PCF.pm
Back to top
View user's profile Send private message
sselva86
PostPosted: Mon Oct 25, 2010 11:54 am    Post subject: Reply with quote

Novice

Joined: 25 Oct 2010
Posts: 17

Actually i am able to connect the qmgr and able to get the data from queue .

Now suppose have to get the application or programs ( like Perl or MQ-monitor or RFHUtil ...) which are connected to the queue .

suppose if am trying to get message from queue using above applications or programs , then my open input count will be more than one .

How do i get the list of applications rather name of applications connected to queue .

Please give some more suggestion .
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 25, 2010 12:21 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You use the PCF Module to construct PCF messages that Inquire after the appropriate things to return the information you're after, at least to the level of the detail that the queue manager actually knows about.
Back to top
View user's profile Send private message
sselva86
PostPosted: Tue Oct 26, 2010 8:49 am    Post subject: Reply with quote

Novice

Joined: 25 Oct 2010
Posts: 17

thanks to all ,

I tried with PCF commands and its worked fine .

I have found another way also using runmqsc command .
(thought of sharing my experience with all )

$command=qq/echo "display qstatus(queue) type(HANDLE) OPENTYPE(OUTPUT) appltag"|runmqsc qmgr/;
open FILE,"$command|" or die "cannot $_";
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 » IBM MQ API Support » Need help to find the application connected to Queue
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.