Discussion:
Data Conversion in C++
Coombs, Lawrence
2013-12-21 02:47:44 UTC
Permalink
I am trying to integrate one of our internal application with a vendor. We are passing the messages with a CCSID of 1208 and they want to convert it to 1200 when they get the message.
The issue is that sometimes the conversion works from 1208 to 1200 and sometimes they get a '2190'(MQRC_CONVERTED_STRING_TOO_BIG). Unfortunately I don't know a whole lot about C++.
The receiving message buffer does not appear to be the problem because it is quite large. The message payload can vary in length and the failure occurs on both small and large messages. Out of 25 messages sent, 6 failed to convert.

I did a Google search before this post but could not find anything definitive. Can someone shed any light on this issue?

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Neil Casey
2013-12-21 03:04:19 UTC
Permalink
Hi Lawrence,

2190 is an interesting reason code. It seems to me like it shouldn't happen for a message with format MQFMT_STRING.

It could certainly occur if you have a user format and a conversion exit, or for a format of MQ_IMS_VAR_STRING.

I suspect that it could also occur for MQFMT_RF_HEADER_2, and given that your source CCSID is 1208, I am going to guess that the message is generated from Java, and possibly via JMS.

If this is the case, then the problem could be with converting the JMS or usr properties.

If this is the case, and the receiving application (being C++) doesn’t actually care about the JMS parts of the message, you might be able to resolve the issue by setting the TARGCLIENT(MQ) option in your JMS destination definition.

Regards,

Neil Casey.
Post by Coombs, Lawrence
I am trying to integrate one of our internal application with a vendor. We are passing the messages with a CCSID of 1208 and they want to convert it to 1200 when they get the message.
The issue is that sometimes the conversion works from 1208 to 1200 and sometimes they get a ‘2190’(MQRC_CONVERTED_STRING_TOO_BIG). Unfortunately I don’t know a whole lot about C++.
The receiving message buffer does not appear to be the problem because it is quite large. The message payload can vary in length and the failure occurs on both small and large messages. Out of 25 messages sent, 6 failed to convert.
I did a Google search before this post but could not find anything definitive. Can someone shed any light on this issue?
This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.
List Archive - Manage Your List Settings - Unsubscribe
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Neil Casey
2013-12-21 03:08:37 UTC
Permalink
Hi again,

sorry I didn’t include this with my original response.

I realised that this could happen with conversions of other formats like PCF too.

And if you are sending message properties that do need to be passed and not discarded, then you could probably resolve the issue by making sure to pad your fields with as many spaces are there are characters of data in each field. That way the conversion routines will have enough space to discard “waste” characters in order to fit the converted string.

Regards,

Neil Casey.
Post by Coombs, Lawrence
I am trying to integrate one of our internal application with a vendor. We are passing the messages with a CCSID of 1208 and they want to convert it to 1200 when they get the message.
The issue is that sometimes the conversion works from 1208 to 1200 and sometimes they get a ‘2190’(MQRC_CONVERTED_STRING_TOO_BIG). Unfortunately I don’t know a whole lot about C++.
The receiving message buffer does not appear to be the problem because it is quite large. The message payload can vary in length and the failure occurs on both small and large messages. Out of 25 messages sent, 6 failed to convert.
I did a Google search before this post but could not find anything definitive. Can someone shed any light on this issue?
This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.
List Archive - Manage Your List Settings - Unsubscribe
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Coombs, Lawrence
2013-12-21 03:08:30 UTC
Permalink
Thanks. I will suggest this.

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Neil Casey
Sent: Friday, December 20, 2013 9:04 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Data Conversion in C++

Hi Lawrence,

2190 is an interesting reason code. It seems to me like it shouldn't happen for a message with format MQFMT_STRING.

It could certainly occur if you have a user format and a conversion exit, or for a format of MQ_IMS_VAR_STRING.

I suspect that it could also occur for MQFMT_RF_HEADER_2, and given that your source CCSID is 1208, I am going to guess that the message is generated from Java, and possibly via JMS.

If this is the case, then the problem could be with converting the JMS or usr properties.

If this is the case, and the receiving application (being C++) doesn't actually care about the JMS parts of the message, you might be able to resolve the issue by setting the TARGCLIENT(MQ) option in your JMS destination definition.

Regards,

Neil Casey.


On 21 Dec 2013, at 1:47 pm, Coombs, Lawrence <Lawrence.Coombs-***@public.gmane.org<mailto:Lawrence.Coombs-***@public.gmane.org>> wrote:


