|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Cast with CCSID not necessarily working |
« View previous topic :: View next topic » |
Author |
Message
|
jefflowrey |
Posted: Fri Dec 19, 2003 1:46 pm Post subject: Cast with CCSID not necessarily working |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'm getting in some data as a BLOB message that I need to extract a section from, and process it separately from the rest of the message.
I'm doing this
Code: |
declare temp character;
set temp = CAST (InputRoot.BLOB.BLOB as character ccsid 850); |
This works fine, or seems to most of the time. However, I recently got in some messages that were EBCDIC (ccsid 500), and this cast statement seems to be failing silently. At least, the data in temp still shows up as EBCDIC when I run it out to a trace file.
One thing I did notice is that the MQMD had a blank format, instead of what would have been the correct MQFMT_STRING value.
But that shouldn't have any effect on the CAST statement, should it?
Oh, I'm running 2.1 with CSD04. I do not have the Convert options specified on the MQInput node. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EddieA |
Posted: Fri Dec 19, 2003 2:32 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Jeff,
Maybe I'm reading this wrong, but this is what the manual states for CASTing BLOB to Character:
Quote: |
If either a CCSID or ENCODING clause is specified, the given byte array is assumed to be characters in the specified CCSID and encoding and is code page converted into the character return value. |
To me, that says that you are telling WMQI what code page to treat the Input as, not what codepage to make the Output. The Output will always be, internally, Unicode, which you can then force to the correct target CCSID for output.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 19, 2003 2:57 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay, that makes sense.
But it didn't work when I used InputRoot.Properties.CodedCharSetId either (which was set to 500). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jfluitsm |
Posted: Sun Dec 21, 2003 6:59 am Post subject: |
|
|
Disciple
Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands
|
Jeff,
You are right about the MQMD format, this is used in the MQ convert option and not within WMQI.
Did you set the InputProperties.CodedCharSetId to 500 or was this value set by WMQI? Most of these errors are caused by a difference in the ccsid of the actual message and the numeric value of the CodedCharSetId. In your case it might be that the message is already converted somehow but that the CodedCharSetId is still 500.
How do you know from the trace output that temp is still in EBCDIC? _________________ Jan Fluitsma
IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6 |
|
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
|
|
|
|