Author |
Message
|
Boomn4x4 |
Posted: Thu Dec 15, 2011 5:35 am Post subject: Data being truncated. |
|
|
Disciple
Joined: 28 Nov 2011 Posts: 172
|
I have a C program that is scanning a database for XML data to show up. Once the data shows up, the data is put into a buffer and passed into a MQPUT1 call. The problem is, the data is getting truncated.
In debug, I can see that the entire message is in the buffer in the MQPUT1, and the buffer length is correct. When I look at the message in the MQExplorer, I see that the "Data Length" property of the message is correct, however, the physical data is 260 bytes less than what the data length is.
So, for example, I am putting an XML message that is 1234 bytes long iin MQPUT1. The message is put into a buffer, the buffer length is passed as 1234. When I go into MQExplorer and browse the messages on the queue, it stays the data length is 1234, but the data is truncated to only 974 bytes. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 15, 2011 5:39 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
code page conversion?
Are you getting an MQRC=0 and MQCC=0 from the MQPUT1?
Are you using something that is guaranteed to show you the full message body? I.e., for example, amqsbcg? |
|
Back to top |
|
 |
Boomn4x4 |
Posted: Thu Dec 15, 2011 5:48 am Post subject: |
|
|
Disciple
Joined: 28 Nov 2011 Posts: 172
|
MQRC and MQCC are both 0.
What is code page conversion?
As for the guarantee of the full message body...I was under the impression that the MQ Explorer did that, is that not the case? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 15, 2011 5:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Boomn4x4 wrote: |
What is code page conversion? |
Going from one character set to another.
Boomn4x4 wrote: |
As for the guarantee of the full message body...I was under the impression that the MQ Explorer did that, is that not the case? |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 15, 2011 5:52 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What I mean by code page conversion is Coded Character Set conversion - i.e. maybe you're doing a GET with CONVERT when viewing the message data and this has altered the bytes in the message.
I don't believe that MQ Explorer necessarily counts as a robust message level viewer and editor as of this date.
So I'd suggest just double-checking the message with amqsbcg. |
|
Back to top |
|
 |
Boomn4x4 |
Posted: Thu Dec 15, 2011 5:56 am Post subject: |
|
|
Disciple
Joined: 28 Nov 2011 Posts: 172
|
Done chasing my tail. The data, as it was being put onto a queue, was being pulled off and put into a remote database... all of the data was there so there was no data loss... it just wasn't being displayed.
Aparently, MQ Explorer only displays about 975 bytes worth of data, so it isn't an accurate way to see what is fully on the queue. You need some other utility to see the message data. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 15, 2011 5:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
I don't believe that MQ Explorer necessarily counts as a robust message level viewer and editor as of this date. |
I always find it truncates messages - I've always assumed it was a designed limit of 1024 or something.
mqjeff wrote: |
So I'd suggest just double-checking the message with amqsbcg. |
Or one of the other downloadable message viewers. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 15, 2011 6:03 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
mqjeff wrote: |
I don't believe that MQ Explorer necessarily counts as a robust message level viewer and editor as of this date. |
I always find it truncates messages - I've always assumed it was a designed limit of 1024 or something. |
There's a preference setting... Preferences->WebSphere MQ Explorer->Messages->"Max Data Bytes Displayed"... |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 15, 2011 6:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
There's a preference setting... Preferences->WebSphere MQ Explorer->Messages->"Max Data Bytes Displayed"... |
So there is. Shows what I know, and how much time I spend using it!
Even armed with this new knowledge, I don't think it's going to become my message tool of choice. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Dec 15, 2011 6:33 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
I find the Explorer and the supplied utilities (amqsbcg, etc.) cool tools for basic problem-determination, but not so much for detailed analysis of message content. _________________ 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 |
|
 |
|