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 Discussion » How to transfer Image files like jpeg/mpeg files via MQ

Post new topic  Reply to topic
 How to transfer Image files like jpeg/mpeg files via MQ « View previous topic :: View next topic » 
Author Message
murthyps
PostPosted: Tue Mar 18, 2003 3:13 pm    Post subject: How to transfer Image files like jpeg/mpeg files via MQ Reply with quote

Newbie

Joined: 18 Mar 2003
Posts: 2

We have to use MQ series as transport mechanism to transfer image files From/To NT To/From AS400 and . Can some one tell me how to do this.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Tue Mar 18, 2003 7:39 pm    Post subject: Reply with quote

Grand Master

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

You need to write a message exit using reference messages to achieve this. I dont think there is any other way out other than this.

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
RogerLacroix
PostPosted: Tue Mar 18, 2003 9:35 pm    Post subject: Reply with quote

Jedi Knight

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

Hi,

Transfer the files the same way as you would any other file except that the content is binary data. Also, mark the MQMD.Format equal to NONE.

If the file(s) are larger than 100MB then you should use message grouping.

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
mqonnet
PostPosted: Wed Mar 19, 2003 6:07 am    Post subject: Reply with quote

Grand Master

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

Roger, could you please give an example of how to transfer files as is.

Because my assumption was there are only 2 ways to do this.

1) Read the file into a stream buffer and add it to the MD and send it accross. This would work fine in the case of text files, but i was bit hazy about files such as jpeg which highly depend on the resolution, pixels etc. Not sure if writing code this way would help in this scenario. Please comment.
2) Message exit using reference message is always the best and the easy option, per my understanding. Because the overhead of the app programmer reduces just to write an exit.

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
JohnMN
PostPosted: Wed Mar 19, 2003 7:58 am    Post subject: Reply with quote

Novice

Joined: 26 Feb 2003
Posts: 19

A jpeg file is simply a stream of bits and bytes, the same as any other file. Sending a jpeg file via MQ is no different than sending the same file via FTP, or copying it to another directory, or burning it onto a CDROM.

A few years back, I wrote an MQ-based file transfer program that successfully transferred text and binary files. It was not at all difficult.

You just read the bytes of data from the file, put them into a buffer, and send them as the data of an MQ message. The receiving program (and QMgr) need to know that it is binary data, so that they don't try to do any character code translation. The receiving program simply retrieves the message data into a buffer, and writes it to a new file.

The only part that might be challening is dealing with the AS/400, because it has its own unique file system. But the MQ part is very straighforward.

The only time the pixels and resolution are an issue is when the initial jpeg image is created, or when a program tries to display the jpeg image.

In my opinion, writing an exit would add another level of complexity. For one thing, installing an exit requires Admin changes. It is much simpler to write all of the code for one self-contained executable file.

John
Back to top
View user's profile Send private message
bduncan
PostPosted: Wed Mar 19, 2003 12:12 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

John is completely right. MQSeries is a transport mechanism. It doesn't concern itself with the contents of a message, aside from the need to do a character set conversion in some cases. Quite a while back, I wrote a perl program that would read a jpeg file from disk, break it into 16kb chunks, place each chunk in a message, and put the messages to a remote queue using logical grouping. The final message in the group would contain information about the file itself, like the filename, ownership, permission bits, etc., things which aren't captured by the file's data. This way, a perl program on the remote machine could perfectly reconstruct the image file.
_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
murthyps
PostPosted: Mon Mar 24, 2003 8:50 am    Post subject: Thanks Reply with quote

Newbie

Joined: 18 Mar 2003
Posts: 2

Thanks to evryone who gave ideas. We are planning to go ahead with the Reference message path, which can resolve the AS400 related issues like file types & Message size size etc...I really appreciate your input.

Vasu
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 Discussion » How to transfer Image files like jpeg/mpeg files via MQ
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.