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
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

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
Avatar of Jammerules
Jammerules

ASKER

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!
Avatar of Jammerules
Jammerules

ASKER

Bumping
Avatar of skullnobrains
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
Avatar of Jammerules
Jammerules

ASKER

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
Avatar of skullnobrains
skullnobrains

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of skullnobrains
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 ?
ASKER CERTIFIED SOLUTION
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
Avatar of lgacs
lgacs
Flag of Hungary image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Jammerules
Jammerules

ASKER

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.
Software
Software

Software is any set of instructions that directs a computer to perform specific tasks or operations. Computer software consists of programs, libraries and related non-executable data (such as documentation). Computer software is non-tangible, contrasted with computer hardware, which is the physical component of computers. Software written in a machine language is known as "machine code". However, in practice, software is usually written in high-level programming languages than machine language. High-level languages are translated into machine language using a compiler or interpreter or a combination of the two.

43K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo