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 » IBM MQ API Support » C# MQRC_NOT_CONVERTED MQException

Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next
 C# MQRC_NOT_CONVERTED MQException « View previous topic :: View next topic » 
Author Message
bruce2359
PostPosted: Fri Jul 27, 2012 1:38 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9392
Location: US: west coast, almost. Otherwise, enroute.

bruce2359 wrote:

The replying app sets the ccsid of the reply message, just like the requesting app sets the ccsid of the request message.

Did you look at the ccsid field of the reply message? What is it?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
ranjha100
PostPosted: Fri Jul 27, 2012 1:44 pm    Post subject: Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 15

bruce2359 wrote:
bruce2359 wrote:

The replying app sets the ccsid of the reply message, just like the requesting app sets the ccsid of the request message.

Did you look at the ccsid field of the reply message? What is it?


The replyMsg CharacterSet = 500 after the GET call executes.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Jul 27, 2012 2:02 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9392
Location: US: west coast, almost. Otherwise, enroute.

Please do a bit more research. From a google search for mqrc 2110 comes this:

2110 MQRC FORMAT ERROR

Technote (troubleshooting)

Problem(Abstract)

You attempt to get a message from your queue. The getting application fails with a data conversion format error.
Symptom

2110 0x0000083e MQRC_FORMAT_ERROR
Cause

The most common reason for 2110 is an incorrect message format in the message descriptor.
Resolving the problem

Specify the correct MQMD Format for your message. The format 'MQSTR ' is what most applications use to convert string data (non numeric data).

The MQMD Format field is different from the CCSID. What did you set MQFMT field of MQMD?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
ranjha100
PostPosted: Fri Jul 27, 2012 2:11 pm    Post subject: Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 15

bruce2359 wrote:
Please do a bit more research. From a google search for mqrc 2110 comes this:

2110 MQRC FORMAT ERROR

Technote (troubleshooting)

Problem(Abstract)

You attempt to get a message from your queue. The getting application fails with a data conversion format error.
Symptom

2110 0x0000083e MQRC_FORMAT_ERROR
Cause

The most common reason for 2110 is an incorrect message format in the message descriptor.
Resolving the problem

Specify the correct MQMD Format for your message. The format 'MQSTR ' is what most applications use to convert string data (non numeric data).

The MQMD Format field is different from the CCSID. What did you set MQFMT field of MQMD?


It is set to format = MQC.MQFMT_NONE; I have tried setting it to MQC.MQFMT_STRING; but i am still get that error message.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jul 27, 2012 2:28 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

ranjha100 wrote:

It is set to format = MQC.MQFMT_NONE; I have tried setting it to MQC.MQFMT_STRING; but i am still get that error message.

Code:

        iih.format = "MQIMSVS";


I really think that your code is trying to do things that should be being handled by the IMS bridge.
Back to top
View user's profile Send private message
ranjha100
PostPosted: Fri Jul 27, 2012 2:50 pm    Post subject: Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 15

mqjeff wrote:
ranjha100 wrote:

It is set to format = MQC.MQFMT_NONE; I have tried setting it to MQC.MQFMT_STRING; but i am still get that error message.

Code:

        iih.format = "MQIMSVS";


I really think that your code is trying to do things that should be being handled by the IMS bridge.


Is there a way to simply the MqIih iih code or get rid of the MqIih class in my code? It seems like that class is causing a lot of the problems.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 27, 2012 2:58 pm    Post subject: Reply with quote

Grand High Poobah

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

ranjha100 wrote:
It is set to format = MQC.MQFMT_NONE; I have tried setting it to MQC.MQFMT_STRING; but i am still get that error message.


Neither of those values will be correct if the MQMD is followed in the message by another header. The Format values must chain correctly.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Jul 27, 2012 3:00 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9392
Location: US: west coast, almost. Otherwise, enroute.

In detail, what is the content of the request message?

In detail, what is the content of the reply message?

It appears from your code that you have an MQMD, and an MQIIH. What else? Any RFHs?

Why are you converting this from Java to C?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
ranjha100
PostPosted: Fri Jul 27, 2012 3:14 pm    Post subject: Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 15

bruce2359 wrote:
In detail, what is the content of the request message?

In detail, what is the content of the reply message?

It appears from your code that you have an MQMD, and an MQIIH. What else? Any RFHs?

Why are you converting this from Java to C?


The content of the request message is just a Object with bunch of strings.

The reply message is just a string that will tell if the transaction succeeded or failed.

No RFHs

I am converting because we are switching to all .NET framework and need to get rid of the Java code.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 27, 2012 3:24 pm    Post subject: Reply with quote

Grand High Poobah

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

ranjha100 wrote:
The content of the request message is just a Object with bunch of strings.

The reply message is just a string that will tell if the transaction succeeded or failed.


