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 » WebSphere Message Broker Support » CCSID in the MQIIH header

Post new topic  Reply to topic
 CCSID in the MQIIH header « View previous topic :: View next topic » 
Author Message
Herbert
PostPosted: Thu Feb 03, 2011 6:26 am    Post subject: CCSID in the MQIIH header Reply with quote

Centurion

Joined: 05 Dec 2006
Posts: 141
Location: Leersum, The Netherlands

Hi,

I have a discussion here about the CodedCharSetId field in the last MQ header.

WMB receives below message with 2 MQ headers.

- MQMD with 500 in the CodedCharSetId field
- MQIIH with 0 in the CodedCharSetId field
- DATA

The WMB flow retrieves it as BLOB, later there is a ResetContentDescriptor for the actual message-set/etc needed.

If I look at the message with debug after WMB did get it as BLOB and before the ResetContentDescriptor, then I see that Root.Properties.CodedCharSetId is 0.

In this case where there are 2 MQ headers, I think the situation is:
- The CCSID in the MQMD is telling that the MQIIH is in codepage 500
- The CCISD in the MQIIH must tell what the codepage of the following data is.

So it's correct that WMB places 0 in the Root.Properties.CodedCharSetId field, it just takes the CCSID field from the last MQ header. The CCSID field in the last MQ header tells what codepage the data has.

The problem is that later on when the BLOB is parsed to the message-definition from the ResetContentDescriptor WMB does not know the CCSID of the BLOB anymore, and it goes wrong.

IMHO WMB works correctly and the party that sends this message to WMB must also set the correct CCSID in the MQIIH header.

Is this statement correct ?

Kind Regards, Herbert
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Thu Feb 03, 2011 7:00 am    Post subject: Re: CCSID in the MQIIH header Reply with quote

Grand Poobah

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

Herbert wrote:
Hi,

I have a discussion here about the CodedCharSetId field in the last MQ header.

WMB receives below message with 2 MQ headers.

- MQMD with 500 in the CodedCharSetId field
- MQIIH with 0 in the CodedCharSetId field
- DATA

The WMB flow retrieves it as BLOB, later there is a ResetContentDescriptor for the actual message-set/etc needed.

If I look at the message with debug after WMB did get it as BLOB and before the ResetContentDescriptor, then I see that Root.Properties.CodedCharSetId is 0.

In this case where there are 2 MQ headers, I think the situation is:
- The CCSID in the MQMD is telling that the MQIIH is in codepage 500
- The CCISD in the MQIIH must tell what the codepage of the following data is.

So it's correct that WMB places 0 in the Root.Properties.CodedCharSetId field, it just takes the CCSID field from the last MQ header. The CCSID field in the last MQ header tells what codepage the data has.

The problem is that later on when the BLOB is parsed to the message-definition from the ResetContentDescriptor WMB does not know the CCSID of the BLOB anymore, and it goes wrong.

IMHO WMB works correctly and the party that sends this message to WMB must also set the correct CCSID in the MQIIH header.

Is this statement correct ?

Kind Regards, Herbert


A CCSID code of 0 usually means the qmgr's CCSID. That works fine and dandy when you don't have and additional header. Now as you've seen with the additional header (MQIIH) things are a little bit different and you will need to have the sending app change to put the correct CCSID in the MQIIH header.

From your example I would try to see if CCSID 500 will work... but be advised that the MF in question might be running a different CCSID than MQ...(like 37)

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Herbert
PostPosted: Thu Feb 03, 2011 11:58 pm    Post subject: Re: CCSID in the MQIIH header Reply with quote

Centurion

Joined: 05 Dec 2006
Posts: 141
Location: Leersum, The Netherlands

fjb_saper wrote:
Herbert wrote:
...
WMB receives below message with 2 MQ headers.

- MQMD with 500 in the CodedCharSetId field
- MQIIH with 0 in the CodedCharSetId field
- DATA
...
...
you will need to have the sending app change to put the correct CCSID in the MQIIH header.
...

Thanks for your response. The MF developer claims it is standaard IMS Bridge Software and he can not change this.

I have now fixed it with a small compute node, where I fill OutputRoot.Properties.CodedCharSetId from InputRoot.MQMD.CodedCharSetId
Back to top
View user's profile Send private message Visit poster's website
rekarm01
PostPosted: Fri Feb 04, 2011 1:13 am    Post subject: Re: CCSID in the MQIIH header Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1132

MQPUT normally replaces ccsids like MQCCSI_Q_MGR and MQCCSI_INHERIT with the actual ccsid during the put, but the CodedCharSetID for MQIIH is defined differently from the other MQ headers:
Quote:
This is a reserved field; its value is not significant. The initial value of this field is 0

It looks like the WMB MQIIH parser and Properties parser doesn't handle this properly.

The InfoCenter contains some sample code which illustrates how to handle messages with MQIIH headers.
Back to top
View user's profile Send private message
Herbert
PostPosted: Fri Feb 04, 2011 4:56 am    Post subject: Re: CCSID in the MQIIH header Reply with quote

Centurion

Joined: 05 Dec 2006
Posts: 141
Location: Leersum, The Netherlands

rekarm01 wrote:
...
but the CodedCharSetID for MQIIH is defined differently from the other MQ headers:
Quote:
This is a reserved field; its value is not significant. The initial value of this field is 0

It looks like the WMB MQIIH parser and Properties parser doesn't handle this properly.

wow, indeed a big exception, from the same page
Quote:
The Character Set Id for supported structures which follow a MQIIH structure is the same as that of the MQIIH structure itself and taken from any preceding MQ header.

Then WMB is wrong by taking the CCSID field from the MQIIH header for its Properties.CodedCharSetId, and it should also not set this field when generating a MQIIH header, so below example code is also wrong.

Code:
SET OutputRoot.MQIIH.Encoding = 785;
SET OutputRoot.MQIIH.CodedCharSetId = 500;

Its also done on below url:

http://www.ibm.com/developerworks/websphere/library/techarticles/0709_suarez/0709_suarez.html
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker Support » CCSID in the MQIIH header
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.