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 » How to Convert ROW to CHARACTER?

Post new topic  Reply to topic
 How to Convert ROW to CHARACTER? « View previous topic :: View next topic » 
Author Message
mrch1
PostPosted: Sun Nov 29, 2009 6:55 pm    Post subject: How to Convert ROW to CHARACTER? Reply with quote

Newbie

Joined: 29 Nov 2009
Posts: 5

hi,I'm currently using WMB 6.1.0.4 and i have an issue like this:
There is a ROW struct for example:
<row>
<col>111</col>
<col>222</col>
<col>333</col>
</row>
My question is How can i convert it to CHARACTER like below?
<row><col>111</col><col>222</col><col>333</col></row>
THX!
Back to top
View user's profile Send private message
AkankshA
PostPosted: Sun Nov 29, 2009 8:57 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

what ways have you tried so far ??
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
mrch1
PostPosted: Sun Nov 29, 2009 10:28 pm    Post subject: Reply with quote

Newbie

Joined: 29 Nov 2009
Posts: 5

Currently i've tried using CAST(ROW AS CHARACTER),but it doesn't work;
I searched the manual and i found the CAST function doesn't support the ROW type.
I just tried using ASBITSTREAM to convert a XML tree to BLOB,and then output the BLOB to a file,i found the file content is just what i want,
NOW my question is how to convert BLOB to CHARACTER?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Nov 29, 2009 11:12 pm    Post subject: Reply with quote

Grand High Poobah

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

mrch1 wrote:
NOW my question is how to convert BLOB to CHARACTER?

Have you tried CAST on that one? What were the effects?
And remember that unless you are using a CDATA section xml tags will be escaped...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Mandeep
PostPosted: Mon Nov 30, 2009 1:53 am    Post subject: Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 33

If you have BLOB available in Output root then u can use:

CAST(BITSTREAM(OutputRoot.BLOB) AS CHAR CCSID 1208 )
OR
CAST(BITSTREAM(OutputRoot.BLOB.BLOB) AS CHAR CCSID 1208 )
Back to top
View user's profile Send private message
student
PostPosted: Mon Nov 30, 2009 2:33 am    Post subject: Reply with quote

Apprentice

Joined: 17 Mar 2009
Posts: 31
Location: UK

You could also specify encoding, format etc while converting blob to char. See Cast function for details.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Mon Nov 30, 2009 11:18 am    Post subject: Re: How to Convert ROW to CHARACTER? Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

student wrote:
You could also specify encoding, format etc while converting blob to char. See Cast function for details.

The CAST function does not use the ENCODING and FORMAT parameters when casting BLOB as CHARACTER.
Back to top
View user's profile Send private message
agrawalamit166
PostPosted: Mon Nov 30, 2009 1:31 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

it's always better to use InputProperties.CodedCharSetId inplace of 1208..
Back to top
View user's profile Send private message Yahoo Messenger
rekarm01
PostPosted: Mon Nov 30, 2009 1:49 pm    Post subject: Re: How to Convert ROW to CHARACTER? Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

agrawalamit166 wrote:
it's always better to use InputProperties.CodedCharSetId in place of 1208..

Not always. It's appropriate for InputRoot.BLOB.BLOB, but not necessarily for other BLOBs.

It is always better though, to use ASBITSTREAM in place of BITSTREAM, as the latter is deprecated.
Back to top
View user's profile Send private message
mrch1
PostPosted: Tue Dec 01, 2009 1:12 am    Post subject: Reply with quote

Newbie

Joined: 29 Nov 2009
Posts: 5

thanks for all replies!
It seems that there's no way that convert ROW type to CHARACTER directly.I've solved the problem indirectly.here is the way:
1.convert the ROW type to BLOB using ASBITSTREAM.
2.convert BLOB to CHARACTER using CAST.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to Convert ROW to CHARACTER?
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.