Author |
Message
|
any2xml |
Posted: Wed Jun 16, 2004 12:05 pm Post subject: RUNMQSC - any way to retrieve commands? |
|
|
Apprentice
Joined: 18 May 2004 Posts: 42
|
RUNMQSC on Linux does not seem to have a facility to retrieve commands typed earlier like you have in shell or in DOS prompt. This is really silly. Or am I missing something? _________________ A Perl Hacker
http://www.goreliance.com
http://www.any2xml.com |
|
Back to top |
|
 |
Michael Dag |
Posted: Wed Jun 16, 2004 12:32 pm Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
|
Back to top |
|
 |
any2xml |
Posted: Wed Jun 16, 2004 2:12 pm Post subject: RUNMQSC - command retrieval |
|
|
Apprentice
Joined: 18 May 2004 Posts: 42
|
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 16, 2004 5:49 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20763 Location: LI,NY
|
Not really needed.
Create your own input file and use redirection:
Code: |
runmqsc QM_MYQMGR < myinputfile.txt |
Now you can manipulate myinputfile.txt in any way you want.
Comment lines are preceded by a *
All my repetitive tasks have an input file. The nice trick is to make your input files in such a way that they can be used for multiple queue managers
Code: |
runmqsc QM_XYZ < info | grep -i curd | grep -v "(0)"
with content of info =
display qlocal(*) curdepth
|
Have fun  |
|
Back to top |
|
 |
jsware |
Posted: Wed Jun 16, 2004 11:50 pm Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
I created a little Shell script that allows me to do things such as:
mq -m MYQMGR "dis ql(*) curdepth"
Heres the script:
#!/bin/ksh
ret_code=0
if [ -z "$1" -o "$1" = "-?" ]; then
echo Usage: mq [-m qmgr] MQCommand
exit 0
fi
if [ "$1" = "-m" ]; then
qmgr=$2
shift 2
fi
echo "$*" | runmqsc -e $qmgr
ret_code=$?
exit $ret_code
I also created a Windows version too...
if '%1' == '' goto syntax
if '%1' == '-m' goto qmgr
if '%1' == '/m' goto qmgr
echo %1 %2 %3 %4 %5 %6 %7 %8 %9 | runmqsc -e
goto end
:qmgr
echo %3 %4 %5 %6 %7 %8 %9 | runmqsc -e %2
goto end
:syntax
echo Usage: mq [-m qmgr] MQCommand
:end _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
|