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 (ACE) Support » Cast with CCSID not necessarily working

Post new topic  Reply to topic
 Cast with CCSID not necessarily working « View previous topic :: View next topic » 
Author Message
jefflowrey
PostPosted: Fri Dec 19, 2003 1:46 pm    Post subject: Cast with CCSID not necessarily working Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Fri Dec 19, 2003 2:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri Dec 19, 2003 2:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
jfluitsm
PostPosted: Sun Dec 21, 2003 6:59 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Cast with CCSID not necessarily working
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.