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 » eSQL

Post new topic  Reply to topic
 eSQL « View previous topic :: View next topic » 
Author Message
madi
PostPosted: Mon Feb 06, 2006 1:28 pm    Post subject: eSQL Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

Hi All

I am trying to create some fields and using the following code but it not working.

It is creating "name" but not "value".

Code:
      SET OutputRoot.XML.Publish.Item.Data.ItemAttr[1].(XML.Attribute)name = 'NUMBER';
         DECLARE cursor1 REFERENCE TO OutputRoot.XML.Publish.Item.Data;
      
      CREATE FIELD cursor1.ItemAttr[1].Attr.(XML.Attribute)"value";
      SET cursor1.ItemAttr[1].Attr.(XML.Attribute)"value" = FIELDVALUE(InputRoot.XML.Product.ProductID);


Input:

<Product>
<ProductID>ProductID</ProductID>
<Product>

Output:
<Publish>
<Item><Data>
<ItemAttr name="NUMBER"><Attr value="ProductID"/></ItemAttr>
</Data>
</Item>
</Publish>

Its creating until <Attr/>. i want to get <Attr value = "ProductID"/>

What am I doing wrong?

thanks
madi
Back to top
View user's profile Send private message
vk
PostPosted: Mon Feb 06, 2006 1:36 pm    Post subject: Reply with quote

Partisan

Joined: 20 Sep 2005
Posts: 302
Location: Houston

REFERENCE variables can be used to access only Input tree and Environment trees. I dont think Output tree can be referenced.

Thanks,
VK.
Back to top
View user's profile Send private message
madi
PostPosted: Mon Feb 06, 2006 1:39 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

I think we can use REFERENCE once we have created the outputfields.

But i ahev taken the references out but it still doesnt work.

thanks
madi
Back to top
View user's profile Send private message
vk
PostPosted: Mon Feb 06, 2006 4:08 pm    Post subject: Reply with quote

Partisan

Joined: 20 Sep 2005
Posts: 302
Location: Houston

Madi,

Can you try the code below -

SET OutputRoot.XML.Publish.Item.Data.ItemAttr[1].Attr.(XML.Attribute)"value" = InputRoot.XML.Product.ProductID;

Thanks,
VK.
Back to top
View user's profile Send private message
fschofer
PostPosted: Tue Feb 07, 2006 1:24 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
sure you can use a REFERENCE to access the OutputRoot tree.

Look here:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ak04864_.htm?resultof=%22%52%45%46%45%52%45%4e%43%45%22%20%22%72%65%66%65%72%22%20

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ak04950_.htm?resultof=%22%43%52%45%41%54%45%22%20%22%63%72%65%61%74%22%20%22%46%49%45%4c%44%22%20%22%66%69%65%6c%64%22%20

By the way, if InputRoot.XML.Product.ProductID IS NULL (not in input message, typing error, ...) you will see no attribute value in your message, cause its deleted.

Perform a debug trace of your message flow to see what it does.

Greetings
Frank
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 » eSQL
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.