ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Putting a message on an RS6000/AIX MQSeries Queue

Post new topic  Reply to topic
 Putting a message on an RS6000/AIX MQSeries Queue « View previous topic :: View next topic » 
Author Message
a269652
PostPosted: Thu May 23, 2002 4:35 am    Post subject: Putting a message on an RS6000/AIX MQSeries Queue Reply with quote

Novice

Joined: 09 May 2002
Posts: 11

MQSeries 5.2/ MQSI 2.0.1/ RS6000/AIX

I have a flat text file residing in an AIX directory & I want to place it in a message on a queue on the same machine. How might I achieve this? Thanks.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu May 23, 2002 4:42 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

One of the ways to achieve this is by reading the entire contents of the file into an array/pointer variable within your app and put this buffer into your MQPUT call.

In case you need it as a file at the other end, just reverse the process.

Cheers.
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
a269652
PostPosted: Thu May 23, 2002 4:53 am    Post subject: Reply with quote

Novice

Joined: 09 May 2002
Posts: 11

Can someone please suggest a suitable app for this purpose? Are there any existing ones within MQ that I can use rather than writing one? Thanks.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu May 23, 2002 5:03 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Well i am not aware of any such utility, but there could be some support pacs. Would surely want to know if there is one.

Cheers.
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bower5932
PostPosted: Thu May 23, 2002 6:43 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Couldn't you also use a reference message? I've never messed with them, but I thought that they allowed you to pass a reference to a file. You then used a channel exit to read the file and send it along. A similar channel exit on the other side would create the file. There is an example in the MQSeries Version 5 Programming Examples Redbook.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
RogerLacroix
PostPosted: Thu May 23, 2002 8:07 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
Location: London, ON Canada

Hi,

If your need is to simply do a file to message then you can use my "file2msg" program. It is written in 'C' and includes makefiles for various platforms. You can get it at:
http://www.geocities.com/capitalware/mqseries.html

later
Roger...
Back to top
View user's profile Send private message Visit poster's website
a269652
PostPosted: Thu May 23, 2002 11:12 pm    Post subject: Reply with quote

Novice

Joined: 09 May 2002
Posts: 11

Could I also use 'amqsput' ?
Back to top
View user's profile Send private message
Ward
PostPosted: Fri May 24, 2002 12:01 am    Post subject: Reply with quote

Voyager

Joined: 27 Jun 2001
Posts: 98
Location: Europe

Hi,

amqsput queue qmgr < filename

will read your file and output one message for each line within the file

Cheers,

Ward.
_________________
IBM Certified Solution Designer -- WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
----------------------------
Visit Boat Dimensions
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dgolding
PostPosted: Fri May 24, 2002 12:05 am    Post subject: Reply with quote

Yatiri

Joined: 16 May 2001
Posts: 668
Location: Switzerland

You could, but AMQSPUT has a (I think) 80 byte max message length - so you need to change that and recompile if your text lines are bigger. AMQSGET with standard output redirected to a file could pull the messages off to a file on the other end.

BUT AMQSGET wraps <> around the message, so you would need (if you are using a sensible Unix platform an not some silly Microsoft one) to use "sed" or something to strip of the <>:

cat f1|grep '^message'|sed 's/message <//'|sed 's/>$//'>f2

Of course, this is a kludge, some sort of basic file->message->file utility would be better.

HTH
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Putting a message on an RS6000/AIX MQSeries Queue
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.