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 » IH03 - Putting Messages from a Q to file and vice versa

Post new topic  Reply to topic
 IH03 - Putting Messages from a Q to file and vice versa « View previous topic :: View next topic » 
Author Message
sboucher
PostPosted: Tue Jan 14, 2003 12:15 pm    Post subject: IH03 - Putting Messages from a Q to file and vice versa Reply with quote

Acolyte

Joined: 27 Oct 2002
Posts: 52

Can't seem to tweak the parameters correctly to read a file and populate a Q with the contents of the file. Whether the file has 1 or 100 messages in it, I want the entire contents of the file to be written to the Q. Any ideas?!!

Can get the Q to File(MQCAPTURE) portion to work with no problem.

Thanks
_________________
Scott A. Boucher
Database Administartor
Back to top
View user's profile Send private message Send e-mail
mrlinux
PostPosted: Tue Jan 14, 2003 12:46 pm    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Is this a text file or a binary file ?????

If it is just a text file the sample program amqsput QUEUE_NAME QMGR_NAME < FILE_NAME will work otherwise you could take the
source file and tweak that to ignore the LINE_FEEDS.
Source FileName amqsput0.c

This assumes you installed the sample programs

MQM_ROOT\tools\c\Samples (NT)
MQM_ROOT/samp (UNIX HPUX/LINUX/SUN)
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
mrlinux
PostPosted: Tue Jan 14, 2003 12:49 pm    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

You could also check out this Support Pac
http://www-3.ibm.com/software/ts/mqseries/txppacs/ma0p.html
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
TonyD
PostPosted: Tue Jan 14, 2003 1:16 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

Are you referring to the RFHUTIL component of this supportpac...if so, I believe it is designed to write the contents of a designated file as a single message... and vice versa.
Back to top
View user's profile Send private message Send e-mail
sboucher
PostPosted: Tue Jan 14, 2003 4:36 pm    Post subject: Reply with quote

Acolyte

Joined: 27 Oct 2002
Posts: 52

The file I'm using is a text file. I want to write the contents of this file as a single message to a Q.

Wouldn't the amqsput write individual messages to the Q?

Isn't the RFHUTIL GUI based. I need to do this from the command line via a triggered process.

Thanks
_________________
Scott A. Boucher
Database Administartor
Back to top
View user's profile Send private message Send e-mail
mrlinux
PostPosted: Tue Jan 14, 2003 6:30 pm    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

You could modify the source of amqsput0.c to do what you want.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Tue Jan 14, 2003 9:32 pm    Post subject: Reply with quote

Jedi Knight

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

Hi,

You can try out a program that I wrote called "File2Msg". It is very simple to use. I have used it on all major platforms: Unix, OS/390 & WinNT.

The source (C) is included in the download. Go to my web site at:
www.capitalware.biz/sample_mqseries.html#ccode

later
Roger...
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
sboucher
PostPosted: Wed Jan 15, 2003 3:53 am    Post subject: Reply with quote

Acolyte

Joined: 27 Oct 2002
Posts: 52

What differentiates whether a file is written as a single message or individual messages. I'm just trying to get this all straight in my head so if I have to modify source code I'll have an idea what to look for.

Thanks for everyones contribution to my questions
_________________
Scott A. Boucher
Database Administartor
Back to top
View user's profile Send private message Send e-mail
mrlinux
PostPosted: Wed Jan 15, 2003 6:09 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

well the sample code reads one line from stdin and writes a message.

The end of the line is a linefeed
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
sboucher
PostPosted: Wed Jan 15, 2003 6:51 am    Post subject: Reply with quote

Acolyte

Joined: 27 Oct 2002
Posts: 52

Jeff,

So if I strip out the line feeds then do one put to a Q this makes the contents of file appear as one message on a Q
_________________
Scott A. Boucher
Database Administartor
Back to top
View user's profile Send private message Send e-mail
fschofer
PostPosted: Wed Jan 15, 2003 7:06 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

My favorite tools to put files to queues are from support pack ih03:
MQSeries Integrator V2 - Message display, test and performance utilities

http://www-3.ibm.com/software/ts/mqseries/txppacs/ih03.html

rfhutil / rfhutilc (with gui) for single files

mqputs / mqputsc (command line) for several files / several puts
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » IH03 - Putting Messages from a Q to file and vice versa
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.