Author |
Message
|
montracol |
Posted: Tue Jan 25, 2005 6:54 am Post subject: JMS to MQ |
|
|
 Newbie
Joined: 25 Jan 2005 Posts: 3
|
Does it possible to send a message by JMS to an other MQ application without using RFH headers ?
Because with RFH2 format , that seems to add datas from the header into the message when I read it with MQ API.
thanks |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Jan 25, 2005 3:48 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I think you need to set the targclient to MQ on your JMS side. If you search on targclient, you'll get a bunch of hits on this site that will give you more information than you could ever want (but exactly what you need). |
|
Back to top |
|
 |
teal |
Posted: Tue Jan 25, 2005 3:52 pm Post subject: |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
exactly what you want. Change the target client to "MQ" so it will strip the RFH2 header off for the native MQ app. IT is in the admin console-resources-MQ JMS-destinations.
I have the opposite problem. I need to keep the rfh2, but I am having a tough time getting any answer if the RFH2 header will come across in ebcdic too, or will mq convert that part, and how?
good luck with your issue, |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 26, 2005 4:47 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Application Programming Reference, Chapter 17 - MQRFH2 wrote: |
Character set and encoding: Special rules apply to the character set and encoding used for the MQRFH2 structure:
Fields other than NameValueData are in the character set and encoding given by the CodedCharSetId and Encoding fields in the header structure that precedes MQRFH2, or by those fields in the MQMD structure if the MQRFH2 is at the start of the application message data.
The character set must be one that has single-byte characters for the characters that are valid in queue names.
When MQGMO_CONVERT is specified on the MQGET call, the queue manager converts these fields to the requested character set and encoding.
NameValueData is in the character set given by the NameValueCCSID field. Only certain Unicode character sets are valid for NameValueCCSID (see the description of NameValueCCSID for details).
Some character sets have a representation that is dependent on the encoding. If NameValueCCSID is one of these character sets, NameValueData must be in the same encoding as the other fields in the MQRFH2.
When MQGMO_CONVERT is specified on the MQGET call, the queue manager converts NameValueData to the requested encoding, but does not change its character set.
|
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
teal |
Posted: Wed Jan 26, 2005 6:55 am Post subject: |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
Thanks Jeff,
I had read that and from what it is saying, [correct me if I'm wrong]
that if I set the MQMD.format to RFH2
MQMD.CodedCHarSet = 437
MQMD.Encoding = 546
then the RFh2 header format field to FMT_NONE no I can recieve a bytes message (not sure if I need to set the rfh2 ccsid = 37/encoding 0 (back to
as400)
this will give me my RFH2 in readable format on the winbox and the actual messagedata will still be in ebcdic as I would like
true? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 26, 2005 7:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It will at least give you specific parts of the RFH2 in ASCII.
And it should give you the body in EBCDIC. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
teal |
Posted: Wed Jan 26, 2005 1:27 pm Post subject: |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
okay, this is getting wierd.
We changed it so the RFH2 header is in unicode.
we basically are using the RFH2 for 3 specific fields we need<usr> folder. now I am seeing the RFH2 ok and the body is staying ebcdic like i want but the values in the RFH2 are mixed.. and the main issue now is that the mdb picks up the message as a text message, not a bytesmessage..
notice AID came out perfect, but SID and ASID are in ebcdic,
I took out the CCSID/encoding in the mqmd
here is the dump from the mdb:
Code: |
JMS Message class: jms_text
JMSType: null
JMSDeliveryMode: 2
JMSExpiration: 0
JMSPriority: 1
JMSMessageID: ID:c1d4d840d7d6d9d2e84040404040404041f3358d01d97012
JMSTimestamp: 1106773586020
JMSCorrelationID:ID:404040404040404040404040404040404040404040404040
JMSDestination: null
JMSReplyTo: queue://QM11/QQQ.REPLYQ
JMSRedelivered: false
JMSXDeliveryCount:1
JMS_IBM_MsgType:8
SID:ÄÓôð
JMSXAppID:CGREERGH44USER 594139
JMS_IBM_Format:????????
JMS_IBM_PutApplType:8
AID:APPLICATION123
ASID:×ÖÃãÅâã@@@ðõòððõðñòöñöðöòõÃÓòÇÔÁÉÕ@@ðððö
JMSXUserID:ch44user
JMS_IBM_PutTime:21062602
JMS_IBM_PutDate:20050126
ÄÓôð@@ð
|
so is the rfh2 screwed up? why would it now pick up as a text message?
I am assuming it could not read the format in the RFH2 (hence????????)
so it didnt see I made that FMT_NONE, while I left the mqm.format to MQRFH2..
does anyone see what is going wrong?
thanks |
|
Back to top |
|
 |
montracol |
Posted: Thu Jan 27, 2005 2:24 am Post subject: Remove the RFH2 header in JMS |
|
|
 Newbie
Joined: 25 Jan 2005 Posts: 3
|
Hi
I set the targclient , that works . My C application reads the message without
addition into the datas.
thanks again |
|
Back to top |
|
 |
|