|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
CCSID in Message broker |
« View previous topic :: View next topic » |
Author |
Message
|
GeneRK4 |
Posted: Tue Mar 11, 2014 7:35 pm Post subject: CCSID in Message broker |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
I am new to CCSID concepts.Please help me to get clarified on some basic questions ...
There is Source and Target applications understanding characters in different CCSIDs.
Source application is connected to queue manager of some default CCSID set.And Target application also connected to Queue manager with different CCSID set.
I need some clarifications on how these messages are passed and retrieved. 1)Source application places messages in its Q.This message is in unreadable format.Since both have different CCSID,I hope MQPUT will provide CCSID which is overriden by Source QM's default CCSID.-Please correct if wrong
2)WMB receives the message in MRM format.It parses according to the physical and logical structure specified.-Please clarify whether data conversion happens at this stage itself according to the Target application's CCSID? If not,then how would be the message in readable format when it comes out of message broker?.
3)WMB after parsing sets the OutputRoot.properties for CCSID and Encoding according to the target application's CCSID.Please correct if wrong
4)Finally ,as Target application gets the message MQGET with some CCSID ,it overrides the Target QM's CCSID.Please correct if wrong |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Mar 11, 2014 10:47 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Some points to consider
A really good 'Best Practice' point when it comes to CCSID's is to standardize everywhere on the same CCSID, preferabley 1208 (UTF- .
Then the problem goes away (in most cases)
You can override the CCSID when writting a message otherwise the QMGR default CCSID is used.
There are a lot of posts in this forum where applications (and by implication the app developers) writing messages actually don't understand the key point about a message CCSID. That is, the CCSID set in the MQMD has to actually match that of the data in the body of the message. IF this is not the case, then you are literally up shit creek without a paddle.(so to speak).
There are more but I'll let others add them. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 12, 2014 4:44 am Post subject: Re: CCSID in Message broker |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
GeneRK4 wrote: |
1)Source application places messages in its Q.This message is in unreadable format.Since both have different CCSID,I hope MQPUT will provide CCSID which is overriden by Source QM's default CCSID.-Please correct if wrong |
There's nothing unreadable about the put message; it's in whatever the format the application decided to use. The putting application should set the CCSID which it used to create the message; if it doesn't the queue manager will insert it's default CCSID which may not match the message data and will render the message unreadable at the target
GeneRK4 wrote: |
2)WMB receives the message in MRM format.It parses according to the physical and logical structure specified.-Please clarify whether data conversion happens at this stage itself according to the Target application's CCSID? If not,then how would be the message in readable format when it comes out of message broker?. |
The conversion could have happened in transport if the WMQ channel has been configured to perform it. WMB uses UTF-16 internally so any message not in that page will be converted. WMB has no magic knowledge of the message format so assumes the CCSID in the message (not any application CCSID) correctly describes the message - see above. The CCSID WMB uses to put any message is the one selected by your flow code to describe the data - see above.
GeneRK4 wrote: |
3)WMB after parsing sets the OutputRoot.properties for CCSID and Encoding according to the target application's CCSID.Please correct if wrong |
Wrong - WMB doesn't set anything in the Properties. See above.
GeneRK4 wrote: |
4)Finally ,as Target application gets the message MQGET with some CCSID ,it overrides the Target QM's CCSID.Please correct if wrong |
Again wrong. You can't specify a CCSID on the MQGet and conversion is always performed from the CCSID in the MQMD to the target CCSID if that conversion has been requested - it's not a default and is under the application's control. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
GeneRK4 |
Posted: Wed Mar 12, 2014 5:29 pm Post subject: Re: CCSID in Message broker |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
Thanks for your response.I am still not clear with the below response...
Vitor wrote: |
GeneRK4 wrote: |
2)WMB receives the message in MRM format.It parses according to the physical and logical structure specified.-Please clarify whether data conversion happens at this stage itself according to the Target application's CCSID? If not,then how would be the message in readable format when it comes out of message broker?. |
The conversion could have happened in transport if the WMQ channel has been configured to perform it. WMB uses UTF-16 internally so any message not in that page will be converted. WMB has no magic knowledge of the message format so assumes the CCSID in the message (not any application CCSID) correctly describes the message - see above. The CCSID WMB uses to put any message is the one selected by your flow code to describe the data - see above.
|
In one of the interface I have in Production,we have Mainframe as Source System.We have used TDS message and manually defined the fields in TDS message for the Cobol copy book message modal.And CCSID in TDS model has been set as "1146"(Mainframe's CCSID) .Hence,it is understood that the parser parses the incoming message with CCSID 1146.
Whereas in WMB8,we have the same flow and we have created DFDL by importing Cobolcopy book for the same message.Nowhere we have mentioned the CCSID 1146.Our Broker QM has CCSID 1208.MQ Channel also does not make any conversions.MQInput node also is not set with conversion.
But not sure how..! This DFDL parser is parsing the message ,understanding though the incoming message CCSID is 1146.Not sure how this is happening...when nowhere it is mentioned as 1146.
Could you please explain how this is haoppening? |
|
Back to top |
|
 |
GeneRK4 |
Posted: Wed Mar 12, 2014 5:39 pm Post subject: Re: CCSID in Message broker |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
Vitor wrote: |
GeneRK4 wrote: |
3)WMB after parsing sets the OutputRoot.properties for CCSID and Encoding according to the target application's CCSID.Please correct if wrong |
Wrong - WMB doesn't set anything in the Properties. See above.
|
In our Realtime flows,we have Target system with CCSID 1208.
And we have defined OutRoot properties with CCSID 1208.
I also read in infocenter that,if the application is not MQ based ,then we can set the OutputRoot.properties for CCSID instead of specifying OutputRoot.MQMD.
if we have the set the CCSID as 1208,the message has to be already in 1208 format ,in the same code page? After parsing the message (1146 CCSID CPY format) ,I dont see anywhere the message conversion happening from 1146 to 1208.We are just setting the properties folder with CCSID 1208 |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Mar 13, 2014 12:05 am Post subject: Re: CCSID in Message broker |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
GeneRK4 wrote: |
[After parsing the message (1146 CCSID CPY format) ,I dont see anywhere the message conversion happening from 1146 to 1208.We are just setting the properties folder with CCSID 1208 |
Once you have parsed the message successfully, it is in the Broker Internal format. This happens to be Unicode/UTF-16.
No conversion is done (unless you specifically request it) is done on the message until it reaches the Broker Boundary and for example, is being output to an MQ Queue.
Then the MQOutput Node will decide what conversion if any is being used.
{If this next bit is wrong, I'm sure an IBM'er will be along to correct me}
If the Message CCSID Property is blank then it will use the Queue Manager Default. IF there is a value in the Message Property then it will use that CCSID and convert and output the message using that CCSID. IT will also set the message property to indicate the correct CCSID for any receiving application.
If you want to be sure of the CCSID of your output message then set the message property and be done with it. This way you will override the Queue Manager Default. I have seen an MQ Admin change it on a running QM and plead ignorance whe nall sorts of things started breaking. This was simply because the devs relied on the correct QMGR Default CCSID. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|