I am trying to integrate one of our internal application with a vendor. We are passing the messages with a CCSID of 1208 and they want to convert it to 1200 when they get the message.
The issue is that sometimes the conversion works from 1208 to 1200 and sometimes they get a '2190'(MQRC_CONVERTED_STRING_TOO_BIG). Unfortunately I don't know a whole lot about C++.
The receiving message buffer does not appear to be the problem because it is quite large. The message payload can vary in length and the failure occurs on both small and large messages. Out of 25 messages sent, 6 failed to convert.

I did a Google search before this post but could not find anything definitive. Can someone shed any light on this issue?
This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>


________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Tim Zielke
2013-12-21 04:52:05 UTC
Permalink
Hi Lawrence,

Are they also taking into account that 1208 is a variable width code page (where most common characters are represented as one byte) and 1200 is a fixed width double byte code page?

For example, if I put a 10 byte MQSTR message like "BOB LOBLAW" in 1208 on a Linux x86 server and browse it with amqsbcg (no conversion and leaving it as 1208), the message displays as follows (10 byte length):

Encoding : 546 CodedCharSetId : 1208

**** Message ****

length - 10 of 10 bytes

00000000: 424F 4220 4C4F 424C 4157 'BOB LOBLAW '


However, if I alter ambsbcg to convert the same message with code page 1200, the message now appears as follows (20 byte length):

Encoding : 546 CodedCharSetId : 1200

**** Message ****

length - 20 of 20 bytes

00000000: 4200 4F00 4200 2000 4C00 4F00 4200 4C00 'B.O.B. .L.O.B.L.'
00000010: 4100 5700 'A.W. '


So basically, your typical string message needs twice as many bytes to convert from 1208 (variable width code page where typical characters are represented by one byte) to 1200 (fixed width double byte code page). For example, the letter B above is x'42' in 1208 and x'4200' in 1200. At least that is my understanding.

Thanks,
Tim

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Coombs, Lawrence
Sent: Friday, December 20, 2013 9:09 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Data Conversion in C++

Thanks. I will suggest this.

From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Neil Casey
Sent: Friday, December 20, 2013 9:04 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Data Conversion in C++

Hi Lawrence,

2190 is an interesting reason code. It seems to me like it shouldn't happen for a message with format MQFMT_STRING.

It could certainly occur if you have a user format and a conversion exit, or for a format of MQ_IMS_VAR_STRING.

I suspect that it could also occur for MQFMT_RF_HEADER_2, and given that your source CCSID is 1208, I am going to guess that the message is generated from Java, and possibly via JMS.

If this is the case, then the problem could be with converting the JMS or usr properties.

If this is the case, and the receiving application (being C++) doesn't actually care about the JMS parts of the message, you might be able to resolve the issue by setting the TARGCLIENT(MQ) option in your JMS destination definition.

Regards,

Neil Casey.


On 21 Dec 2013, at 1:47 pm, Coombs, Lawrence <Lawrence.Coombs-***@public.gmane.org<mailto:Lawrence.Coombs-***@public.gmane.org>> wrote:

I am trying to integrate one of our internal application with a vendor. We are passing the messages with a CCSID of 1208 and they want to convert it to 1200 when they get the message.
The issue is that sometimes the conversion works from 1208 to 1200 and sometimes they get a '2190'(MQRC_CONVERTED_STRING_TOO_BIG). Unfortunately I don't know a whole lot about C++.
The receiving message buffer does not appear to be the problem because it is quite large. The message payload can vary in length and the failure occurs on both small and large messages. Out of 25 messages sent, 6 failed to convert.

I did a Google search before this post but could not find anything definitive. Can someone shed any light on this issue?
This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>


________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Darren Douch
2013-12-22 18:29:31 UTC
Permalink
My C++ is too far in the past .. .but if they are providing a buffer that
they've already allocated, to be safe I would say it needs to be twice the size
of the 1208 msg.

You say some small and some large messages are failing ... I guess I would ask
... is the size of the get buffer constant, or is that changing?

As an earlier appender stated, in 1208 the commonly used characters will occupy
a single byte, in 1200 they will all occupy two bytes, so the message size is
likely to double moving from the queue to memory.

Have a great Christmas all.

