Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to attach file to MQSeries message

Status
Not open for further replies.

mbhide

Programmer
Jan 22, 2002
2
US
Does anybody know how to attach file to message to be put in MQSeries queue?

does anybody where to get visual basic sample for this?
 
Use Reference messages as stated in IBM MQ Series Application Programming Guide on page 144.
It works as MQ FTP. They have sample programs in different languages there as well.
 
hey chksi..

I too wanted the same info..
I went through the whole pdf file.. in search of MQ FTP.. and in page 144.. but found nothing to help me in this area.. r u sure about the file name?

if yes, please help me, I couldn't find it..
if no, please help me there too.. :) I wanted the same info and I am in the look out for the past few weeks..

regards - thankx in advance
MNS lecMns
B'lore
 
hi lecmns

chksi. Thanks for the response.

search for "Reference Messages" or "Handling Large Messages" in MQSeries Application Programming guide.

There are three ways of transferring large messages:

1. Increasing Maximum size of the queue or queue manager
2. Message Segmentation (Arbitrary Segmentation, Application Segmentation)
3. Reference Messages

Regards

mbhide

For transferring files the best way is Reference Messages.


 
Thanks mbhide,
I was not clear about "MQ FTP", it is not an IBM definition, I meant it works as FTP.
 
hi
i'am using the mqax200.dll with vb.
how can i write Message Descriptor in vb code
in what properties or methods i shuld use to use
that Message Descriptor
thanks

 
Here's a sample code:
-------------------------------------------
Const CCHBUFFER = 272
Private Function Get_All()
Dim md As MQMD 'message desciptor
Dim gmo As MQGMO 'get message options
Dim buflen As Long 'length of get buffer
Dim Buffer As String * CCHBUFFER 'got message
Dim messlen As Long 'length of returned message
Dim CompCode As Long 'completion code

'setup Get Message Options to the required values
MQGMO_DEFAULTS gmo
gmo_Options = MQGMO_WAIT + MQGMO_ACCEPT_TRUNCATED_MSG
gmo.WaitInterval = 10000 'ten secs
'messlen = 272
'setup message descriptor to the required values
MQMD_DEFAULTS md

'setup length of GET buffer
buflen = CCHBUFFER

........and so on.................
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top