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 IndexIBM MQ API SupportTrying to encode to an EBCDIC

Post new topicReply to topic
Trying to encode to an EBCDIC View previous topic :: View next topic
Author Message
GenCode
PostPosted: Thu Sep 10, 2015 6:59 am Post subject: Trying to encode to an EBCDIC Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

My messages all have a header on them when my client is reading off the queue, its basically garbled data then at the end is my message.

This only happens when using the XMS library
When I use the amqmdnet it does not happen.

I tried with encoding
Code:
                var message = session.CreateTextMessage();

                message.SetStringProperty(XMSC.JMS_IBM_FORMAT, MQC.MQFMT_STRING);
                message.SetIntProperty(XMSC.JMS_IBM_ENCODING, 273);

                message.Text = "WMQ_CM_CLIENT_UNMANAGED No ENC";// dbmessage.Message;
                messagedict.Add(dbmessage.MessageId, message);



and without


Code:
     var message = session.CreateTextMessage();

                message.Text = "WMQ_CM_CLIENT_UNMANAGED No ENC";// dbmessage.Message;
                messagedict.Add(dbmessage.MessageId, message);


amqmdnet looks like this
1234567890 1234567890 1234567890 1234567890 1234567890

XMS looks like this, with my message at the very end
RFH .......y.......4MQSTR .......½....._ÄÀ..(ËÀ.¦_ˬÈÁÌÈ.. (then my message at the end)

[/code]
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 10, 2015 7:01 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

It's not encoding, nor is it garbled data.

XMS is the non-Java equivalent of JMS and it adds an RFH2 header to the front of the message to store the JMS properties that don't map directly onto the MQMD.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Sep 10, 2015 7:06 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
It's not encoding, nor is it garbled data.

XMS is the non-Java equivalent of JMS and it adds an RFH2 header to the front of the message to store the JMS properties that don't map directly onto the MQMD.


Unless you tell it not to. Assuming XMS supports targClient ?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 10, 2015 7:16 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Vitor wrote:
It's not encoding, nor is it garbled data.

XMS is the non-Java equivalent of JMS and it adds an RFH2 header to the front of the message to store the JMS properties that don't map directly onto the MQMD.


Unless you tell it not to. Assuming XMS supports targClient ?


Indeed, and we assume so.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
GenCode
PostPosted: Thu Sep 10, 2015 10:33 am Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

Thanks, but I am unclear how to what option to change to suppress it.
I am using the .NET version as you probably know from the code.

I am very new to the XMS lib
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Sep 10, 2015 10:37 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://www-01.ibm.com/support/knowledgecenter/search/targetClient?scope=SSFKSJ_7.5.0
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
GenCode
PostPosted: Thu Sep 10, 2015 11:26 am Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

Fixed, thanks for the info
Here is the fix in case anyone else has this issue.

Code:
session = connection.CreateSession(false, AcknowledgeMode.AutoAcknowledge);
.
.
.
destination = session.CreateQueue(queue);
destination.SetIntProperty(XMSC.WMQ_TARGET_CLIENT, XMSC.WMQ_TARGET_DEST_MQ); //Prevent automatic RFH (or JMS) headers in messages...

Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Sep 10, 2015 7:10 pm Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Can also be passed in the URI queue definition

Code:
String queuename="queue:///MYQUEUE.NAME?targetClient=1";
Queue thisqueue = session.createQueue(queuename);


Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Hamsa
PostPosted: Thu Dec 03, 2015 7:09 pm Post subject: Unwanted header and special chars of messages in MQ Reply with quote

Newbie

Joined: 03 Dec 2015
Posts: 3

GenCode wrote:
Thanks, but I am unclear how to what option to change to suppress it.
I am using the .NET version as you probably know from the code.

I am very new to the XMS lib



HI,

Can you please let me know how you made it work.
Even I'm using .Net xms lib still I have issue with headers and specials chars.

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 04, 2015 5:35 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q032240_.htm?lang=en See table 1 attribute targetClient
Or tell the receiver to code for retrieving properties in handle
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ API SupportTrying to encode to an EBCDIC
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.