get_MQ_Queues.jacl

 


###
### get_MQ_Queues.jacl
###

proc get_MQQueue {cname nname sname} {

global AdminConfig
global AdminControl
global AdminApp


set MQQueueIDs [$AdminConfig getid /MQQueue:/]

foreach MQQueueID $MQQueueIDs {
     if {[regexp $cname $MQQueueID] == 1} {
         if {[regexp $nname $MQQueueID] == 1} {
             if {[regexp $sname $MQQueueID] == 1} {
                 set xyz [$AdminConfig showall $MQQueueID]
                 puts "\$AdminConfig create MQQueue \$JMSProviderID { $xyz } "
                 puts " "
             }
         }
     }
}


}



###
### Main
###

if { !($argc == 3) } {
   puts ""
   puts "Usage: "
   puts " "
   puts "wsadmin.sh -username system -password password -f get_MQQueue.jacl cellname nodename servername"
} else {
   set xcell         [lindex $argv 0]
   set xname         [lindex $argv 1]
   set xserver       [lindex $argv 2]
   get_MQQueue $xcell $xname $xserver
}