Are you sure? Have you examined the message on the queue?

ranjha100 wrote:
No RFHs


I never said you had an RFH header ; but you've got code to handle an IIH header in the .NET. If there's no IIH component what's that code for?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ranjha100
PostPosted: Fri Jul 27, 2012 3:36 pm    Post subject: Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 15

Vitor wrote:
ranjha100 wrote:
The content of the request message is just a Object with bunch of strings.

The reply message is just a string that will tell if the transaction succeeded or failed.


Are you sure? Have you examined the message on the queue?

ranjha100 wrote:
No RFHs


I never said you had an RFH header ; but you've got code to handle an IIH header in the .NET. If there's no IIH component what's that code for?


I have examined the message, it is just bunch of strings.
The MqIih class was just created for convenience to read, write, and output IIH formatted data.

This is what the IMS header look like after i call the read() method on the MQIih class.

**** IMS Information Header ****
StrucId : 'IIH '
Version : 1
StrucLength : 84
Encoding : 0
CodedCharSetId : 0
Format : 'MQIMSVS '
Flags : 536870912
LTermOverride : ' '
MFSMapName : ' '
ReplyToFormat : 'MQIMSVS '
Authenticator : ' '
TranInstanceId : X'0000000000000020314320AA01000054'
TranState : 'W'
CommitMode : 'I'
SecurityScope : 'N'
Reserved : 'R'
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 27, 2012 3:51 pm    Post subject: Reply with quote

Grand High Poobah

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

ranjha100 wrote:


I have examined the message, it is just bunch of strings.
The MqIih class was just created for convenience to read, write, and output IIH formatted data.

This is what the IMS header look like after i call the read() method on the MQIih class.

Code:
**** IMS Information Header ****
StrucId        : 'IIH '
Version        : 1
StrucLength    : 84
Encoding       : 0
CodedCharSetId : 0
Format         : 'MQIMSVS '
Flags          : 536870912
LTermOverride  : '        '
MFSMapName     : '        '
ReplyToFormat  : 'MQIMSVS '
Authenticator  : '        '
TranInstanceId : X'0000000000000020314320AA01000054'
TranState      : 'W'
CommitMode     : 'I'
SecurityScope  : 'N'
Reserved       : 'R'


That's where we beg to differ. Looks like what you have is an "IMS" message and as such the format on the MQMD header should be something reflecting it (MQIMSVS)... The format on the IMS header defines the next section of data. This format should not be MQIMSVS... but probably MQC.MQFMT_STRING, or MQC.MQFMT_NONE... read up in the manuals on how to build the IMS bridge message...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ranjha100
PostPosted: Fri Jul 27, 2012 4:07 pm    Post subject: Solved! Reply with quote

Novice

Joined: 05 Jul 2012
Posts: 15

Ok Guys I finally figured it out, My first problem was I was not padding the strings in my object correctly when I did the Put.

The second problem of MQR_NOT_CONVERTED was fixed by doing this: writeMsg.CharacterSet = 819; before doing the initial Put.

The third problem of MQRC_FORMAT_ERROR was fixed by fixing my IMS Information Header. The Format string was messed up, it was 'QIMSVS ' instead of 'MQIMSVS'

A big thanks to all you guys who helped out especially bruce2359 and mqjeff!
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Jul 28, 2012 2:56 am    Post subject: Reply with quote

Grand High Poobah

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

fjb_saper wrote:
Looks like what you have is an "IMS" message and as such the format on the MQMD header should be something reflecting it (MQIMSVS)... The format on the IMS header defines the next section of data. This format should not be MQIMSVS... but probably MQC.MQFMT_STRING, or MQC.MQFMT_NONE... read up in the manuals on how to build the IMS bridge message...



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Sat Jul 28, 2012 2:24 pm    Post subject: Re: C# MQRC_NOT_CONVERTED MQException Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

bruce2359 wrote:
I have noticed that messages and their CCSIDs and encodings are not a function of the programming language chosen.

Except that the default behavior for .NET is different from other platforms. The default value MQC.MQCCSI_Q_MGR resolves to 1200, regardless of the underlying qmgr ccsid. .NET Applications can override the default behavior by explicitly setting the ccsid (through MQMessage.CharacterSet).

bruce2359 wrote:
Encoding, character set and format fields in the MQMD describe attributes of the application data component of your message. Merely changing these fields in the MQMD does not change the application data itself.

Except that for the .NET (and Java) platforms, some of the read/write methods also convert data at the application level, rather than relying on MQGET to convert the data. Changing these fields in the MQMD can affect how the application writes the application data to the message, before putting it on a queue.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next Page 2 of 3

MQSeries.net Forum Index » IBM MQ API Support » C# MQRC_NOT_CONVERTED MQException
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.