Author |
Message
|
Augusto |
Posted: Wed Mar 25, 2009 7:08 am Post subject: redirect to file from MQBROWSE |
|
|
Apprentice
Joined: 08 Dec 2008 Posts: 29
|
Hi,
we have mqscript to browse the queue and whenever messages arrives onto queue it displays on screen. my requirement is redirect to file
here is the syntax of command
mqbrowse queuename qmname
xxxxxxxxx
xxxxxxxxx
xxxx
i need to redirect this output to file. can anyone have this script
please help |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Mar 25, 2009 7:17 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
What does the script look like? What platform and o/s? If Windows/UNIX you might try to redirect the output from STDOUT to a file with > filename. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Sam Uppu |
Posted: Wed Mar 25, 2009 8:20 am Post subject: Re: redirect to file from MQBROWSE |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
Augusto wrote: |
Hi,
we have mqscript to browse the queue and whenever messages arrives onto queue it displays on screen. my requirement is redirect to file
here is the syntax of command
mqbrowse queuename qmname
xxxxxxxxx
xxxxxxxxx
xxxx
i need to redirect this output to file. can anyone have this script
please help |
Here are you providing the queueName and QMgrName as arguments to your script "mqbrowse"?.
If that is the case, you can write a small shell script which uses the arguments provided with $1 & $2 in your mqbrowse script.
Let us know.
thanks. |
|
Back to top |
|
 |
Augusto |
Posted: Thu Mar 26, 2009 6:19 am Post subject: |
|
|
Apprentice
Joined: 08 Dec 2008 Posts: 29
|
i tried didn't work. i passed this issue to senior admin.
Thanks for ur time everyone. |
|
Back to top |
|
 |
Sam Uppu |
Posted: Thu Mar 26, 2009 6:48 am Post subject: |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
Augusto wrote: |
i tried didn't work. i passed this issue to senior admin.
Thanks for ur time everyone. |
What didn't work?.
Can you paste your script what you wrote?.
Not sure whether your environmental variables are set properly.
If /bin/sh doesn't work you may need to export it or use /usr/bin/sh
#!/bin/sh
cd /opt/mqm/samp/bin (/usr/mqm/samp/bin on AIX)
amqsbcg $1 $2 > /tmp/browse_output
Let us know.
Thanks. |
|
Back to top |
|
 |
Augusto |
Posted: Fri Mar 27, 2009 6:24 am Post subject: |
|
|
Apprentice
Joined: 08 Dec 2008 Posts: 29
|
this is not amqsbcg. i know amqsbcg works fine for me too. this is script developed by senior admin. |
|
Back to top |
|
 |
Sam Uppu |
Posted: Fri Mar 27, 2009 6:31 am Post subject: |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
Augusto wrote: |
this is not amqsbcg. i know amqsbcg works fine for me too. this is script developed by senior admin. |
Is that script developed with Java APIs?.
If it is developed by your admin, we dont know which arguments it will use and how it uses. How come we help without looking into the script?.
Better check with the author of the script why its not working and why he delivered it to you without proper checking.
Thanks. |
|
Back to top |
|
 |
|