Author |
Message
|
steiner |
Posted: Fri Jun 01, 2007 12:10 am Post subject: Need sysntax on mqget |
|
|
Voyager
Joined: 07 Mar 2003 Posts: 89
|
Hello,
i must read messages from a queue so i need to use mqget ,but it didn't work.
My syntax is on shell script from HP-UX:
./mqget QHMC.POP.0.C15AFC.IN QHMCPOPI /interface/data/ispd_unv/toto.txt
where QHMC.POP.0.C15AFC.IN is the name of the queue
QHMCPOPI the name of the queue manager
The same Syntax used with mqput works fine.
Can you help with the sysntax on the mqget command.
Thanks ,bye |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jun 01, 2007 12:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I thought MQGET & MQPUT were API calls not commands, so I'm amazed it worked for the put!!
See if there's a man page for it. Or if there's source code for it in the . directory - if I was writing little wrappers to get & put messages in a script I could be inclined to call them mqget & mqput. So they could be specific to your site. Especially if you don't run them from the path, depending on where your script is.
Or IBM commands I'm unaware of. See the signature.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
steiner |
Posted: Fri Jun 01, 2007 2:00 am Post subject: Need sysntax Mqget |
|
|
Voyager
Joined: 07 Mar 2003 Posts: 89
|
Hello,
thanks for your answer, it's OK.
But i'm writing a script in ksh (on HP-Unix Server) and I need to know how I can read messages from a Queue , to rename and store the datas in increasing files after on the disk.
Must I use the q tool from IBM or is it existing a MQSeries Command directly.
Thanks , bye. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jun 01, 2007 2:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
If you were able to put messages from a script using a command called "mqput" you're off the map of my knowledge, but logically if there's a command called mqput you'd expect a command called mqget.
Nothing I'm aware of like that is supplied with the base product, but such "commands" could be easily generated. After all, "amqsput" is used as a command but is only a piece of sample code (all commands are just executables after all). So if you renamed/copied amqsput to mqput you'd get the effect you're describing; the same would be true of amqsget.
Or you could use a support pac like the q tool. Note that it's a CAT 2 support pac & therefore unsupported. You may wish to think on that before you rely on it in a production environment. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jun 01, 2007 3:30 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Let me reiterate what Vitor didn't exactly say.
WRITE A REAL APPLICATION to do this. Or buy one.
Mapping queues into files, and vice versa, is a MUCH harder problem than it looks.
And in almost all cases, anytime you need to read or write from Queues, you should be writing a business application, not writing an administrative script.
Products you can buy to solve this in a better way are, for example, PM4Data from CommerceQuest/MetaStorm/IBM or the Batch Toolkit from Capitalware.
If you really insist on doing this using scripting, then use the Perl MQSeries modules from CPAN instead of some mysterious local "mqput" command. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Jun 07, 2007 11:07 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 07, 2007 11:11 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
RogerLacroix wrote: |
Humm, deja vu. |
Yes. This is the second time recently I've mentioned BOTH PM4Data AND your batch toolkit in the same post. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|