Regards
Darren
Post by Coombs, Lawrence
I am trying to integrate one of our internal application with a vendor. We are
passing the messages with a CCSID of 1208 and they want to convert it to 1200
when they get the message.
The issue is that sometimes the conversion works from 1208 to 1200 and
sometimes they get a ‘2190’(MQRC_CONVERTED_STRING_TOO_BIG). Unfortunately I
don’t know a whole lot about C++.
The receiving message buffer does not appear to be the problem because it is
quite large. The message payload can vary in length and the failure occurs on
both small and large messages. Out of 25 messages sent, 6 failed to convert.
I did a Google search before this post but could not find anything definitive.
Can someone shed any light on this issue?
This message, including any attachments, is the property of Sears Holdings
Corporation and/or one of its subsidiaries. It is confidential and may contain
proprietary or legally privileged information. If you are not the intended
recipient, please delete it without reading the contents. Thank you.
--------------------------------------------------------------------------------
List Archive <http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe
Instructions for managing your mailing list subscription are provided in the
Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Peter D
2013-12-22 18:49:08 UTC
Permalink
I don't think c++ matters. I think the program is issuing the error because it is not doing the conversion correctly 'because' of characters on the payload. I've seem some funky stuff in my time when a program sees something foreign to its usual transformation pattern - like converting CRNL into hex 20202020202020202020202020...... Completely blowing up in XML tags, Etc.

Ask the app dev person to show you the to and from conversion tables - if that is what they are using ... They could also be doing byte conversion, string conversion, glob conversion ...

Hohoho!

/Pete
My C++ is too far in the past .. .but if they are providing a buffer that they've already allocated, to be safe I would say it needs to be twice the size of the 1208 msg.
You say some small and some large messages are failing ... I guess I would ask ... is the size of the get buffer constant, or is that changing?
As an earlier appender stated, in 1208 the commonly used characters will occupy a single byte, in 1200 they will all occupy two bytes, so the message size is likely to double moving from the queue to memory.
Have a great Christmas all.
Regards
Darren
I am trying to integrate one of our internal application with a vendor. We are passing the messages with a CCSID of 1208 and they want to convert it to 1200 when they get the message.
The issue is that sometimes the conversion works from 1208 to 1200 and sometimes they get a ‘2190’(MQRC_CONVERTED_STRING_TOO_BIG). Unfortunately I don’t know a whole lot about C++.
The receiving message buffer does not appear to be the problem because it is quite large. The message payload can vary in length and the failure occurs on both small and large messages. Out of 25 messages sent, 6 failed to convert.
I did a Google search before this post but could not find anything definitive. Can someone shed any light on this issue?
This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.
--------------------------------------------------------------------------------
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com <http://www.lsoft.com/resources/manuals.asp>
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Coombs, Lawrence
2013-12-28 02:51:21 UTC
Permalink
I have a PMR open with IBM Support regarding this issue.
This was a bug in WMQ 7.0.1.4. It was fixed in WMQ 7.0.1.6.
I tried the same program with a 7.5.0.2 server and it also failed with the 2190. It worked with a 7.0.1.8 server.
The funniest thing is that I used Paul' s MO03 (QLOAD) and it was able to get the messages and convert them to 1200.


-----Original Message-----
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Peter D
Sent: Sunday, December 22, 2013 12:49 PM
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: Data Conversion in C++

I don't think c++ matters. I think the program is issuing the error because it is not doing the conversion correctly 'because' of characters on the payload. I've seem some funky stuff in my time when a program sees something foreign to its usual transformation pattern - like converting CRNL into hex 20202020202020202020202020...... Completely blowing up in XML tags, Etc.

Ask the app dev person to show you the to and from conversion tables - if that is what they are using ... They could also be doing byte conversion, string conversion, glob conversion ...

Hohoho!

/Pete
My C++ is too far in the past .. .but if they are providing a buffer that they've already allocated, to be safe I would say it needs to be twice the size of the 1208 msg.
You say some small and some large messages are failing ... I guess I would ask ... is the size of the get buffer constant, or is that changing?
As an earlier appender stated, in 1208 the commonly used characters will occupy a single byte, in 1200 they will all occupy two bytes, so the message size is likely to double moving from the queue to memory.
Have a great Christmas all.
Regards
Darren
I am trying to integrate one of our internal application with a vendor. We are passing the messages with a CCSID of 1208 and they want to convert it to 1200 when they get the message.
The issue is that sometimes the conversion works from 1208 to 1200 and sometimes they get a ‘2190’(MQRC_CONVERTED_STRING_TOO_BIG). Unfortunately I don’t know a whole lot about C++.
The receiving message buffer does not appear to be the problem because it is quite large. The message payload can vary in length and the failure occurs on both small and large messages. Out of 25 messages sent, 6 failed to convert.
I did a Google search before this post but could not find anything definitive. Can someone shed any light on this issue?
This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.
---------------------------------------------------------------------
----------- List Archive
<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage
Your List Settings
<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> -
Unsubscribe
ignoff%20mqseries>
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
<http://www.lsoft.com/resources/manuals.asp>
the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
To unsubscribe, write to ***@LISTSERV.MEDUNIWIEN.AC.AT and, in the message body (not the subject), write: SIGNOFF MQSERIES Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank
Loading...