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 » Tricky Question

Post new topic  Reply to topic
 Tricky Question « View previous topic :: View next topic » 
Author Message
weetey
PostPosted: Mon Jul 29, 2002 2:31 am    Post subject: Tricky Question Reply with quote

Newbie

Joined: 29 Jul 2002
Posts: 1



hello all, i'm a new learner in MQ.
was playing around with it and i have one question.

if i sent a file as a message, would it be possible to retrieve the file name at the other end?

cheers
wt
Back to top
View user's profile Send private message
arinduer
PostPosted: Mon Jul 29, 2002 4:38 am    Post subject: Reply with quote

Acolyte

Joined: 13 Aug 2001
Posts: 50
Location: Phuket, Thailand

Yes. But we need more information. I suppose you can try browsing the message on the other system using the sample IBM program: amqsbcg located at /opt/mqm/samp/bin

The way to use it is like this:

/opt/mqm/samp/bin/amqsbcg NAME.OF.QUEUE NAME.OF.QMGR

amqsget does a destructive read and amqsput will put a message on the queue.

People often modify the code to handle bigger messages.

HTH...
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
bduncan
PostPosted: Mon Jul 29, 2002 6:10 am    Post subject: Reply with quote

Padawan

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

People typically transfer files via MQSeries by reading the file into a byte array, and passing this as the message body. However, this won't capture the attributes of the file, like the name, modified date, etc.
There are a few ways around it, and I've personally gotten the following methods to work-
1) Store the filename in the MsgType or CorrelId fields in the message header.
2) Set aside a fixed number of bytes at the start of the message body for this information. In other words, use the first 1024 bytes to store filename, attributes, etc., and then at position 1025, start writing out the byte array that contains the file itself. On the receiving side, after the MQGET, read the first 1024 bytes of the message, and use this information to reconstruct the file's name, attributes, and then read everything after this to reconstruct the actual 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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Tricky Question
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.