Author |
Message
|
kavithadhevi |
Posted: Wed Sep 11, 2002 11:48 am Post subject: URGENT : COPY MESSAGE !!!!!!!!!!!! |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Hi,
Need some help, for i am trying to copy/duplicate messages from a local queue to another local queue in the same queue manager.
How can i achieve it, any suggestions or ideas would be greatly appreciated. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
clindsey |
Posted: Wed Sep 11, 2002 2:02 pm Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
You will need to write some code to do this.
Assuming you can do this in 'c', I would start with the sample
program amqsbcg0.c.
Take out the section of code that prints the message header
and body and replace it with a MQPUT1 call to your target queue.
Should be fairly simple.
If you prefer java, you can go to the software downloads on
this site and get mqbrowse.java. Make a similar change to it.
This assumes you are just trying to do a single-shot duplication.
If you are looking to continually duplicate the messages on a queue as new ones come in, again go to the downloads section
in c/c++ and download mirrorq. This uses a trigger to copy to
a distribution list each time new messages come on the queue.
Hope this helps,
Charlie |
|
Back to top |
|
 |
bduncan |
Posted: Wed Sep 11, 2002 3:11 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
There is a "getput.c" program in the software repository on this site, that basically does what you're asking. Right now, it moves the message from one queue to another, but you simply need to add a second MQPUT in the code to put a second copy of the message somewhere. _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Sep 11, 2002 7:24 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
I have a 'C' program called MMX (Message Multiplexer) that you can download.
MMX moves rather than copies messages from a source queue to "n" target queues (up to 99 queues).
I have tested and used MMX on the following platforms: WinNT/2000, Solaris, AIX and OS/390 (mainframe).
The mmx.zip file can be downloaded at (it includes the source files, makefiles & JCL):
www.capitalware.biz/sample_mqseries.html#ccode
Also, there is my MQ Visual Edit program that can forward (move) one or more messages from a source queue to a destination queue. You can download a beta version of MQ Visual Edit at:
www.capitalware.biz/beta.html
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Sep 12, 2002 8:07 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
|
Back to top |
|
 |
kavithadhevi |
Posted: Thu Sep 12, 2002 8:19 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Hello All,
Thank you all for your postings. I looked around, the mirroq from the MQSeries.Net software repository is kinda seems to suit my requirement.
But it is utilizing 3 QL and i wonder whether it'll utilise a lot of time shuffling aroung the Queues.
I looked at "MS0H" support pac from IBM. But i dont think that helps me in what i am trying to achieving. any more open options would be greatly appreciated. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Sep 12, 2002 8:31 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
The support pac will do exactly that. It allows you to generate messages to a local queue. You can choose the source of those messages as random (random stream of #s), a file, or another local queue.
You can also choose how many copies you want of that message, how much sleep time in between each put if you choose more than one copy, etc. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kavithadhevi |
Posted: Thu Sep 12, 2002 10:03 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Peter,
Thank you.
I referred, i think it is for MQSeries Client. I tried with MQSeries Server, but didnt work. What i am trying to do is copy messages from one qlocal to the same queue managers another queue local.
Please suggest me what should i do. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Sep 12, 2002 11:28 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
WatchQ doesn't care if you are running it on the same machine as the QM or not. Either way it Client Connects into the QM.
Try doing amqsputc from this server. If that works, then WatchQ will work also. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kavithadhevi |
Posted: Thu Sep 12, 2002 12:00 pm Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Hi,
I tried its says " Problem with MQ COnnect" where everything is working fine, i mean amqsput.... I copied the watchq application and ini file to the mqseries home directory and pasted there, inspite of that its not able to connect. Am i missing anything. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
mgrabinski |
Posted: Thu Sep 12, 2002 9:17 pm Post subject: |
|
|
Master
Joined: 16 Oct 2001 Posts: 246 Location: Katowice, Poland
|
2 cents from a mainframe guy:
If your queue manager is on OS/390 (z/OS), there is the wonderful utility - CSQUTIL 0 that has the capability to copy a queue into a file, and then load it to another queue _________________ Marcin Grabinski <>< |
|
Back to top |
|
 |
kavithadhevi |
Posted: Fri Sep 13, 2002 4:01 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Hi,
Thanks. But this environment is Windows 2000. Please post your suggestions. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Sep 13, 2002 5:57 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Create a bat file that has the following info in it (Change the names to match your MQ objects):
Code: |
REM ************************************************************************************************************************************
REM *This file will set up the necessary enviroment variables to MQClient
REM *connect your machine to Queue Manager QM1.
REM *The syntax of the below command is ......
REM *SET MQSERVER= serverconn channel name/tcp/hostname
REM ************************************************************************************************************************************
REM *Then, it will execute the WATCHQ application.
REM *It can monitor up to 5 queues from 1 Queue Manager.
REM *The syntax for the below command is as follows...
REM *WATCHQ queuemanagername queuename1 queuename2 queuename3 queuename4 queuename5
REM *Modify the below line with the Queue Manager name that you are set up to Client connect to. Then add
REM *1 to 5 queue names (with a space between each name)
REM ************************************************************************************************************************************
SET MQSERVER=CLIENT.CHANNELNAME/TCP/SERVERNAME
WATCHQ QM1 HIG.PC.PL.TEST HIG.PETER.MQSI.OUT2 MY.INIT.QUEUE
|
Put this bat file, the WatchQ.exe and the WatchQ.ini file all in the same folder. Double-Click the bat file and away you go.
I have dozens of these bat files configured for all my projects. With a couple clicks of the mouse I can get a real time view of my MQ world going. Very helpful in problem resolution. I usually include the DLQ and the XMIT queues on a box as well to see if anything is wrong with the channels. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kavithadhevi |
Posted: Fri Sep 13, 2002 6:10 am Post subject: |
|
|
 Master
Joined: 14 May 2002 Posts: 201 Location: USA
|
Thanks you Peter,
Atlast it worked. But thats not the one i am looking for. I need some way where i could copy messages from one queue to another one. Please suggest a different way. _________________ Thanks in Advance.
Kavitha
IBM Certified System Administrator
Websphere MQ v 5.3
www.zealphoenix.com |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Sep 13, 2002 6:27 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
What version do you have? You can tell in the top right corner when the app is open.
Assuming you have version 2.3, maximize the screen when the app pops up.
On the borrom left you can choose how many messages you want to make.
On the bottom right you choose from where the messages should come.
Then click the radio button next to the queue name you want to send the message to and then click the vertical Generate button. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|