Avatar of Jammerules
Jammerules asked on

Shell script to Move messages from one queue to another

Hello experts,

Can someone guide me to use Shell script to Move messages from queue, please?
SoftwareShell ScriptingUnix OSScripting Languages

Avatar of undefined
Last Comment
Jammerules

8/22/2022 - Mon
Seth Simmons

your question is too vague
what are you trying to do?  what shell? linux?
what queue?
you need to provide more details and be specific in what you are asking
ASKER
Jammerules

I am sorry for being too brief. Here is what I am planning to do. And please bear in mind my newness to MQ and Unix.

I am using Cygwin simulator to simulate Unix env. In conjunction with MQ Series, I want to write a Unix Shell script to move a message from Queue Manager A to Queue Manager B. Hope this makes a little more sense. Thanks for your quick response!
ASKER
Jammerules

Bumping
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
skullnobrains

if the message is in a file, use he mv command, if not give us enough information to help you. where is that message ? file ? database ?

maybe also you can tag your question as websphere. i'm not very familiar with websphere's internals, possibly people who are will know what you're talking about
ASKER
Jammerules

I have this piece of code that I want to run in Cygwin. How can I go about it? The MQ Server is installed on my local machine.

#!/bin/sh
#
# Clear a MQ queue (clearqueue.sh)
#
# Parameters:
#  $1=Queue manager
#  $2=Queue name
#

if [ $# -ne 2 ] ; then
#  Tell the user what they did wrong!
   echo "Usage:"
   echo "   clearqueue.sh QMgrName QueueName"
   exit;
fi

echo "clear qlocal($2)" | runmqsc $1

exit

Open in new window

SOLUTION
skullnobrains

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
skullnobrains

if the above does not help, would you mind making your demand clearer

How can I go about it?

what did you try ? what did you expect ? what happened ?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
Jammerules

Experts - I am sorry that I could not respond timely by accepting your solutions. Unfortunately, the requirement has changed and hence there is no need for pursuing a solution to my question. As a result, I didn't try any of the solutions. I am accepting all the responses as a possible solution.