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 » Convert Environment tree into CHAR

Post new topic  Reply to topic
 Convert Environment tree into CHAR « View previous topic :: View next topic » 
Author Message
CuriCAT
PostPosted: Tue Oct 21, 2008 7:55 pm    Post subject: Convert Environment tree into CHAR Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

I have this tree in environment variable.

Environment
---- xyz
------a = 10
------b = 20
------c = 30

I want to conver Environment.xyz intto Char , I mean as one single string. I am not able to ..


I tried this

SET v_abc = CAST( ASBITSTREAM(Environment.xyz) AS CHAR)

Can you please tell me am I missing something ?
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
broker_new
PostPosted: Wed Oct 22, 2008 4:21 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

First CAST it as BLOB and then CAST the result as CHAR
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 22, 2008 4:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There is no parser associated with the Environment tree. Ergo, there's nothing for ASBITSTREAM to use to serialize the tree.

Fortunately, CREATE FIELD has a DOMAIN clause.
Back to top
View user's profile Send private message
CuriCAT
PostPosted: Thu Oct 23, 2008 8:43 am    Post subject: Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

Can some body give an example for that.. I tried declaring blob variable .. etc. nothing worked.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
mqjeff
PostPosted: Thu Oct 23, 2008 8:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Create Field Environment.Data DOMAIN XMLNSC;

Set Environment.Data.XMLNSC.Root.Field1 = 'a';

Set Environment.Output = ASBITSTREAM(Environment.Data.XMLNSC);

or some such.

caveat coder.
Back to top
View user's profile Send private message
CuriCAT
PostPosted: Thu Oct 23, 2008 9:26 am    Post subject: Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

I want to do this :


DECLARE xyzTableRef REFERENCE TO Environment.WORKAREA.xyzTable;

SET xyzTableRef.Data[] = (SELECT T.* FROM Database.{v_Schema}.TABLENAME AS T);

then I want to convert this xyzTableRef to a string.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
marko.pitkanen
PostPosted: Thu Oct 23, 2008 10:01 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

I wonder if it works when you just create your xyzTable with domain declaration:

Create Field Environment.WORKAREA.xyzTable DOMAIN XMLNSC

and then serialize object -tree as bitstream and then cast the bitstream as char:
CAST( ASBITSTREAM(Environment.WORKAREA.xyzTable) AS CHAR)
and perhaps you need to use CCSID in our cast operation to get our string in right character set.

Marko
Back to top
View user's profile Send private message Visit poster's website
CuriCAT
PostPosted: Fri Oct 24, 2008 9:14 am    Post subject: Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

Still I couldn't manage to do this... If I can convert a part of environment tree to BLOB enough.. but ASBITSTREAM is not helping me me
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
marko.pitkanen
PostPosted: Mon Oct 27, 2008 1:32 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

What are the symptoms(debug user trace with output of the data trees(environment, root etc.) could be useful when helping you to solve this problem)?

Have you read what are all the properties that can be assigned to the asbitstream field function http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak05510_.htm and how it can/should be used from "WebSphere Message Broker ESQL Version 6 Release 0" document ?

Marko
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 (ACE) Support » Convert Environment tree into CHAR
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.