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 » Utility to write multiple files as separate msgs on queue

Post new topic  Reply to topic
 Utility to write multiple files as separate msgs on queue « View previous topic :: View next topic » 
Author Message
Yanghui
PostPosted: Thu Jan 16, 2003 3:58 am    Post subject: Utility to write multiple files as separate msgs on queue Reply with quote

Disciple

Joined: 08 May 2002
Posts: 151
Location: Dublin, Ireland

Hi,

We have a urgent requriement to write all files (more than 500 ) under one directory as separate msgs on queue. One file, one msg. Is there easy way to do it in one go by feeding directory name and queue name of course?

Any suggestion would be highly appreciated. Thanks in advance.

Regards
-Yanghui
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Thu Jan 16, 2003 4:33 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Without much programming, you could write a .BAT file and use AMQSPUTC in a loop
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Jan 16, 2003 4:55 am    Post subject: Reply with quote

Grand Master

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

Well amqsputc wont work it will make one message for each line in the file

Are the files text or binary ??? if text you could modify the amqsput0.c source 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
Yanghui
PostPosted: Thu Jan 16, 2003 5:34 am    Post subject: Reply with quote

Disciple

Joined: 08 May 2002
Posts: 151
Location: Dublin, Ireland

Thanks for your response.

We have to treat all file as binary and keep intact. I hate to do it manually.

Any more ideas? Thanks.

-Yanghui
Back to top
View user's profile Send private message Send e-mail
fschofer
PostPosted: Thu Jan 16, 2003 7:06 am    Post subject: Reply with quote

Knight

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

You can use the programm mqputs of the support pack ih03:
MQSeries Integrator V2 - Message display, test and performance utilities

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


There you can add the names of your files after the parameter
[filelist] in the config file. Don't know if there is a limit how much
files you can add, never used more then 20.

Important: You have to set the parameter 'msgcount' to the exact number
of messages which you added to the filelist

To get the names of your files do a
dir /b > list.txt in a DOS window or
ls > list.txt from a UNIX shell
Back to top
View user's profile Send private message Send e-mail
nimconsult
PostPosted: Fri Jan 17, 2003 12:22 am    Post subject: Reply with quote

Master

Joined: 22 May 2002
Posts: 268
Location: NIMCONSULT - Belgium

There is a sample of "PutFileClient" and "PutFileServer" in the JASMQ package (free), that you can retrieve in the software repository

http://www.mqseries.net/pafiledb203/pafiledb.php?action=viewfile&fid=57

The sample puts one file in one MQ message. The server retrieves the message and recreates the file.

You can either write a simple shell script calling the sample for each file in the directory, or extend the sample to process all the files of a directory.

Nicolas
_________________
Nicolas Maréchal
Senior Architect - Partner

NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be
Back to top
View user's profile Send private message Send e-mail Visit poster's website
zpat
PostPosted: Mon Jan 27, 2003 1:47 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

You could append the output of AMQSPUTC using the >> filename format.

command >> filename

Means append output to the end of the file.
Back to top
View user's profile Send private message
leongor
PostPosted: Mon Jan 27, 2003 8:42 am    Post subject: Reply with quote

Master

Joined: 13 May 2002
Posts: 264
Location: Israel

If you have FTP server on the files host machine you can use MQFtp support pack :
http://www-3.ibm.com/software/ts/mqseries/txppacs/ma0p.html
Thus you can transfer all the files via FTP to MQSeries queue.
_________________
Regards.
Leonid.

IBM Certified MQSeries Specialist.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Utility to write multiple files as separate msgs on 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.